Hello,
How can i run bash/sh script from desktop with my mouse and double click ? Doesn't work with a launcher too.
thx u,
ad.
run bash/sh from desktop (double click)
-
- Posts: 24
- Joined: Sun Sep 11, 2011 3:19 am
Re: run bash/sh from desktop (double click)
Try creating a .desktop file for your script.
What OS are you using?
What OS are you using?
-
- Posts: 34
- Joined: Sat Sep 10, 2011 11:31 am
Re: run bash/sh from desktop (double click)
Create a script_name.desktop file. Inside this file write:
the most importatnt part is exec, the name and icon parts are irrelevant (i think;p).
Code: Select all
[Desktop Entry]
Type=Application
Icon=script_icon_name
Name=script_name
GenericName=script_name
Exec=lxterminal --working-directory=/path/to/your/script/directory -e ./your_script.sh
StartupNotify=true
Terminal=true
Re: run bash/sh from desktop (double click)
thx u, works fine
-
- Posts: 34
- Joined: Sat Sep 10, 2011 11:31 am
Re: run bash/sh from desktop (double click)
You're welcome. Please mark topic as solved.
Re: run bash/sh from desktop (double click)
Following the above example I created a script (/home/knoppix/test2.sh) which reads...LXNevermind wrote:Create a script_name.desktop file. Inside this file write:
the most importatnt part is exec, the name and icon parts are irrelevant (i think;p).Code: Select all
[Desktop Entry] Type=Application Icon=script_icon_name Name=script_name GenericName=script_name Exec=lxterminal --working-directory=/path/to/your/script/directory -e ./your_script.sh StartupNotify=true Terminal=true
Code: Select all
#!/bin/bash
less /home/knoppix/result.txt
Code: Select all
[Desktop Entry]
Type=Applicatiom
Name=test1
Exec=lxterminal --working-directory=/home/knoppix -e ./home/knoppix/test2.sh
Icon=/usr/share/pixmaps/xscreensaver.xpm
GenericName=test1
Terminal=true
StartupNotify=true
Thanks.