LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (https://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   When trying to run a bash script in Gnome, nothing happens....... (https://www.linuxquestions.org/questions/linux-desktop-74/when-trying-to-run-a-bash-script-in-gnome-nothing-happens-819016/)

stratosmacker 07-09-2010 11:09 PM

When trying to run a bash script in Gnome, nothing happens.......
 
I click on a bash script, it asks me what to do, I say run in terminal. nothing happens. This happens for any script i try to open. weird

RockDoctor 07-10-2010 06:13 AM

Quote:

Originally Posted by stratosmacker (Post 4028868)
I click on a bash script, it asks me what to do, I say run in terminal. nothing happens. This happens for any script i try to open. weird

I just tried it (by double-clicking on a script in a nautilus window). A terminal opened, the script ran, then the terminal window immediately closed. Are the script's permissions properly set?

stratosmacker 07-10-2010 09:38 AM

Everything is set to read/write and I am the owner. Still does nothing. This is really strange because i have gnome on a few other computers and have never seen this

stratosmacker 07-10-2010 09:59 AM

Actually if you look closely you can see a terminal flash up. Still nothing actually happens

RockDoctor 07-10-2010 12:40 PM

Quote:

Originally Posted by stratosmacker (Post 4029204)
Actually if you look closely you can see a terminal flash up. Still nothing actually happens

I've seen this with other apps - the output is apparently dumped to the terminal, but the terminal closes before you can even read it. Would directing the output to a standard GNOME message box help? If so, take a look at zenity

stratosmacker 07-10-2010 03:47 PM

Quote:

Originally Posted by RockDoctor (Post 4029297)
I've seen this with other apps - the output is apparently dumped to the terminal, but the terminal closes before you can even read it. Would directing the output to a standard GNOME message box help? If so, take a look at zenity

Well this script requires user input so it shouldnt be quitting like this. BTW i tried another user account and it did the same thing

stratosmacker 07-10-2010 10:18 PM

Also when the run (not only run in terminal) option is selected for a test script I made, it does not work.

jmc1987 07-10-2010 10:41 PM

Why don't you open a terminal and run the script there. or if you want you can use the 2> to see if it puts in error in a file. something like this run /path/to/script 2> /home/youraccount/errorlog But if you just use the terminal to execute it you should see the out put there.

stratosmacker 07-10-2010 11:59 PM

o man, rookie mistake. i had a slash after bash in both of the scripts. thread closed

MTK358 07-11-2010 06:44 AM

Quote:

Originally Posted by stratosmacker (Post 4029639)
thread closed

That's not how we do things here.

YOU have to mark the thread as Solved (in Thread Tools).


All times are GMT -5. The time now is 01:55 AM.