[xubuntu-users] Script problem

Joshua O'Leary jmoey139 at gmail.com
Mon Oct 28 19:22:26 UTC 2013


Add something like this to the start of the shell script, immediately 
after #!/bin/bash (or sh):

tty -s; if [ "$?" != 0 ]; then xfce4-terminal -e "$0"; exit; fi

If you want the script to be more compatible with other systems, change 
xfce4-terminal to x-terminal-emulator or just xterm.

Joshua

On 28/10/13 09:14, Giovanni Ortosecco wrote:
> Dear List,
>
> in Xubuntu 12.04 (but also on Lubuntu 12.04 and 13.04) when I launch a script .
> sh (with permissions to run correctly set) I get a normal screen message "Run
> in Terminal", but when I click on this nothing happens.
> Everything works correctly, however, if I click the right button on the icon
> of the script and then I click on "Run with > XTerm".
> In practice XTerm makes me run the script, but the default terminal no.
>
> Do you have suggestions?
> Thanks to all.
>
> Best regards,
> Giovanni
> --
> Inviata da:
> Ubuntu 12.04 LTS "Precise Pangolin"
> Mozilla Thunderbird
> Usa software libero!
>





More information about the xubuntu-users mailing list