Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I've been having an annoying problem upon logging out of virtual terminals: I always get redirected to tty7, or the gdm login screen, and I would much rather prefer to remain on the same ttyX.
I've attempted to fit this into /etc/skel/.bash_logout with something like:
Code:
sudo chvt $(echo -n "$(tty)" | tail -c 1)
but it just isn't working. I've made sure that chvt has permission to run without a password (which is another issue: for small scripts in my ~/bin, they still ask for a password), but it seems like something is persistently switching to tty7.
Does anybody have an idea what is causing this behavior?
Hi... Sorry to be a bother, but it isn't working reliably anymore. It will sometimes act as it should, and stay on the
same ttyX, but other times, it jumps back to tty7, or the gdm login screen... Any help would be great.
Edit: There doesn't seem to be any rhyme or reason to when it acts properly or not either... Could this have something to do with X server login preferences???
Hi again. I've at least figured out that whatever is causing this behavior is *usually* being run after ~/.bash_logout.
It is very strange that it only sometimes happens, and seemingly randomly at that... I run Ubuntu 8.10, if that helps.
Is this an X or GDM problem? Is this not something to do with Bash???
I am making progress! And have a psudo-solution. I stopped gdm from being initialized on startup, which seems to have stopped the problem. As I rarely use X-windows anyway, it isn't that big of a deal to just initialize it if I need it. Although, after initializing gdm, the problem returns, and after stopping gdm, the problem persists. So... That is at least where I am at. If anybody knows what things gdm starts and doesn't stop, I would be very grateful. Thanks!!!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.