You are not logged in.
Pages: 1
I am trying to make a launcher on my desktop to run a bash script but I can't seem to get it to work. In the "command" line I put the path to the script and I have tried running it in the terminal and not in the teminal but it fails to run.
I am sure this is an easy fix but I can't seem to find it. If anyone would point me in the right direction it would be greatly appreciated.
xfce 4.8.0
Arch Linux
Offline
Hmm, without the actual commands, scripts and errors it might be a little difficult to solve your problem. Only general thing I think of, is your script executable? You can set this in the terminal by typing chmod +x yourfile.sh, or in a graphical way - Right click file -> Properties -> Tab "Permissions" -> Check box "Allow this file to run as a program".
Last edited by Ailurus (2011-06-08 09:13:20)
Offline
my script is executible. I can run it from the terminal if i cd to the directory and run ./script.sh fine and I can also double click on the script in thunar and it runs properly. The error I get says Failed to run "CRONoMeter.desktop" - Failed to execute child process "/home/xcrx/cronometer/cronometer.sh". I have also tried /home/xcrx/cronometer/./cronometer.sh which brings up the terminal and closes it immediatly. I searched around for a hour last night but I couldn't seem to find anything.
I have pasted the script code below I am not sure if you need it.
#!/bin/sh
cd "CRONoMeter.app/Contents/Resources/Java/"
java -cp cronometer.jar:jcommon-1.0.10.jar:jfreechart-1.0.6.jar:swingx-0.9.3.jar:cronometer.jar:usda_sr23.jar:crdb_005.jar:docs.jar ca.spaz.cron.CRONOMETER
Offline
I can run it from the terminal if i cd to the directory and run ./script.sh fine and I can also double click on the script in thunar and it runs properly.
That's good as it sounds like it is just the launcher command with the problem. What OS are you using? In Arch it is called "terminal" in Ubuntu it is "xfce4-terminal". From personal experience I've found the flags -H -x are best for keeping the terminal open and executing a command which would follow with a space and without quotes after -x.
Try using the full path to the script within the launcher command. An example for Ubuntu if the directory is within your home folder:
xfce4-terminal -H -x /home/<username>/CRONoMeter.app/Contents/Resources/Java/script.sh
Good luck with it and let me know if you get any problems and I'll try to help.
Last edited by phrac (2011-06-08 23:45:59)
Offline
That did it!
Thank you for the help. I will keep those flags in mind. I am sure I will need them again.
Offline
Hey, your welcome! Works well with custom menus and stuff too.
Offline
Pages: 1
[ Generated in 0.011 seconds, 7 queries executed - Memory usage: 533.13 KiB (Peak: 533.75 KiB) ]