LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 01-12-2009, 01:46 PM   #1
wilson47
Member
 
Registered: Jan 2009
Posts: 50

Rep: Reputation: 15
Logout from ttyX redirects to gdm login


Hello Everyone,

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?

Thanks!
Glen
 
Old 01-12-2009, 03:22 PM   #2
irishbitte
Senior Member
 
Registered: Oct 2007
Location: Brighton, UK
Distribution: Ubuntu Hardy, Ubuntu Jaunty, Eeebuntu, Debian, SME-Server
Posts: 1,213
Blog Entries: 1

Rep: Reputation: 88
/etc/skel is for new accounts, in order to make this work, you need to amend your ~/.bash_logout file!
 
Old 01-12-2009, 04:51 PM   #3
wilson47
Member
 
Registered: Jan 2009
Posts: 50

Original Poster
Rep: Reputation: 15
Hmm... I tried that before too, and it didn't work reliably. Now it does! Thanks for the kick in the right direction! =)
 
Old 01-12-2009, 07:11 PM   #4
irishbitte
Senior Member
 
Registered: Oct 2007
Location: Brighton, UK
Distribution: Ubuntu Hardy, Ubuntu Jaunty, Eeebuntu, Debian, SME-Server
Posts: 1,213
Blog Entries: 1

Rep: Reputation: 88
No probs, glad to be of service!!

BTW, you might wanna remove that line from the /etc/skel file unless you want all new users to be able to use this "extra" functionality!

Last edited by irishbitte; 01-12-2009 at 07:13 PM.
 
Old 01-13-2009, 08:14 AM   #5
wilson47
Member
 
Registered: Jan 2009
Posts: 50

Original Poster
Rep: Reputation: 15
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???

Last edited by wilson47; 01-13-2009 at 08:28 AM.
 
Old 01-13-2009, 04:48 PM   #6
wilson47
Member
 
Registered: Jan 2009
Posts: 50

Original Poster
Rep: Reputation: 15
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???
 
Old 01-14-2009, 03:09 PM   #7
wilson47
Member
 
Registered: Jan 2009
Posts: 50

Original Poster
Rep: Reputation: 15
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!!!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
GDM: Access login credentials after login elchupanebre Linux - Desktop 5 10-30-2008 04:53 AM
Run Script on GDM Logout? '58LesPaul Linux - Desktop 4 04-11-2008 09:13 PM
How to execute some command on GDM Login and Logout? jabran Linux - Desktop 2 08-24-2006 10:55 AM
Where is my gps (dev/ttyX , dev/usb/ttyX)??? alek66 Linux - Hardware 1 04-12-2006 10:54 AM
Lose IP when logout (in) through gdm wmcase Linux - Networking 0 11-18-2004 03:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration