Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Command to open lxterminal and keep it open

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
THX1138b
Posts: 35
Joined: 2017-09-12 20:57

Command to open lxterminal and keep it open

#1 Post by THX1138b »

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.

kevinthefixer
Posts: 190
Joined: 2018-05-05 22:30

Re: Command to open lxterminal and keep it open

#2 Post by kevinthefixer »

Have you tried a different terminal?

tynman
Posts: 131
Joined: 2016-05-03 19:48
Location: British Columbia, Canada
Been thanked: 1 time

Re: Command to open lxterminal and keep it open

#3 Post by tynman »

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.

THX1138b
Posts: 35
Joined: 2017-09-12 20:57

Re: Command to open lxterminal and keep it open

#4 Post by THX1138b »

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.

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Command to open lxterminal and keep it open

#5 Post by debiman »

Code: Select all

lxterminal -e bash '/home/pi/Mining/tmuxScript.sh;read'

Post Reply