4

I am trying to connect a serial (dumb) terminal to my ubuntu 16.04LTS system. There are some how-to's around, but I have problems with them . What I need is a "simple" logon message on the serial terminal - after all UNIXoids are multi-user-systems. One of the suggestions even led to a dead system, requiring a re-install.

GtkTerm using /dev/ttyS0 connects OK to the terminal, i.e. typing text on the serial terminal and reading it on GtkTerm works OK as well typing on the Gtk and reading on the dumb terminal - so the connection is set-up basically OK.

I read "https://help.ubuntu.com/community/SerialConsoleHowto", but I am not sure which portions I need when I need an additional "login" screen on the dumb terminal, "only".

For the above text, I set-up the file for ttyS0 as mentioned but I am facing issues when entering sudo start ttyS0:

start: Connection to upstart not possible: Failed to connect to socket /com/ubuntu/upstart: connection set-up rejected."

The user is member of these groups: uucp dialout cdrom sudo dip plugdev lpadmin sambashare

I don't want to tamper with GRUB etc, I just need an Ubuntu login-screen, like the ones you see when typing e.g. CTRL-ALT 1..6, only on the serial dumb terminal.

Any advice pointing me in the right direction will be highly appreciated

4
  • Can you confirm that when you run /sbin/getty -L 115200 ttyS0 vt102 in a terminal, things work as expected? If so, then the issue is only how to execute this same statement on startup of the computer. The instructions you link to (where I suppose you have followed the two steps for "Karmic and newer"), are somewhat outdated. Upstart has been superseded by systemd.
    – zwets
    Oct 30, 2016 at 20:11
  • As my terminal makes 38400 only I slightly modified the command a bit to make is compatible:
    – Markus
    Oct 31, 2016 at 4:00
  • Thanks for the hint ! I tried the command you mentioned, modified it a bit to suit my terminal : /sbin/getty -L 38400 ttyS0 vt100 in a terminal window and got no reply after some time. But (!!!) when using "sudo" with the command it works ! (So the missing "sudo" at this point it was my fault.) Where do I have to put that command to have the dumb terminal available immediately after startup ? There is no inittab file. Thanks !
    – Markus
    Oct 31, 2016 at 4:08
  • See the answer below.
    – zwets
    Oct 31, 2016 at 22:07

1 Answer 1

3

The SerialConsoleHowto you link to has become outdated with the replacement of upstart by systemd. The error you see is emitted by the upstart backward compatibility layer.

Systemd has a service called serial-getty which does precisely what you need. Its service definition at /lib/systemd/system/serial-getty@.service references man systemd-getty-generator and this documentation, according to which all you need to do is add a kernel parameter console=ttyS0.

If this works as advertised (I cannot test this on my machine), please consider updating the SerialConsoleHowto to include this information in a section for "Xenial and later".

2
  • Hi Zanna and Zwets, sorry for the delay. Zwets, I followed your instructions and especially the information given under the link "this documentation". And - viola ! It worked and the settings even survived system reboots. I will update the SerialConsoleHowTo Document asap as per your wish. Many thanks again for your advice to both of you ! Yours Markus
    – Markus
    Nov 2, 2016 at 8:50
  • @Markus , Could you set this answer as the accepted as it solves the problem. See askubuntu.com/help/someone-answers
    – user.dz
    May 9, 2019 at 3:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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