1

In the Ubuntu-based systems, from the desktop environment, it is possible to open several tabs from the terminal emulator without making a login every time: the user is already logged in for every tab (usually each tab corresponds to a /dev/pts/x device).

By pressing Ctrl+Alt+F1 ... F6 it is possible to access a tty which is a fully-textual and full-screen terminal. But in contrast with the graphic terminal emulator tabs, a new login is required every time and for each new tty.

Is there a way to avoid this? I would like to be already logged in when I press Ctrl+Alt+F1 ... F6, when I access those text-terminals from the graphic environment (where I logged in!).

  • 1
    please refer here – Ravan Aug 25 '15 at 10:32
  • 1
    The problem is that the X session you're logged into runs on top of a virtual terminal as well (to be precise on tty7), so technically the login is "valid" only for tty7. One way (which has very obvious security issues) would be to setup the other ttys to auto-login as a specific user and set the tty themselves so that they won't ask for a password to let an user log in, which can be done. However would it be enough just set the ttys to auto-login as a specific user? That would be more safe, and you'd have to type only the password. – kos Aug 25 '15 at 10:55
  • @Ravan thank you, it is slightly different from what I need, but useful as well. – BowPark Aug 25 '15 at 14:37
  • @kos thank you for your explanation. I would choose the second solution. For my security purposes, it would certainly be enough to set one or more tty auto-login as a user (so that I just should type a password); how is it possible? – BowPark Aug 25 '15 at 14:38
  • 1
    I'm not even sure why I posted that link, the idea was that since you didn't specify a Ubuntu version perhaps a method for systemd would have been useful... But that's still for init, so I need a pair of glasses. – kos Mar 31 '16 at 14:51
1

Ubuntu by default uses agetty to manange TTYs. The man page for that defines -a, --autologin username options for logging in a specified username automatically. Thus one can do the following:

  1. Open with root permissions /etc/init/tty1.conf file in your favorite text editor. I'm doing sudo vim /etc/init/tty1.conf but you can use pkexec gedit /etc/init/tty1.conf

  2. Alter the default line exec /sbin/getty -8 38400 tty2 to exec /sbin/getty --autologin myUserName -8 38400 tty2.

  3. Save and exit. Repeat for other tty files as necessary

Note that for single-user system this is appropriate, but not recommended when you have multiple users ( for obvious privacy reasons )

  • Thank you. It works. Rightly, you suggest to use it just in a single-user system. But is there a way to run this automatic login only after a successful GUI login? That is: I login in the GUI with user myuser, then I press Ctrl+Alt+F1 to open /dev/tty1 and myuser is automatically logged in tty1. If I open tty1 before any login in the system with myuser, tty1 will request a login as in the default configuration. Is there a way to achieve this? If you think it is too long to discuss here, I could open another question. – BowPark Mar 31 '16 at 14:26
  • 1
    @BowPark there may be a way, but I am not entirely positive - I've an untested idea, so once I have it tested, I will let you know – Sergiy Kolodyazhnyy Apr 1 '16 at 22:43
1

See man screen, it says, in part:

DESCRIPTION
       Screen  is  a  full-screen  window  manager that multiplexes a physical
       terminal between  several  processes  (typically  interactive  shells).
       Each  virtual  terminal  provides the functions of a DEC VT100 terminal
       and, in addition, several control functions from the ISO 6429 (ECMA 48,
       ANSI X3.64) and ISO 2022 standards (e.g. insert/delete line and support
       for multiple character sets).  There is a scrollback history buffer for
       each virtual terminal and a copy-and-paste mechanism that allows moving
       text regions between windows.

I use it on CTRLAltFn screens all the time

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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