1

I'm trying to circumvent the absence of desktop shortcuts in Gnome by running the script from GUI through an explicitly launched instance of konsole:

#!/usr/bin/sh 

set -x
konsole --hold -e echo test

When I test this in terminal, the command is printed in the window I launched the script from:

[zorath@localhost sav]$  ./test.sh 
+ konsole --hold -e echo test

When I launch it from GUI, the '+' line is swallowed. Is there a trick to have the command printed in the new window, along with the script output?

0

Instead of running echo test in the shell started by konsole, start a shell with tracing turned on, and run echo test in that:

konsole --hold -e sh -x -c 'echo test'

Depending on how konsole handles the argument to -e (I don't have konsole installed to test), you may have to use

konsole --hold -e "sh -x -c 'echo test'"
  • Looks like konsole handles it exactly the way you expected. Command echo is visible now. Thanks, man. – sigil Sep 14 at 13:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.