This article is about providing management via a UI by installing a window manager or desktop environment for servers and establishing a remote connection. A graphical server and desktop environment are not used on remote servers because server resources are usually limited. In this post, I will be working on a remote server with i3, a lightweight window manager. Note: Instead of a remote server, I will prepare a virtual server by giving a random IP on my computer with Vagrant and perform the operations. This is how you can make your first attempts. What's i3 wm? For operating systems based on the Linux kernel, the graphical interface does not directly belong to the operating system. It is a module that connects to the operating system like any application. In this way, a crash on the graphics side does not affect the operating system. It is sufficient to resolve the graphics server error and restart it.” X Window” is a widely used graphics server developed in a very flexible way. Most current and known distributions use Xorg as a graphics server. It contains a "window manager" inside. Its task is to organize operations such as screen layout of windows, adjusting the size, creating virtual desktops. Enlightenment, Blackbox, kwin in KDE and i3, etc… These are examples of window managers. i3 window manager is very light (1.2Mb) and easy to use thanks to keyboard shortcuts. This is an alternative to install on your remote servers that are not very resource-rich. Installing Ubuntu server via vagrant(optional) With Vagrant, you can create a virtual server on VirtualBox and work on this server. After installing the appropriate vagrant version and oracle VirtualBox application for your system, you can create a vagrant box and work as if you were working with a machine with a static IP. Click the link to download vagrant “ ” describe operating systems that are installed and ready to be used. After downloading and creating a vagrant file on , it can be raised with vagrant. vagrant boxes “Vagrant cloud” With vagrant box add or , you can download a new vagrant box from the new cloud. You can check with , create a with , and raise the server with . If different configurations are required, you can create a vagrant file manually and then raise it with . {title} {url} vagrant box list vagrantfile vagrant init vagrant run vagrant up Let's download the ubuntu box, which is in the first place on the cloud. $ vagrant box add ubuntu/trusty64 After checking if it is in the list, let's save the following vagrant file with the name in the directory we are working in. It can then be lifted up . You can send a "shut down" signal to turn it off. Vagrantfile vagrant up vagrant halt NAME = "remote-Server" IP = "192.168.1.XX" Vagrant.configure("2") do |config| config.vm.box = "ubuntu/trusty64" config.vm.hostname = NAME config.vm.network "public_network", ip: IP config.vm.provider "virtualbox" do |vb| vb.customize ["modifyvm", :id, "--memory", '2048'] vb.name='remote-server' end config.vm.provision "shell" do |s| s.inline = "echo Server created succesfully!" end end The IP given here is an IP address in the internal network. The virtual machine is a different computer in the internal network and is connected with a bridge adapter. Select your bridge adapter after the up command. Wifi or ethernet adapter. You can see the hostname and username information, and other information... Once it's up we can connect via ssh. $ ssh vagrant@192.168.1.X and we are inside... password: vagrant Installation of xserver and i3 wm If your server does not have a graphics server on it, it must be installed before i3. You can check it with . It is a shell script that runs . startx xinit and should be installed on Ubuntu. It is available in the Repository. You can install them using the “ ”. You can find x graphics server installations on Centos, OpenSUSE, fedora, or BSD-based systems in user guides, wiki pages, and forums. (StackOverflow, superuser, StackExchange etc) Xorg openbox apt install Afterward, the i3 package in the repository can be downloaded and installed. Then the graphics server should be started using the shell script. startx If you do not have limiting factors such as memory and storage space on your remote server, you can use . This “DE” has a clean interface and uses very few resources. "Xfce desktop environment" Connection of Server There are different options available at this stage. You can make a remote connection and manage the system with the "remote connection" application you want. You can select an application that you can connect with the operating system you use and the operating system you use on the remote server. Tools such as , , , , , , , , , , are widely used. Teamviewer anydesk tigerVNC TightVNC RealVNC remmina Zoho assist Apache Guacamole NoMachine xrdp freeNX Here we come across , and as protocols. is a secure remote connection protocol. is a protocol developed by Microsoft that enables connection with the graphical interface of remote windows machines. SSH RDP VNC SSH (Secure Shell) RDP (Remote Desktop Protocol) is a platform-independent, server-client architecture protocol that allows managing applications on a graphical interface running on any network server with a remote connection. You can use any of the above tools for remote control. VNC (Virtual Network Connection) is a little different. Because it has a client-less structure. After the installation on the server-side, the connection can be established and managed via the web browser of any computer. Apache Guacomole You can use one of the advanced software mentioned above or other than these. But I will use a vnc application to be lightweight. The packages required on the server-side are and for Ubuntu server. Apt will automatically install the dependent packages. i3 xorg Firefox and vim can also be installed. These packages should also be installed in distributions such as Centos, SUSE, Arch. Package names may be different in the repository, but basically, a graphical server driver and a window manager or desktop environment are needed. $ sudo apt install xorg i3 firefox vim Then tightvncserver should be installed. $ sudo apt install tightvncserver Then the server should be started with the command. At this stage, vnc password should be determined, if needed, the password can be set for view-only mode. vncserver It gives each session an id and kills the session; $ vncserver -kill :session_number The connection can be made by using any client application that supports vnc on the client-side. RealVNC or remmina etc. applications can be used. To have a secure connection, tunneling is done with ssh on the client-side. 5900+N port is the default vnc port. Here N stands for the screen number. So more than one X session can be connected. is to make it easier to manage. Default port + session number $ ssh -L 5901:127.0.0.1:5091 -C -N -l username ip_addr You can monitor whether the connection is established with (It may differ in some distros. For example, on Solus, the command does the same job as ) netstat. ss netstat. Then, it is sufficient to select the on and connect to the port. Then the connection can be established with vnc password. VNC protocol Remmina localhost:5901 It offers an option to change the config file at the first launch or to use it with its default settings. is used to open the terminal with default settings. can be used to split the new window's position vertically, to split it horizontally. You can learn the usage information in detail from the user's guide on its web page or the blogs. Below is a firefox browser, active processes, and a terminal. Alt+enter Alt+h alt+v can be made into a service. In this way, vnc session can be started at every system startup. vncserver systemd It can be used in a lightweight "desktop environment" like instead of a "window manager". You can integrate it by making some changes in the configuration settings. xfce