I want to auto-launch a terminal and execute a command ls-l.
I did some research, and some said it's done by putting
Code: Select all
gnome-terminal --tab -e "ls-l" --tab --tab
Code: Select all
gnome-terminal --tab -e "ls-l" --tab --tab
Code: Select all
lxterminalCode: Select all
sudo apt-get install xtermCode: Select all
mkdir -p ~/.config/autostartCode: Select all
[Desktop Entry]
Encoding=UTF-8
Name=Terminal autostart
Comment=Start a terminal and list directory
Exec=/usr/bin/lxterm -e 'ls -l | less'Code: Select all
[Desktop Entry]
Encoding=UTF-8
Name=Terminal autostart
Comment=Start a terminal and list directory
Exec=/usr/bin/lxterm -e 'cd /home/pi/Dropbox/PI'
Exec=/usr/bin/lxterm -e './ProgramName'And you always replied: "Use -hold option". And then everybody was happy...People were always asking "How do I make it stay open after it has run my command, so that I can see the output before the window closes?"
. I would also like to know how to do this.Thanks for the post I use it to start a program in terminal when when I power up the PI. I have a question though. Is it possible to enter two commands back to back? I need to change the current directory a folder before running my program. The program creates file in the wrong directory if I don't change it first
Code: Select all
/usr/bin/xterm -e sudo path/to/executable
lxterminal -e sudo path/to/executable