PDA

View Full Version : [ubuntu] .sh files



Zoontje
February 16th, 2011, 03:35 PM
Hello,

My dad has installed ubuntu on our PC, now i'm trying to install something and it's a .sh file.
How can i install the file?

Grtjs

Zoontje

An Sanct
February 16th, 2011, 04:36 PM
The extension .sh marks a script (bash)

To install it, open the terminal (Applications -> Accessories -> Terminal), go to the folder where the sh file is and execute it like:

sudo bash ./filename.sh

Or right click on the sh file, make it executable and double click on it (if asked, select "run in terminal")

AlphaLexman
February 16th, 2011, 04:46 PM
@Zoontje,

I would be careful running scripts if you are new to the ubuntu and GNU/Linux world. Welcome btw. An unknown script could be destructive to your system. If you would like assistance in determining the validity or nature of the script, post it to the forums and the community can verify the safety of the script.

Best wishes.

Zoontje
February 16th, 2011, 05:17 PM
When i put in the words you wrote then this appears:
robin@beneden:~$
robin@beneden:~$ sudo bash ./install-mac-linux.sh
robin is not in the sudoers file. This incident will be reported

I either can't open it in terminal...

What now?

An Sanct
February 16th, 2011, 07:03 PM
You seem to be in a group, hasn't got granted permissions to do administrative tasks. Maybe the administrator (your dad) did this on purpose :) ask him to execute this sh for you or give you the power to do so yourself.

PS. install mac Linux??? i would like to see the contents of that script too :)

Zoontje
February 16th, 2011, 08:09 PM
I did the same on my dad's account but it said the file dont exists, is this because he searches only in my dad's account or something?

An Sanct
February 16th, 2011, 08:14 PM
If the file is on your desktop, then yes

/home/$username/Desktop/install-mac-linux.sh

check the inserted the username...

PS. Also note, that "documents", "music", "videos" and "pictures" (and i maybe missed one or two) special folders are also separated through accounts, so "cd" into your account and run it from there, you are gonna have to "sudo" it anyhow ...

PS2... Really, we would love to see that script? or at least post the URL where you got it from.

AlphaLexman
February 16th, 2011, 08:15 PM
What are you really trying to install?

Maybe best if you start from the software center!

It is actually against forum policy for us to give you instructions which could be malicious, or harm your machine.

searchfgold6789
February 16th, 2011, 08:25 PM
LOL!!! I know what he's trying to install. It's completely harmless, don't worry.

First you will have to re-download or copy the file onto your dad's account (with his permission of course!) Put it in his 'home' folder.
Then, still on your dad's account, right click the file, click properties tab, check the box that says "make this file executable."
Then double-click the file. PM me if you need more specific help with this tool... I've used it before.


.... It got me to 60 WC if you know what I mean .... :) :) :) :) :)


For geeks: this script contains a single line, pointing to a small Java JRE program in the same folder where it resides.

Zoontje
February 17th, 2011, 08:43 PM
it's a bot for a game, i got it from my friends, i'll ask them for the link

searchfgold6789
February 17th, 2011, 10:47 PM
That particular one (RS2bot) is particularly hard to get a hold of.
Why don't you upload it to someplace like 2shared.com and copy the link down on paper, visit the link on your dad's account (I really hope you are asking him beforehand, although the files don't do that much harm) and put it in a folder somewhere.
And don't forget to make the file executable!

Zoontje
February 18th, 2011, 08:59 PM
http://www.autofighter.org/view.php?name=Install%20the%20NX%20Launch%20Pad&id=install

Zoontje
February 18th, 2011, 09:02 PM
but i still cant install it

BananaPeal
February 18th, 2011, 09:40 PM
Ask your dad to give you admin privilages. I don't know how it's meant to work but you might have problems running it if you install on his account and try to access it later on yours.

otherwise, try reading very carefully what others have said: make the script executable by,


sudo chmod +x "scriptName"

and run it using


sudo bash "scriptName"

fun shortcut: to not type full names in you can type just the first few letters (enuf to make it unique) then *

like: filename = fil*

so ultimately:


sudo bash scri*

if your file was called scriptName!

hope this helps! I understand scripts and permissions seem really weird for people who might not be used to this environment!

Zoontje
February 21st, 2011, 05:43 PM
I can't copy it to the home folder of my dad, is this normal?