View Single Post
willi_iam's Avatar
Posts: 27 | Thanked: 20 times | Joined on Jun 2010 @ Cologne
#10
oA simple script could look like this:

Code:
#!/bin/sh
command1
command2
or in your case (if the commands are correct an you know what you're doing ):
Code:
#!/bin/sh
cp -r /home/user/MyDocs/rtcom-messaging-ui.launch /usr/bin/ && killall rtcom-messaging-ui
just use a text editor and save the file e.g. in /home/user/bin (thats where i save my scripts) or any directory you want...
Then you have to make it executable:
Code:
chmod u+x /home/user/bin/$filename
in xterm, where '/home/user/bin' is the path where the file is saved and ''$filename" is the name you choosed.

Then the exec-line in .desktop-file should look like this:
Code:
Exec=osso-xterm -e "sudo /home/user/bin/$filename"
so the script is executed as 'root'

In advance you can check if the script is working via:
Code:
/home/user/bin/$filename
in xterm...
__________________
Everything is a file and if it's not, it should be!
 

The Following User Says Thank You to willi_iam For This Useful Post: