Command to open lxterminal and keep it open

New to Debian (Or Linux in general)? Ask your questions here!

Command to open lxterminal and keep it open

Postby THX1138b » 2018-06-16 14:46

I can use the following command to open a script in lxterminal on my Raspberry Pi 3 B running Raspbian Stretch. The window opens briefly and then closes but I know that the script continues to run in the background because my script continues to send me e-mail notifications. How do I stop the window from closing immediately after opening? I read somewhere that the solution is to use an ampersand & at the end of the line but this does not help. It does the same thing with the ampersand as without.

Code: Select all
lxterminal -e bash /home/pi/Mining/tmuxScript.sh
antiX 16, Wyse V90L thin client with VIA Eden 32-bit 800 MHz CPU and 1 GB 533 MHz DDR2
Raspberry Pi 3 B and 3 B+, both running Raspbian Stretch

We don't inherit the Earth from our parents; we borrow it from our children.
THX1138b
 
Posts: 32
Joined: 2017-09-12 20:57

Re: Command to open lxterminal and keep it open

Postby kevinthefixer » 2018-06-16 17:25

Have you tried a different terminal?
kevinthefixer
 
Posts: 55
Joined: 2018-05-05 22:30

Re: Command to open lxterminal and keep it open

Postby tynman » 2018-06-17 01:27

Whether or not the terminal closes after running the tmuxScript.sh script depends on what's in the tmuxScript.sh script. But the normal behavior (when you ask a terminal to start a shell to run a script that way) is to execute whatever is in the script and then the terminal window closes.

I'm not familiar with lxterminal, but it's working the same as any of the terminal programs I've used over the years.
tynman
 
Posts: 74
Joined: 2016-05-03 19:48
Location: British Columbia, Canada

Re: Command to open lxterminal and keep it open

Postby THX1138b » 2018-06-17 02:37

The solution was
Code: Select all
lxterminal --geometry=126x45 -e tmux && /home/pi/Mining/tmuxScript.sh


This functioned as expected.
antiX 16, Wyse V90L thin client with VIA Eden 32-bit 800 MHz CPU and 1 GB 533 MHz DDR2
Raspberry Pi 3 B and 3 B+, both running Raspbian Stretch

We don't inherit the Earth from our parents; we borrow it from our children.
THX1138b
 
Posts: 32
Joined: 2017-09-12 20:57

Re: Command to open lxterminal and keep it open

Postby debiman » 2018-06-17 07:01

Code: Select all
lxterminal -e bash '/home/pi/Mining/tmuxScript.sh;read'
User avatar
debiman
 
Posts: 2499
Joined: 2013-03-12 07:18


Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 5 guests

fashionable