ego
ego copied to clipboard
ego kills terminal
Hi!
I start a second user session like this, on Fedora 35:
ego -u guest --sudo gnome-terminal
Works mostly fine (beside that the audio forwarding does not work reliably, but I can live with that).
From the gnome-terminal I then start other software, e.g. google-chrome, etc.
Now, I had the effect always, but lately, it has gone from seldom to almost daily, that the gnome-terminal dies at some point, taking with it all started programs.
More funny is that the terminal tab of the host account where I launched ego is also gone.
I can understand that the “child programs” get terminated for whatever reason, but I personallly do not understand the mechanism how the terminal that ego was started in gets killed?
More funny is that the terminal tab of the host account where I launched ego is also gone.
Huh... You launch a shell (bash?) in the terminal, then call ego
from the shell? Yeah, if ego dies, it should drop you back into the shell.
Can you see anything in your logs (journalctl etc) that might indicate the reason for this?
I'll watch out for it the next time, especially if I notice it timely.
And yes I launch it to be precise: gnome-terminal in my main account -> bash -> shell script that contains the commands mentioned above (run by bash)
And yes, the tab in the main gnome-terminal is gone, and if other processes (e.g. my openvpn connection) were running in that bash, they are also gone.
Am Do., 26. Mai 2022 um 14:24 Uhr schrieb Marti Raudsepp < @.***>:
More funny is that the terminal tab of the host account where I launched ego is also gone.
Huh... You launch a shell (bash?) in the terminal, then call ego from the shell? Yeah, if ego dies, it should drop you back into the shell.
Can you see anything in your logs (journalctl etc) that might indicate the reason for this?
— Reply to this email directly, view it on GitHub https://github.com/intgr/ego/issues/91#issuecomment-1138522557, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAH5B3H537OP4GC72MCKIYLVL5UPRANCNFSM5XBABDYQ . You are receiving this because you authored the thread.Message ID: @.***>
For anyone else running into this, this appears to be an interaction between specifically gnome-terminal
and the way that ego
determines when to exit. (I've encountered the same issue with gnome-terminal
and xpra
with xpra's --exit-with-child
mode, so it may not be something that ego
can reasonably deal with.)
When run from the command-line, gnome-terminal
starts a terminal process in the background, disowns it, and then returns to the caller; ego
then sees that the command has completed, and I assume that it tears down the session, killing the background terminal process and any other processes that you've started.
It appears that this behavior can be changed in gnome-terminal
using the --wait
CLI argument, which makes the gnome-terminal
command wait to exit until the terminal itself has closed.
The simple fix is to launch gnome-terminal with ego gnome-terminal --wait
, or to run ego bash
and then launch gnome-terminal from there, making sure not to exit the local bash shell.
For anyone else running into this, this appears to be an interaction between specifically
gnome-terminal
and the way thatego
determines when to exit. (I've encountered the same issue withgnome-terminal
andxpra
with xpra's--exit-with-child
mode, so it may not be something thatego
can reasonably deal with.)
This is plausible, I have not witnessed this yet since I switched to KDE and thus konsole as my terminal application.
The simple fix is to launch gnome-terminal with
ego gnome-terminal --wait
, or to runego bash
and then launch gnome-terminal from there, making sure not to exit the local bash shell.
I haven't tried this, but yes, in the past I have observed that ego bash
seemed to have helped.