There are plenty of remote control software solutions for Linux and plenty of them allow for administration of the console session. In Windows we would refer to this as "Session 0" or the native desktop interface that a user would normally need to be physically present at a keyboard and monitor connected to that computer or server in order to see. TeamViewer is another "remote control software". Conveniently the TeamViewer development team has made TeamViewer available for Windows, Mac, and Linux.

This tutorial will assist in configuring your machine to auto-start TeamViewer before a session has been initiated so that the user is able to initiate the login of any user allowed to login to the system.

Like remote control software is that it does not require that a firewall be configured to explicitly be forwarded to the desktop in question. This comes in handy when using managing multiple desktops connected to a single Internet connection and single port socket connections are not an option, or when the user in question is capable of using or managing their desktop but does not understand networking or the idea of DDNS services. TeamViewer only runs once a desktop session has been initiated by default. This is a problem for a shared computer (once a user is logged in TeamViewer is locked into that user's session, logging out would close TeamViewer and no one would be able to connect until it was reinitialized).

The things you will need before starting:

  • Access to a Linux Desktop (preferably Ubuntu, Debian, SUSE, Red Hat, CentOS, or Fedora Linux).
  • Access to the root account or an account with sudo access.


  1. Log in as either root or a user with sudo access.
  2. Navigate to and download the appropriate version of TeamViewer for your Linux Distribution.
  3. Install the TeamViewer software.
    Debian, Ubuntu, SUSE: sudo dpkg -i teamviewer_linux.deb or teamviewer_linux_x64.deb
    RedHat, CentOS, Fedora: rpm -i teamviewer_linux.rpm
  4. Once installed run TeamViewer and choose from the Menu option Extras > Options
  5. Checkmark the Box "Start TeamViewer with system".
  6. Please take note of the TeamViewer ID or assign this TeamViewer installation to an account.
  7. Set a Person password (for unattended access).
  8. Then open a terminal in order to modify the file needed to initiate TeamViewer on startup.
    Assuming you use vi as your text editor:
    sudo vi /etc/rc.local
    By default this document does nothing, we will add a line of code above the last line that says:
    exit 0
    In this instance I am using TeamViewer 9 so my line will look like this:
    /opt/teamviewer9/tv_bin/script/teamviewer &
  9. Save and close the file.
  10. Reboot the computer.

Once the computer is restarted attempt to connect from another computer or "Smart device" using the TeamViewer ID which is autogenerated by TeamViewer when it was installed. If successful, you will be presented with your chosen login screen.