Sample Header Ad - 728x90

Opening a terminal other than xterm, running a command on it, and not closing the terminal after it successfully finished

9 votes
2 answers
12397 views
I have the following script in my Arch Linux box: #!/bin/bash xterm -e "sudo pacman -Syu;bash" This will fire up an xterm and run the command sudo pacman -Syu on it. Because of the ;bash part, it will not close the xterm window once the command is finished. This is a command for updating my system and I don't want it to close because I'd like to see the output. Why this will not work with other terminals, and in particular with lxterminal and roxterm (the only others I tried)? The exact same command with lxterminal or roxterm instead of xterm will fire up the terminal and close it immediately after the command is executed.
Asked by geo909 (456 rep)
Sep 17, 2014, 12:16 AM
Last activity: Mar 23, 2018, 11:11 AM