Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Have to log out of a virtual terminal twice in order to exit virtual terminals Post 302397101 by Narnie on Saturday 20th of February 2010 11:08:02 PM
Old 02-21-2010
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

 

9 More Discussions You Might Find Interesting

1. AIX

how to create virtual terminals

Hello All! I want to know how to create virtual terminals in aix. As in Linux, simply by using Ctl-Alt-F1-F6 keys, i can switch to any of the 6 corresponding virtual terminals. But i dont know how to do that in AIX. Also if I access an AIX server through remote desktop, will the method to create... (0 Replies)
Discussion started by: Anubhuti
0 Replies

2. UNIX for Advanced & Expert Users

Differentiating between Virtual and non Virtual IP addresses

Hello, I would like to know if there is a command or any configuration file to find and differentiate the Virtual IP Addresses (of the Cluster Resource Group) and the IP Address of the Cluster Node. I observe that the ifconfig -a command returns all the IP addresses configured on the ... (1 Reply)
Discussion started by: vineetd
1 Replies

3. UNIX for Dummies Questions & Answers

Need to check all virtual hostnames/virtual IP's

Hi Folks, I want to check all the virtual hostname's/IP's of a host/ip. Currently we are using HP-UX and open SuSe. Please tell me the command to list out all virtual names of a particular host. many thanks in advance. (2 Replies)
Discussion started by: sai21
2 Replies

4. Solaris

Is there any Virtual data center as we have Virtual Machine?

Do we have any Virtual Data Center software as we have Virtual Machine? I want to practice everything of Solaris practically but i don't have resources like data center which includes Servers, Data storages, switches, and other things. (2 Replies)
Discussion started by: karman0931
2 Replies

5. AIX

How to open multiple virtual terminals to a single LPAR

I just wondering if there are ways to open multiple virtual terminal to a single LPAR. After I have use putty to login to the VIOS. I will use mkvt -id <LPAR id> to open console but if my friend want to open 2 second one, it will say, VT already connected. IS there a way to work this around ? ... (1 Reply)
Discussion started by: wingcross
1 Replies

6. Solaris

Change hostID of Solaris 10 virtual/guest machine installed by Virtual Box 4.1.12 on Windows-XP host

Trying to set or modify the randomly set hostID of a Solaris 10 virtual/guest machine that I installed on a Windows-XP host machine (using Virtual Box 4.1.12). I was able to set/modify the hostname of the Solaris 10 virtual/guest machine during installation as well as via the Virtual Box... (4 Replies)
Discussion started by: Matt_VB
4 Replies

7. Shell Programming and Scripting

Displaying Formatted Text on Virtual Terminal

Hi, I'm working on a project that requires formatted text to be displayed on the screen plugged into a Linux machine. I want to be able to control this text via a bash script and format it in a particular font and size. Changing the background colour would also be beneficial. Does anyone know... (3 Replies)
Discussion started by: lcoor65
3 Replies

8. UNIX for Beginners Questions & Answers

Providing virtual machine priority in kvm based virtual machines

Hi All, Is there any way I can prioritize my VMs when there is resource crunch in host machine so that some VMs will be allocated more vcpu, more memory than other VMs in kvm/qemu hypervisor based virtual machines? Lets say in my cloud environment my Ubuntu 16 compute hosts are running some... (0 Replies)
Discussion started by: SanjayK
0 Replies

9. Solaris

Virtual Terminal (Console) showing non-global zone?

Hope that everyone is doing well today. Happy Friday. I am running an illumos (opensolaris) based system which is like SmartOS, OmniOS, and OpenIndiana I have been searching all over the Internet into various documents and forms that have to do with Solaris, Opensolaris, Illumos, and SmartOS... (3 Replies)
Discussion started by: LonnieTC
3 Replies
getty(1M)                                                 System Administration Commands                                                 getty(1M)

NAME
getty - set terminal type, modes, speed, and line discipline SYNOPSIS
/usr/lib/saf/ttymon [-h] [-t timeout] line [ speed [ type [linedisc]]] /usr/lib/saf/ttymon -c file DESCRIPTION
getty sets terminal type, modes, speed, and line discipline. getty is a symbolic link to /usr/lib/saf/ttymon. It is included for compati- bility with previous releases for the few applications that still call getty directly. getty can only be executed by the super-user, (a process with the user ID root). Initially getty prints the login prompt, waits for the user's login name, and then invokes the login command. getty attempts to adapt the system to the terminal speed by using the options and arguments specified on the command line. Without optional arguments, getty specifies the following: The speed of the interface is set to 300 baud, either parity is allowed, NEW- LINE characters are converted to carriage return-line feed, and tab expansion is performed on the standard output. getty types the login prompt before reading the user's name a character at a time. If a null character (or framing error) is received, it is assumed to be the result of the user pressing the BREAK key. This will cause getty to attempt the next speed in the series. The series that getty tries is determined by what it finds in /etc/ttydefs . OPTIONS
The following options are supported: -h If the -h flag is not set, a hangup will be forced by setting the speed to zero before setting the speed to the default or a specified speed. -t timeout Specifies that getty should exit if the open on the line succeeds and no one types anything in timeout seconds. -c file The -c option is no longer supported. Instead use /usr/sbin/sttydefs -l to list the contents of the /etc/ttydefs file and perform a validity check on the file. OPERANDS
The following operands are supported: line The name of a TTY line in /dev to which getty is to attach itself. getty uses this string as the name of a file in the /dev directory to open for reading and writing. speed The speed argument is a label to a speed and TTY definition in the file /etc/ttydefs. This definition tells getty at what speed to run initially, what the initial TTY settings are, and what speed to try next, (should the user press the BREAK key to indicate that the speed is inappropriate). The default speed is 300 baud. type and linedisc These options are obsolete and will be ignored. FILES
/etc/ttydefs ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsr | +-----------------------------+-----------------------------+ SEE ALSO
ct(1C), login(1), sttydefs(1M), ttymon(1M), ioctl(2), attributes(5), tty(7D) SunOS 5.10 14 Sep 1992 getty(1M)
All times are GMT -4. The time now is 12:35 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy