You are not logged in.
I am configuring a custom submenu and I have all of my programs and scripts organized within the menu system. I have noticed something about the scripts I have created. When I launch the scripts in the menu using the xfce4-terminal -e "/path/to/script" it terminates the window after running the script. If you use the -H feature it HOLD's the window open but never returns you to a command promp. Why on earth is there no feature to execute a command and return to the command prompt... old legacy xterm seems to be more feature rich still... is that my only option?
I would like to be able to say click on my menu items and in the desktop files have exec=xfce4-terminal -H -geometry=<some value> -e "/path/to/script -h or --help" and have it open a terminal menu presenting the user with the help file for the script or executable and then allow them to use the same window because the prompt is there...
Is xterm a better option tha xfce4-terminal for this? If this doesn't exist in xfce can that please be put in as a future feature?
Offline
If you add:
/bin/bash
...(or whatever your shell is) to the end of your script, then use:
xfce4-terminal -e /my/script
...in the .desktop file, the terminal window will stay open.
Example:
/home/toz/Downloads/hello
#!/bin/bash
echo "hello"
/bin/bash
/home/toz/.local/share/applications/hello.desktop
[Desktop Entry]
Name=Hello
Comment=Hello
Exec=xfce4-terminal -e /home/toz/Downloads/hello
Icon=hello
Terminal=false
Type=Application
Categories=Game;
StartupNotify=false
Last edited by ToZ (2014-07-16 18:11:43)
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Awesome, I actually figured that out just before coming back here. Thanks for the reply.
Offline
Another method, if you don't want the shell command at the end of your script in case you run the script manually, is to create the file:
/usr/local/bin/wrap with the content:
#!/bin/bash
$@
/bin/bash
...and make the file executable, then in your .desktop file, use:
Exec=xfce4-terminal -x wrap /home/toz/Downloads/hello
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
[ Generated in 0.007 seconds, 7 queries executed - Memory usage: 533.69 KiB (Peak: 534.53 KiB) ]