LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 02-20-2010, 11:06 PM   #1
narnie
Member
 
Registered: Jan 2010
Distribution: Linux Mint, Ubuntu Netbook Edition, et al
Posts: 106

Rep: Reputation: 17
Have to log out of a virtual terminal twice in order to exit virtual terminals


Not really a newbie, but I have a strange problem and I'm not sure how to further troubleshoot it.

I have to log out of a virtual terminal by typing exit, then exit again as in:

Code:
woodnt@toshiba-laptop ~ $ exit
logout
woodnt@toshiba-laptop ~ $ exit
logout
I DON'T have to do this when I'm using gnome-terminal or xterm. It just exits.

I do notice that if I have done this in xterm for example:

Code:
woodnt@toshiba-laptop ~ $ bash
woodnt@toshiba-laptop ~ $ bash
woodnt@toshiba-laptop ~ $ exit
exit
woodnt@toshiba-laptop ~ $ exit
exit
woodnt@toshiba-laptop ~ $
It lists exit instead of logout after typing exit.

Now lest one thinks it is that I have typed bash in the vtty, that is not the case. Also, echoing $SHLVL gives:

Code:
woodnt@toshiba-laptop ~ $ echo $SHLVL 
1
so I'm not in subshells.

I have mv ~/.profile ~/.profile.bak and mv ~/.bashrc ~/.bashrc.bak to make sure that it is nothing that I have done.

Other users can log in a vtty and completely exit with one command.

I'm not sure how the vtty's work nor how to begin to toubleshoot this further.

Any ideas?

With thanks,
Narnie

PS

btw, I have also renamed my .bash_logout script as well so it isn't in that. However, one wouldn't think it would be there anyway as I'd never be able to log out.

It is something that is different about a vtty (via getty) vs windowed terminal.

A check of getty process shows:

Code:
woodnt@toshiba-laptop ~ $ ps auxf|grep -v grep|grep tty
root      1245  8.1  3.1 243252 126236 tty7    Ss+  Feb19  11:38      \_ /usr/bin/X :0 -br -verbose -auth /var/run/gdm/auth-for-gdm-QfOGCe/database -nolisten tcp vt7
root      1395  0.0  0.0   5988   492 tty4     Ss+  Feb19   0:00 /sbin/getty -8 38400 tty4
root      1411  0.0  0.0   5988   492 tty5     Ss+  Feb19   0:00 /sbin/getty -8 38400 tty5
root      1441  0.0  0.0   5988   492 tty2     Ss+  Feb19   0:00 /sbin/getty -8 38400 tty2
root      1442  0.0  0.0   5988   492 tty3     Ss+  Feb19   0:00 /sbin/getty -8 38400 tty3
root      1444  0.0  0.0   5988   492 tty6     Ss+  Feb19   0:00 /sbin/getty -8 38400 tty6
root      3968  0.0  0.0   5988   492 tty1     Ss+  Feb19   0:00 /sbin/getty -8 38400 tty1
 
Old 02-20-2010, 11:19 PM   #2
fbsduser
Member
 
Registered: Oct 2009
Distribution: Hackintosh, SlackWare
Posts: 266

Rep: Reputation: 30
VT's are created by getty on /dev/ttyX while xterm's are pseudo-terminal's which are created by X11 on /dev/ptyX.
 
Old 02-21-2010, 12:50 AM   #3
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,563
Blog Entries: 29

Rep: Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179
What does ps -fH show from a virtual terminal? Here's mine (as user c)
Code:
UID        PID  PPID  C STIME TTY          TIME CMD
c         3783     1  0 Feb20 tty2     00:00:00 -bash
c        15221  3783  0 11:19 tty2     00:00:00   ps -fH
 
Old 02-24-2010, 01:22 AM   #4
narnie
Member
 
Registered: Jan 2010
Distribution: Linux Mint, Ubuntu Netbook Edition, et al
Posts: 106

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by catkin View Post
What does ps -fH show from a virtual terminal? Here's mine (as user c)
Code:
UID        PID  PPID  C STIME TTY          TIME CMD
c         3783     1  0 Feb20 tty2     00:00:00 -bash
c        15221  3783  0 11:19 tty2     00:00:00   ps -fH
Mine shows the same as yours.
 
Old 02-24-2010, 01:29 AM   #5
narnie
Member
 
Registered: Jan 2010
Distribution: Linux Mint, Ubuntu Netbook Edition, et al
Posts: 106

Original Poster
Rep: Reputation: 17
Problem tracked down, but not solved.

I have tracked this problem down to a ecrypts issue.

I have a the Private ecrypts directory set up as usual except that I don't like it's automounting behaviour.

The original listing of the dir looks like:

Code:
woodnt@toshiba-laptop ~ $ ls .ecryptfs/
auto-mount   Private.mnt  sig-cache.txt.bak
auto-umount  Private.sig  wrapped-passphrase
I have renamed auto-mount to this, which prevents the auto-mounting of the ecrypts folder, which I manually mount if needed.

Code:
woodnt@toshiba-laptop ~ $ ls .ecryptfs/
NO_auto-mount   Private.mnt  sig-cache.txt.bak
auto-umount  Private.sig  wrapped-passphrase
If have have auto-mount as the original name, then I don't have to log out twice from a vtty. When I have auto-mount renamed so that ecrypt doesn't see it, I have to log out of vtty twice. This is very highly reproducible in that it occurs EVERY time. Also of note, it doesn't really matter if the private dir is "mounted" or not, which caused me to miss this. It is just renaming that one file that breaks it like this.

Anyone have any idea as to a fix?

I'll be posting a bug report in view of this as well.

Thanks,
Narnie
 
Old 02-24-2010, 01:49 AM   #6
narnie
Member
 
Registered: Jan 2010
Distribution: Linux Mint, Ubuntu Netbook Edition, et al
Posts: 106

Original Poster
Rep: Reputation: 17
Bug report link

Here is the bug report link:

https://bugs.launchpad.net/ubuntu/+s...ls/+bug/526868
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Killing the process on a virtual terminal from another virtual terminal. Azazwa Linux - Newbie 8 05-05-2009 01:33 PM
slackware 12 freeze on log out or switch to virtual terminal kentish_lad Slackware 8 10-16-2008 11:19 PM
How I Make More Virtual Terminal Other Than 6 Pre Available Terminals Tauseef Anwar Red Hat 2 05-25-2008 02:37 AM
Strange text in all terminal/virtual terminals/boot. Alias_NeO Linux - Hardware 7 12-20-2006 08:54 AM
log in to virtual terminal when startup yenonn Linux - General 5 06-30-2003 08:06 AM


All times are GMT -5. The time now is 06:11 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration