Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ego kills terminal #91

Open
yacc143 opened this issue May 26, 2022 · 4 comments
Open

ego kills terminal #91

yacc143 opened this issue May 26, 2022 · 4 comments

Comments

@yacc143
Copy link

yacc143 commented May 26, 2022

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?

@intgr
Copy link
Owner

intgr commented May 26, 2022

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?

@yacc143
Copy link
Author

yacc143 commented May 27, 2022 via email

@Aeledfyr
Copy link

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.

@yacc143
Copy link
Author

yacc143 commented Jan 12, 2024

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.)

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 run ego 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants