Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Is there a way to login certain (or all) ttys after logging into one? I don't want auto-login because I still want to login once (for security). I've looked into things like "screen" but they are rather cumbersome and don't work with some programs (e.g. fbgs). Is there a command to simulate logging in to other ttys?

EDIT:

If anyone else has the same question, I ended up disabling tty 2-6 by removing the getty startup entry for it. Here is how I did it (works for Ubuntu 9.10 and up):

  • Remove the ttys from the console setup file :

sudo vim /etc/default/console-setup (Change ACTIVE_CONSOLES=/dev/tty[1-x] where x is the number of terminals you want; just have 1 for one terminal)

Now, go through the ttys you don't want and either move them to a backup or delete them. For example:

sudo mv /etc/init/tty6.conf /etc/init/tty6.conf.backup

After a reboot, the getty processes don't exist. Now, I just login once and then run openvt to open a new tty without logging in again.

share|improve this question
1  
tmux or screen have the great advantage that you can reconnect to your running sessions or logout and leave the programs running. Question is, whether using framebuffer apps instead of X11 is really worth the hassle with a rather heavily non-standard workflow (locking ttys is a bit cumersome too even with vlock). –  peterph Nov 28 '12 at 10:25
    
Thank you for pointing out tmux, I like it better than screens (simply because you can see which "windows" are open). However, I still prefer actually ttys and I think using frame buffers is better if all you want to do is display a single image or view a pdf. vlock seems to work fine for me, and it's really simple. –  Vreality Nov 29 '12 at 0:25
    
ok, I didn't notice, that vlock effectively unlocks all consoles when going back from vlock -a. –  peterph Nov 29 '12 at 12:16
add comment

1 Answer 1

up vote 3 down vote accepted

Not sure what you mean by fbgs or why you say screen is cumbersome. But if by bash ttys you mean Linux virtual consoles, then you open more with the openvt command (formerly known as open).

share|improve this answer
    
you would have to stop any getty variant running that console first. –  peterph Nov 28 '12 at 10:21
2  
@peterph. By default, openvt will use the first free one. But if you want to use a specific one, then yes, you need to make it free first. If you don't want a getty running on some of those, then you'd have to tell your system not to start one in the first place. Killing it won't do as they are configured to respawn when they terminate. –  Stéphane Chazelas Nov 28 '12 at 10:33
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.