![]() |
|
|||||||
| General Help All your general support questions for Ubuntu, Kubuntu, Edubuntu, Xubuntu and Lubuntu. |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Dipped in Ubuntu
![]() Join Date: Mar 2007
Beans: 597
|
How to execute bash script from menu?
Hi,
in Ubuntu 8.04 I would like to create menu shortcut to execute bash script file. Let just very simplify example. I have created file.sh where there is only one command: echo "This is echo" I have given privileges: chmod 777 file.sh And put the command into menu: System | Preferences | Main menu. I typed in Command field: /home/myuser/file.sh > /home/myuser/file.log I tried Application and also "Application in Terminal". But there was no message in file.log file. I have also tried: /home/myuser/file.sh 2> /home/myuser/file.log (note 2> to put only error messages into log file). And there is no message in file.log. I don't understand how "menu" works. Is there any tutorial I could read more about how to set settings in "Main menu"? Is there any simple way of entering bash script to menu? Thanks, Abcuser Last edited by abcuser; August 28th, 2008 at 09:36 AM.. |
|
|
|
|
|
#2 | |
|
Fresh Brewed Ubuntu
![]() Join Date: Sep 2007
Location: Masschusetts
Beans: 1,510
Ubuntu 9.04 Jaunty Jackalope
|
Re: How to execute bash script from menu?
Quote:
__________________
Registered Linux User: 482377 MacBook (1,1) - OS X Leopard ASUS P5LD2 - Core 2 Duo 3.0GHz - 2GB Corsair RAM - Nvidia 8800GT - Ubuntu 9.04 / Windows 7 Professional |
|
|
|
|
|
|
#3 |
|
Dipped in Ubuntu
![]() Join Date: Mar 2007
Beans: 597
|
Re: How to execute bash script from menu?
Hi,
thank you very much. In bash file has to be the following command: /home/myuser/file.sh And inside file.sh: echo "This is echo" > /home/myuser/file.txt Thanks a lot, Abcuser |
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|