LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Bodhi
User Name
Password
Bodhi This forum is for the discussion of Bodhi Linux.

Notices


Reply
  Search this Thread
Old 05-16-2019, 02:30 PM   #1
madmax25
Member
 
Registered: Aug 2018
Posts: 348

Rep: Reputation: Disabled
BL5-64bit - How to execute sh file, please?


I want to install the wifi driver rtl8812au.

I copied this code into a .sh file:
Code:
sudo apt purge rtl8812au-dkms
sudo apt install git
git clone https://github.com/abperiasamy/rtl8812AU_8821AU_linux.git
cd rtl8812AU_8821AU_linux
sudo make -f Makefile.dkms install
sudo modprobe rtl8812au
In the file properties I also allowed executing privileges and associated the file to terminology.

When I try to start it, I'm offered to open it, to execute it or to execute it in the terminal.

When I choose the terminal, nothing happens.

How can I execute this file properly, please?
 
Old 05-16-2019, 02:32 PM   #2
sevendogsbsd
Senior Member
 
Registered: Sep 2017
Distribution: FreeBSD
Posts: 2,252

Rep: Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011
Open a terminal, cd to the directory where the file is located and run
Code:
./nameofyourshelfile.sh
 
1 members found this post helpful.
Old 05-16-2019, 02:37 PM   #3
madmax25
Member
 
Registered: Aug 2018
Posts: 348

Original Poster
Rep: Reputation: Disabled
Is there also a way to do it by double-clicking the sh file?
 
Old 05-16-2019, 02:41 PM   #4
sevendogsbsd
Senior Member
 
Registered: Sep 2017
Distribution: FreeBSD
Posts: 2,252

Rep: Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011
Yes, but it sounds like you have done that already. The problem with doing it that way is you cannot see if any errors occur because the terminal just goes away once the script exits, as you have discovered.
 
Old 05-16-2019, 03:06 PM   #5
madmax25
Member
 
Registered: Aug 2018
Posts: 348

Original Poster
Rep: Reputation: Disabled
Actually, I was looking for a way to double-click the sh file and watch the installation how it is performed in the terminal.

But now I have another problem.

Even the driver seems to be working (I can establish a wifi connection with it), I cannot find it anywhere.

There is supposed to be a file called rtl8812au.ko at this path:

Code:
/lib/modules/[kernel number]/kernel/drivers/net
But there's no such a file inside.

Where is it actually?

Last edited by madmax25; 05-16-2019 at 03:07 PM.
 
Old 05-16-2019, 03:09 PM   #6
sevendogsbsd
Senior Member
 
Registered: Sep 2017
Distribution: FreeBSD
Posts: 2,252

Rep: Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011
Sorry, couldn't tell you that - someone that uses Bohdi linux can probably better assist you with that. I am assuming "BL5" means Bohdi...
 
Old 05-16-2019, 03:11 PM   #7
madmax25
Member
 
Registered: Aug 2018
Posts: 348

Original Poster
Rep: Reputation: Disabled
Yes, indeed, BL5 means Bodhi Linux 5.0.

Last edited by madmax25; 05-16-2019 at 03:12 PM.
 
1 members found this post helpful.
Old 05-17-2019, 09:29 PM   #8
crajor
Member
 
Registered: Mar 2019
Location: Akron, Ohio
Distribution: PCLinuxOS 2020
Posts: 91
Blog Entries: 4

Rep: Reputation: Disabled
.sh files are scripts. I thought that scripts had to have at the beginning of the file #!/bin/bash. If this is req'd and not in the file,
it will not execute. sounds as if you have gone thru the steps req'd, but I think that this beginning tells the system where to
find the shell.
 
Old 05-17-2019, 09:33 PM   #9
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,395

Rep: Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594
Quote:
There is supposed to be a file called rtl8812au.ko at this path:

Code:

/lib/modules/[kernel number]/kernel/drivers/net
The driver being a realtek wifi driver look in /lib/modules/[kernel number]/kernel/drivers/net/wireless/realtek

Last edited by colorpurple21859; 05-17-2019 at 09:35 PM.
 
Old 05-18-2019, 03:28 AM   #10
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by madmax25 View Post
I copied this code into a .sh file:
you shouldn't do it in this case, because
  • it needs to be executed only once
  • you should closely follow the execution of one command, and move on to the next command only after the previous one completed succesfully
 
Old 05-18-2019, 03:34 AM   #11
ehartman
Senior Member
 
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 1,674

Rep: Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888
Quote:
Originally Posted by crajor View Post
.sh files are scripts. I thought that scripts had to have at the beginning of the file #!/bin/bash. If this is req'd and not in the file,
No, it is only required if you want a specific shell to execute the script.
Normally the shell will start a child of ITSELF to execute it.
And anyway, a lot of scripts use /bin/sh instead of bash (especially in Debian, where /bin/sh makes a script startup much faster as they're using dash (the Debian Almquist SHell) for it instead of bash.

Last edited by ehartman; 05-18-2019 at 06:02 AM.
 
Old 05-18-2019, 03:41 AM   #12
the_waiter
Bodhi Developer
 
Registered: Jun 2018
Location: Banská Bystrica, Slovakia
Distribution: Bodhi Linux
Posts: 864

Rep: Reputation: 665Reputation: 665Reputation: 665Reputation: 665Reputation: 665Reputation: 665
BTW, you need to tell that script is for executing.

chmod +x scriptname.sh

then run it
./scriptname.sh

Just for a record:
Doubleclick is also possible. You have to create a personal launcher with a name. This will create a personalname.desktop and then you can add the exec part with the script name. Then just run it from quick launcher or put it on the screen. But I also share the idea you need to do this only once in terminal. No need to make it repeatedly.

Stefan

Last edited by the_waiter; 05-18-2019 at 03:47 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
BL5-64bit - How to find MAC-address of bluetooth adapter, please? madmax25 Bodhi 2 04-29-2019 10:46 AM
BL5.0-64bit - How to set up vino, please? madmax25 Bodhi 4 04-27-2019 01:02 PM
BL5.0-64bit - How to fix eSudo, please? madmax25 Bodhi 30 04-25-2019 08:31 PM
BL5.0-64bit - How to install .DEB, please? madmax25 Bodhi 6 04-22-2019 10:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Bodhi

All times are GMT -5. The time now is 01:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration