[kde-linux] making shell file clickable

Sylviane et Perry White spwhite at freesurf.ch
Mon Dec 5 16:11:02 UTC 2005


On Monday 05 December 2005 16:01, Vytautas wrote:
> If it does not have first line #!/bin/sh it will hardly be executable.
I had tried with #!sh and after your answer, tried again with #!/bin/sh

On Monday 05 December 2005 06:27, Morten O. Hansen wrote:
> Hm, it works here. All I did was create a file named "create_file.sh" and
> did a "chmod +x create_file.sh" (the file contents was 'echo hello >
> newfile')
>
> If I click it in konqueror, it creates a new file.
I made it executable from the properties editor but "newfile" was only created 
if I launched the script from a shell.


On Monday 05 December 2005 10:21, Kevin Krammer wrote:
> > > If the script is executable it should also be executed when being
> > > clicked on.
> >
> > Nothing happens
>
> This is a bit vague.
> If you have some debug output in your script, for example
> echo "script started" >> /tmp/script.txt
>
> Does it write it to the target file?
No, see above.
> > I must know where my app resides, will try to find out when first part of
> > problem is solved.
>
> Script parameter 0 usually contains script name and the path it was invoked
> with.
What I need to know is not where the link to application is but where the 
application itself is (along with the needed libraries).
> Can you attach the script?
> Maybe you are assuming something like PATH including a certain directory
> added to it in .bashrc, etc
Here it is:
	#!/bin/sh
	echo "script started" >> script.txt	
	LD_LIBRARY_PATH=./lib
	export LD_LIBRARY_PATH
	./sudoku

To sum it up issuing from a shell: "./test_shell_launcher.sh"
creates the file script.txt and causes a sudoku grid to appear on the screen.
Clicking only produces a short hard disk activity.

P.S.   Perhaps at this point it is relevant to add   (?)
Konqueror 3.0.4 (using KDE 3.4.0 Level "b" SUSE 9.3)


Thank you all for answers      Perry



More information about the kde-linux mailing list