Launch the Linux graphical shell. The best Ubuntu graphical shells

The reason to move my home server to Linux was due to problems with the hard drive, which began to barely move. Of course, at first I thought that it was the hard drive that had died, especially since it was a “veteran” WD2500JS, which I have been racing in the head and tail since 2007. Therefore, a brand new WD Caviar Black was purchased for 500 gigs, which I think was a good price - about 2,500 rubles, taking into account the fact that the ruble exchange rate at that time (namely November 1, 2014) had already begun to fall. However, the new hard drive also produced a bunch of errors when loading Ubuntu, which had already been installed by that time (and Windows was not installed smoothly), I even tried a backup power supply - but this did not help, nor did replacing the SATA cable. I had to admit that the motherboard (the “chipset” SATA controller) had started to dry up. Fortunately, the motherboard had an additional controller, which, moreover, already supported the AHCI mode, recommended for “file dumps,” so the hard drives were connected to it. There were no problems booting into Ubuntu, which cannot be said about Windows - I had to boot into it from the “chipset” controller, install the drivers for the “external” controller, and only after that Windows also began to boot.

Thus, I need to think about upgrading the platform of my “server”, but for now we will talk about the software component. I want to say that for the first time, bringing the system to fruition took me a long time - about two weeks in my free time from work and other worries. So now, even if I have to reinstall Ubuntu, I will open this article and quickly repeat all the settings. By the way, I highly recommend that when installing and possibly configuring (especially without a GUI) you use a nearby laptop with Internet access so that you can quickly clarify some questions (and I had a carload of them and a small cart, which prompted writing this opus).

Briefly about installing Ubuntu

But first, why Ubuntu Server 14.04.1. As a matter of fact, *.04 are versions with a long period of support, so they seem to be more reliable, and updates for such versions take a long time to release. So, in the ideal case, install it, configure it, and forget it for several years. Ubuntu - because it seems to be user-friendly, and besides, I had some “casual” acquaintance with desktop Ubuntu. But the choice of server edition in my case is a moot point, since I still installed the GUI - with about the same success it would be possible to roll out all sorts of services onto the desktop one. Unless the desktop comes with all sorts of offices and other multimedia, and then it would be advisable to remove all this (would it work?). However, what's done is done, and my readers may not add a graphical shell.

Before installation, you also need to decide on the bit depth and swap partition. I have a borderline situation on my server - the processor is already 64-bit, but there is only 2 gigabytes of RAM. So the choice between 32 bits and 64, and whether to create a swap partition or not, in this situation is 50/50. Personally, I chose a 64-bit architecture and a swap partition equal to the amount of RAM (i.e. 2 gigabytes). However, as practice has shown, the swap partition is practically not used, and the boot time of the operating system increases slightly due to the initialization of this partition. Well, let him live, it’s not a pity.

In general, installing an operating system in itself is not particularly difficult - a master is a master, except in this case in text mode. However, it is very important to provide a username and password. For a home server (if it does not “look” at the external Internet) you can install something not very complicated, but in any case this data will be required constantly. The fact is that Ubuntu is designed in such a way that this user, although created during installation, does not have superuser (root) rights. As a result, any more or less responsible action requires confirmation with a password in the graphical interface, and in the console - the magic word sudo (which can be translated as “execute as superuser”), again followed by entering the password (even if only once per session) .

You can split the hard drive into partitions right during installation, including trusting the default settings, but in the simplest case, generally limit yourself to one single primary Ext4 partition (just in case, let me remind you that this is the file system “native” for Linux) on the entire volume of the hard drive, and for greater importance, create a swap file after installation. Or not create it if there is a lot of RAM (from 4 gigabytes or even two).

For myself, I prepared the partitions in advance using the Gnome Partition Editor boot disk, taking into account the fact that I wanted to install Windows first, just in case. Therefore, in accordance with some recommendations, I created a 1 GB FAT32 boot partition, a primary NTFS partition - a system partition for Windows, then, in the secondary partition, several logical drives - a swap partition (linux-swap), a system partition for Linux (Ext4) and, finally, a shared NTFS partition for "shares". It turned out a little weird, of course, but it allows you to work in both systems.


The screenshot is already from the graphical interface I installed.

I must say that Windows somehow didn’t really want to install on the logical partition, so I ended up with two primary partitions. Actually, formally there can be up to four of them (so Linux Ext4 could also be made the primary), but for me personally it’s a little strange to see more than one primary partition (this comes from my experience working with MS DOS/Windows 95).

So, if the partitions on the hard drive are prepared in advance, at the appropriate stage of installing Ubuntu, you must select the manual disk setup mode, and do not forget to match the so-called mount points. The swap partition is mapped automatically, but at least one mount point - root (aka "/") must be registered yourself. To do this, we enter the appropriate partition of the disk (in my case, sda6 - by the way, when dividing a hard drive into partitions, it is convenient to assign labels to volumes, then it will be very difficult to make a mistake), leave the file system unchanged (Ext4), whether to format an empty partition or not is up to you (I said format for emphasis), and set the mount point (“use as”) - / (i.e. root).

It might be worthwhile to map the /boot mount point to the FAT32 boot partition (unfortunately, I didn’t think to check this possibility during installation, so I’ll leave finding out whether this option is permissible and how Windows will work for later). Also, if you are not planning to dual boot with Windows, I would recommend separating the /home mount point into a separate partition, and possibly also /var (especially if you are planning a more or less full-fledged web server and/or a shared folder somewhere inside /var ).

Perhaps I’ll make a small digression about the naming of disks, which differs from that adopted in Windows (and in fact, since the days of MS DOS) C:, D: and so on (I wonder if anyone remembers why A: and B: ? ). So, hard drives are listed in order by letters of the English alphabet with the prefix sd (can be deciphered as SATA Device, although in fact it is SCSI, but we won’t go deeper, by the way, “old” IDE/PATA drives will be called hd) - sda, sdb, etc. etc., and the partitions on the disks themselves are designated by numbers. Accordingly, the first 4 are allocated for primary partitions, and the logical drives in the secondary partition are numbered from 5. Thus, we can say that instead of drive C: there will be sda1, but if drive D: is a logical drive in the secondary partition, then it will turn out already sda5 .

In the screenshot you can see not just sda1 , but even /dev/sda1 . This can be explained simply - devices have their own, in a way, “virtual” mount point /dev (there are a lot of other things in addition to hard drives). Looking ahead, it’s a little unusual for file managers to have no disks, as they were used in DOS/Windows, since where you mount them, that folder is where you access them (such an interesting file system in unix). And my hands are still reaching for Alt+F1 and Alt+F2...

Well, let's get back to the installation. The advantage of server Ubuntu is the ability to immediately select the most popular software, or rather servers (from a software point of view) for installation. OpenSSH will probably be needed for remote access to the machine (at least console access), and Samba (or SMB/CIFS) for Windows-compatible “shares”. Web developers will probably be interested in the so-called LAMP (Linux - Apache - MySQL - PHP), you can also choose some other servers, but they are unlikely to be in demand for a home server (although maybe someone will want to install a print server). You can also mention the manual installation of packages, but the interface of this utility seemed somehow not very convenient, so I advise you not to bother at this stage and download everything that you need in addition to what is listed in this window after installing the OS.

And further. Why did I focus on the /home and /var mount points? /home stores user data - partially settings, files from the desktop, etc. /var is primarily of interest when installing LAMP, since this is where it is proposed to host websites (/var/www/html) and MySQL databases (/var/lib/mysql). So, separating individual mount points into separate hard drive partitions can help when reinstalling the system, if these partitions are not forced to reformat.

Well, yes, I wanted to tell you briefly about the installation, but it turned out to be a “multiple book”, and even without pictures. In general, at the initial stage I was inspired by the article Home media server based on Ubuntu Server 12.04 LTS. Despite the fact that the version of Ubuntu there was older, I did not notice any fundamental differences, besides, the author accompanies the installation process with screenshots and at the same time talks about setting up software RAID (for my information, if I may say so, I did not consider RAID- the array is relevant, and I wouldn’t even be able to pick it up on existing hardware). Therefore, I propose to finish the conversation about installation and get down to business.

Working in the console

So, after installing Ubuntu Server, we find ourselves in the console, since the graphical interface is not supplied with the server edition (but the distribution takes up only about 580 megabytes). Out of habit, this causes some bewilderment, but in principle we can live with it, especially since we log into exactly the same console via SSH. And using the sFTP protocol we have access to the file system. If OpenSSH was selected when installing the OS, then, we can say, out of the box we have remote access via the server’s IP address. When using a router (and in the case of a home network this is most likely the case), it makes sense to assign a static IP to the server in the DHCP settings of this same router. I assigned 192.168.1.2, so further I will use this exact address, so if your server has a different IP, make an adjustment.

The main SSH client for Windows is PuTTY. To connect to the server, enter its IP...


and, in fact, we get to the console. If he swears at the server key, we say that we trust him.


It is worth saying that when you enter a password, nothing is displayed on the screen (not even asterisks), such is the feature of Linux. As long as nothing new is created, the username and password are those that were specified during the installation of Ubuntu.

To work via sFTP, you can use an FTP client that supports this protocol, for example, I use FileZilla. Host - sftp://192.168.1.2, username and password - as in the case of SSH, created during OS installation (at least initially). However, the problem with sFTP is that most of the folders and files are writable only by the superuser, so there is initially nowhere to go except the home directory until changes are made to the access rights. For example, through the same console (terminal).

Super-quick reference to console commands.

sudo - run as superuser. If you don’t want to preface almost every command with this “magic word,” you can switch to superuser mode once: sudo -i

CD Change directory (for example, very often you need to cd /etc, or cd ~ - go to your home directory).
dir - display the contents of a directory (aka directory or folder), although in the output it is not clear where the file is and where the subfolder is, but oh well
cat - output file contents
mkdir Create a folder (for example mkdir test)
nano - console editor (usually in the form of sudo nano config.conf, i.e. edit the specified file on behalf of the superuser)
wget - download the file using a link from the Internet
apt-get install Install package (requires superuser rights)
reboot - reboot (requires superuser rights)
exit - exit (more relevant for SSH)
<команда>--help or man<команда>- obtaining help on the command.

A little more detail, but also briefly about the commands for changing access rights, these are chmod (access mode) and chown (change owner). Basically they will require superuser rights. Setting full file access: chmod 777 . What is 777? The first number is the rights of the owner, the second number is the rights of the group, the third number is the rights of everyone else. 7 - read, write, execute, 6 - read and write, 4 - read only, 0 - unavailable. Owner change: chown [:] <file> . Accordingly, users can be combined into groups (although it is more common for each user to have their own group), so that through a combination of the owner, user group and “everyone else”, access to files and folders can be controlled quite flexibly (however, potentially NTFS in provides more opportunities in this regard).

To copy files, you can use the cp command, but there is a better way - install a console file manager, in particular Midnight Commander (are there others?). It works via SSH, and by running it as a superuser we get an excellent opportunity to edit numerous configs. Only in the settings, as for me, it is better to enable the use of the built-in editor instead of the aforementioned nano, otherwise the meaning is lost.

We install (if any questions arise, we answer in the affirmative):

Sudo apt-get install mc

And run: mc or sudo mc (if you need superuser rights).


However, I adjusted it a little for myself so that the file names were wider.

Compared to the FAR Manager I use in Windows, two things are unusual - as I mentioned above, the absence of “disks”, as well as a double Esc instead of a single one (this, as I understand it, was done for compatibility with various terminals).

A small point - if suddenly the mc package is not found in the repository, then you need to add the developer repository key (for some reason I first added the key, and only then installed it, so I can’t judge whether it was there initially):

Sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 2EE7EF82

And, just in case, it’s literally clear what a repository is - it’s essentially a repository, in this case, of programs for Ubuntu, and it’s located somewhere on servers on the Internet. In the graphical interface this whole thing is designated as “Application Center”, but in the console it is called apt-get.

Well, a couple of final touches on working in the console. It is best to update the system immediately or almost immediately after installation:

sudo apt-get update - synchronize the list of packages with the repository,
sudo apt-get upgrade - actually perform the update.

In the case of installation after Windows, it may happen that the boot menu will not have a boot option for Windows itself. In this case, the bootloader configuration update command helped me:

Sudo update-grub

If, when loading the system, lines appear saying that it is recommended to use the acpi driver, then you can risk installing the appropriate package (which is what I did):

Sudo apt-get install acpi

Web interface

The mentioned article suggests installing Webmin to manage the system remotely. To be honest, at first I slightly underestimated the capabilities of this system, but in the process, as they say, I got involved. The most popular functions for me turned out to be functions for setting up services (in Windows - services, and in Linux they are called daemons), especially since in the same section you can send a command to reboot or shut down the system; as well as setting up Apache and MySQL, file manager, system information.

Unfortunately, this thing is not in the repository, so you have to install it manually from the package. There is also no explicit package and instructions for Ubuntu on the developer’s website, so we focus on Debian (since Ubuntu comes from it). At the time of writing this section, the current version is 1.710, which affects the package file name. From the terminal, the installation process looks like this: Download the package to the current directory (by default, the terminal opens in the user’s home directory; if you want to save the package somewhere else, first go with the cd command):

Wget http://prdownloads.sourceforge.net/webadmin/webmin_1.710_all.deb

We initiate the installation of the package:

Sudo dpkg --install webmin_1.710_all.deb

It will most likely not work the first time, because the system will not have the packages that are required for the web interface to work. A list of these packages will be output to the console. We list all these packages in the sudo apt-get install command, separated by spaces. For example, the article contains the following command:

Sudo apt-get install libnet-ssleay-perl libauthen-pam-perl libio-pty-perl apt-show-versions

And the instructions on the website are:

Sudo apt-get install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions python

Unfortunately, the list of required packages was lost to me over time (it seems there was something in between), but the meaning, I think, is clear. Well, after that, if webmin is still not installed, call the installation command again (in the terminal you can select one of the previous commands by pressing the up key).

You can access the web interface by IP address, port 10000, or by computer name (same port). I have https://servpc:10000/ or https://192.168.1.2:10000/ (with accompanying curses about an unreliable connection, but what can you do). The login and password are still our favorite ones, specified when installing the OS. If everything is in order, then a page with information about the system initially opens.


Since Webmin is a very powerful thing, certain aspects of it will be considered when solving a particular problem. Now I would like to tell you a little about the file manager (Others - File Manager). Its main disadvantages are that it is written in Java (not to be confused with JavaScript!), and at the same time it looks rather unsightly in my opinion. Moreover, I still haven’t figured out how to make it so that the folders are displayed on top, and not mixed together. However, since “internally” this is all done on behalf of the superuser, you can edit configs with this file manager, and all the main functions are implemented (access rights, copying, extracting archives, etc.).

Note dated 02/12/2017- in later versions, File Manager became quite javascript, but the manager in Java remained a separate item in Java File Manager.

GUI - graphical user interface

So we have a terminal and we have a web interface. In principle, this is enough for a “canonical” server, but personally, I still don’t feel very comfortable in such an environment. Therefore, I decided to install some kind of graphical shell. The "classic" script in this case is sudo apt-get install ubuntu-desktop , but I don't like Unity (the standard Ubuntu shell). Initially I wanted to install xfce4, which I liked since experimenting with Xubuntu on an ancient laptop. The command that came to mind, sudo apt-get install xfce4, although it worked, the result was unsatisfactory. The fact that the shell did not start automatically is even good in some ways (just in case, I’ll say that it had to be started with the startx command). But the fact that half of the icons were missing, and the menu had a bunch of links to uninstalled programs, and it all didn’t look as beautiful as in Xubuntu itself (booted from a flash drive), did not suit me at all.

As a result, I came across a note Install GUI on Ubuntu server 14.04 Trusty Tahr, the author of which suggested installing Gnome, although he warned that it might seem boring. And for me, it’s not bad at all - there are definitely no missing icons, and there are even some special effects, and it looks quite neat. It’s also worth keeping in mind that this same guy will take up quite a bit of space by Linux standards - a gigabyte and a half, or something. The installation command is:

Sudo apt-get install xorg gnome-core gnome-system-tools gnome-app-install

By the way, based on the text of the article, xfce4 had to be installed something like this:

Sudo apt-get install --no-install-recommends xubuntu-desktop

But the “minimalistic” Gnome suited me quite well, so I didn’t dare to experiment further, so I leave room for creativity to the reader.

A possible drawback is that little has been translated into Russian; as a result, some windows have Russian text, while others do not. Personally, I don't pay attention to this. The special effects were slow at first, but after installing proprietary drivers for the NVidia video card (which I have in the server), they stopped.


Quite interesting is the overview of applications, which can be called up, among other things, by pressing the Super key (i.e. Windows). There is a dock (some kind of analogue of the taskbar), there is a search bar. There is also a button in the dock to view all applications. In principle, due to applications pinned to the dock ("favorites"), as well as the search bar, the most frequently used programs are launched quite efficiently. What I didn’t quite like was the scrolling of entire screens (I would have preferred line-by-line), and the fact that the program name is usually cut off under the icons.

Here are a couple more examples of the Gnome look and feel:


Analogue control panel


Built-in file manager

What I didn’t have right after installing the graphical interface was a graphical text editor. The articles mention gedit, but for some reason I installed leafpad - at one time I had one installed at work, i.e. sort of because of the familiar name. By the way, thanks to the graphical interface, instead of the spell fuck-tibidoh-tibidoh, i.e. sudo apt-get install, you can use the application center (Ubuntu Software Center). At the same time, you can read the description, look at the screenshot, go to the developer’s website, after all, fortunately, the browser (Firefox) is even included in the “minimalistic” set (but I don’t understand why some kind of messenger is included there - Empathy, which is also It’s also impossible to remove without demolishing the entire Dwarf).

What the graphical interface turned out to be not very well suited for was the notorious editing of configuration files. So open a terminal, cd /etc and sudo leafpad ... Well, as they say, what they fought for.

I also missed a two-panel file manager (although I appreciated the Move to and Copy to commands in the built-in context menu; they would have been in Windows Explorer). I installed Midnight Commander chronologically later, and it’s a console game. But, let’s say, Gnome Commander is quite graphical. In appearance it resembles Total, but what I liked is that there is an analogue of disks - file systems mounted in /media are output there (which we will talk about a little later). The key combination, however, is Alt+1 and Alt+2, not functional ones.


When loading Gnome (this most likely applies to other graphical shells - it was the same in Xubuntu on a laptop), since the local network is managed by the router, a notification appears that the current network has a local domain (.local), which is not recommended and not is compatible with the Avahi network resource discovery service and the service has been disabled. This time, Avahi's note helped solve the problem. Disabling search for domain.local, which suggests editing a couple of configuration files (I have already given several ways to edit configuration files above, so I will not focus on this). For convenience, I repeat the recipe here.

  1. In the file /etc/nsswitch.conf in the line hosts: files mdns4_minimal dns mdns4 delete .
  2. In the /etc/default/avahi-daemon file, change the value of the AVAHI_DAEMON_DETECT_LOCAL parameter to 0.
  3. Let's reboot. The intrusive notification should no longer appear.

Mounting NTFS partitions

Since NTFS is not a native Linux file system, various problems may arise when working with it, such as read-only access, or problems with sharing folders over SMB. At the same time, I’ll tell you a little about mounting partitions in general.

As a matter of fact, the /etc/fstab file is responsible for mounting disks at the boot stage, each line of which has the following format:

A reminder of this is placed in a comment at the beginning of the file. The file system can be identified by label, volume UUID (probably preferable, since the UUID was used to mount the system and swap partitions), or by device (for example, /dev/sdb1 - faster to write and easier to understand). The mount point is the “folder” through which this file system will be accessed. Next, specify the file system type and mount options. The dump and pass options apply to the dump (backup) and fsck (file system check) programs. For ntfs, in a normal situation, both parameters are zero, and it is also unlikely that fsck works with ntfs.

As I mentioned above, an additional service is provided by mounting file systems in /media using the volume label. In the built-in Gnome file manager, corresponding icons appear opposite devices, and in Gnome Commander, buttons and a quick selection list for panels appear.

In addition to editing the file manually, in the web interface you can manage the mounting of file systems from the System - Disk and Network Filesystems section, and in Gnome - using the Disks program. An example of mounting an NTFS partition sda7 with the SHARED label via Webmin and Disks:

This would correspond to this line in fstab:

/dev/sda7 /media/SHARED ntfs defaults 0 0

However, it is worth saying that the second 2 terabyte hard drive with an NTFS partition for the entire disk (GREEN label) did not want to be mounted in the same way. When "dynamically" mounted via Nautilus (Gnome's built-in file manager), i.e. when I just went to the disk through “devices”, the file system was designated as FUSEBLK (looked at it in Webmin). It’s not clear how to mount such a thing via fstab. An extremely elegant solution was found - let the file system be detected automatically:

/dev/sdb1 /media/GREEN auto defaults 0 0

However, this method has a drawback - you cannot edit the mounting parameters of such a file system via Webmin.

People, in addition to the standard "driver", use some alternative called ntfs-3g (package and "file system"), although this probably makes sense for earlier versions of Ubuntu. Although I installed it myself, I ultimately settled on the standard one. However, ntfs-3g has some advantage in the form of a wizard for mounting an NTFS partition. Also open is the issue of processor load (to be fair, the ntfs process takes up significant processor time - 1-2% for each partition).

I don’t seem to have any problems with Russian file names even with the default settings (ntfs defaults and auto defaults). However, just in case, you can sign the Russian locale in the options, for example:

/dev/sda7 /media/SHARED ntfs defaults,locale=ru_RU.UTF-8 0 0

When mounted with default settings, the owner of the files is assumed to be root. Perhaps, when delineating access rights, you will want to use a different user and/or group. To do this, you can specify them in the mount settings in Webmin or sign them manually in the options:

/dev/sda7 /media/SHARED ntfs defaults,uid=1000 0 0

Where 1000 is the uid (identifier) ​​of the user created when installing Ubuntu. In my opinion, the fastest way to find out the user's uid is again through Webmin in the System - Users and group section. In Gnome it takes longer, you need to go to “Users and Groups”, select the user, click “Advanced Settings”, confirm the action with a password, and only on the “Advanced” tab will it be indicated. Accordingly, the gid parameter is used to indicate the group id.

There may be a nuance associated with NTFS that access to files or folders is limited at the file system level, i.e. if there is no full access for the special user "Everyone" (Everyone in English versions). To remove such restrictions, you will need Windows to add full access for this user “Everyone” in the properties of the folder (or file), on the “Security” tab.

Summarizing the above, if possible, you should not use NTFS under Linux - there are problems with both access and performance. Unfortunately, there is no simple way to convert NTFS to Ext4 (similar to FAT32 -> NTFS), there is only automation of the algorithm: reduce the existing NTFS partition, create an Ext4 partition in the free space (or increase its size), transfer some files, repeat until complete substitutions.

Setting up Samba

So, we finally got to the "balls" setting. Although this can be done through Webmin, in this case I liked the graphical utility system-config-samba more - its interface is clearly simpler and more elegant. If you need to restrict access to some folders, it is advisable to add the user to the system in advance. Personally, I also created users through the graphical interface, but in this version the complexity of the password (at least the length) is controlled. Therefore, I will give a screenshot of Webmin:


I have marked with arrows the settings that I would like to draw your attention to. This is setting a password, the Login temporarily disabled flag - so that the user does not “shine” on the login screen when the GUI is installed, as well as creating a group that matches the user name (New group with the same name as user).

An error occurred on my system (when working in a terminal) that was mysteriously related to Samba - despite the fact that the description of the error does not indicate this same Samba in any way:

No talloc stackframe at ../source3/param/loadparm.c:4864, leaking memory

There are two solutions to the problem - either removing the libpam-smbpass package, or disabling synchronization of system and Samba user passwords without removing the specified package.

To remove a package use the command:

Sudo apt-get remove libpam-smbpass

To disable synchronization, call the command:

Sudo pam-auth-update

First, a window appears with an information message; after closing it, the main settings window appears, in which you need to uncheck the flag opposite SMB Password synchronization (if the mouse does not respond, use the arrow keys, space bar, Tab and Enter).


So, using the graphical utility system-config-samba, the ball is configured easily and simply.


Most likely, you won’t have to change anything at all in the server settings - we check the name of the workgroup, and on the “Security” tab we check that the authentication mode is “user” with password encryption. Please note - there is a "resource" authentication method, but it appears to be no longer supported (at least there is a warning about it).

If access restrictions are planned, we map the unix user to the Samba (Windows) user. However, the user created during system installation must already be associated. If password synchronization is not disabled as described above, the entered password will be ignored.


Well, let’s add the resource:

We write down the path, indicate the resource name, access mode ("write allowed" or not). If you wish, you can enter a description of the resource and, if you don’t want to “shine” the resource in the network overview, you can remove its “visibility”. On the second tab you can set specific users who have access to the resource.

When you exit the program, the services are most likely restarted, but if this does not happen, they can be restarted with the commands:

Sudo restart smbd sudo restart nmbd

Setting up via Webmin is quite complicated - judge for yourself, this is only the main screen:


Although it seems enough to confine yourself to converting the necessary Unix users into Samba users, quickly look through the Windows Networking settings, and you can add resources (Create a new file share in the top table).



Again, we indicate the name of the network resource, then we indicate the path (you can create it along the way on behalf of the specified user and group with the specified rights), availability and “browseable”. If desired, you can also give a description.


Then, if necessary, you can edit the permissions (enter the network resource from the table on the main page, then Security and Access Control), for example something like this:


The point is that we deny guest access (Guest Access - None), and indicate in Valid Users those who should actually be granted access.

The problem I encountered, oddly enough, still came from Windows. More precisely, there were even two of them. Firstly, it turned out that it is impossible to connect resources of the same computer (server) from Windows on behalf of different users, i.e. You cannot, say, connect the Shared folder with the user serv, and Local with private. Secondly, after all the reconfigurations of the shares, it is very advisable to clear the saved passwords in Windows, otherwise a situation similar to the previous problem may arise ("guest" resources are implicitly connected by one user, as a result of which "password-protected" resources are no longer connected by others). So, clearing saved passwords for network resources in Windows 7 is done using the Credential Manager in the Control Panel, in the “Windows Credentials” section in the “servers” section.


This is where I’ll probably finish the story about setting up the “balls”.

Torrents

Another “classic” task for a home server, and the classic option is transmission-daemon. Not to be confused with “just” transmission - this is a GUI program, as opposed to a “daemon”. Standard installation:

Sudo apt-get install transmission-daemon

But the setup here is also non-trivial - you need to change the user under whose name the daemon is launched, move the settings to the home directory of this user (so that they are writable) and at least enable remote control so that you can perform further configuration through one of GUI utilities. The instructions are right on help.ubuntu.ru, but since we have Webmin, some things can be done using it instead of the console. So, I'll retell the instructions:

  1. Stop the service (daemon): sudo service transmission-daemon stop (or via Webmin)
  2. Move the settings folder /etc/transmission-daemon to the user directory (assuming we are logged in under our favorite user UID=1000) and change the owner to ourselves:
    sudo cp -r /etc/transmission-daemon ~/.config/
    sudo chown -R user_name ~/.config/transmission-daemon
    where user_name is your login
  3. Edit the /etc/default/transmission-daemon config: set the CONFIG_DIR parameter to the value "/home/user_name/.config/transmission-daemon"
  4. Finally, we edit /etc/init/transmission-daemon.conf - or more conveniently through webmin in the service properties - specify in the lines setuid debian-transmission and setgid debian-transmission the name of your user instead of your debian-transmission .

There, at the same time, it is advisable to fix the jamb with the incorrect start on parameter (directly the first line), otherwise the daemon, as far as I remember, does not load itself at all:

Start on (filesystem and net-device-up IFACE!=lo)

Hmm, that's what I thought - wouldn't it be easier to tinker with access rights directly in /etc/transmission-daemon? Well, okay, the point is that now finally the torrent settings themselves are available for editing. The developers showed off a little - the settings file ~/.config/transmission-daemon/settings.json contains, accordingly, a JSON array. This thing is well known to web developers, but usually configs in Linux look a little different. However, it is not difficult to understand (parameter: value pairs are separated by commas, and all together are delimited by curly braces. Parameter names and string values ​​are enclosed in quotes). So, let’s enable remote control and disable authentication (so that it doesn’t ask for a password that is somehow not entirely known):

"rpc-enabled": true, "rpc-authentication-required": false

Since we have successfully disabled the password request, it is advisable to create a white list of addresses from which control can be carried out, for example like this:

"rpc-whitelist": "127.0.0.1, 192.168.1.*", "rpc-whitelist-enabled": true

For some reason, neither of the two GUI utilities presented in the application center allows you to specify the startup folder for torrents. Probably, the logic in this is such that you can simply take the torrent and open it in the utility itself, but personally, I find it more convenient to dump the torrent file into the “by share” folder. The parameters (you may have to add them yourself) are intended for this purpose: watch-dir and watch-dir-enabled , for example:

"watch-dir": "/media/SHARED/SHARED/Torrent autoload", "watch-dir-enabled": true

In general, you can configure folders at the same time:

"download-dir": "/media/SHARED/SHARED/DOWNLOADS", "incomplete-dir": "/media/SHARED/INCOMPLETE", "incomplete-dir-enabled": true

Actually, probably after this the torrent is configured in general terms, you can start the daemon and use the web interface (port 9091). True, I didn’t like it - it looks more like a download manager than a torrent client.


The rest of all sorts of fine tuning seems to be quite safe to “lick” with remote control utilities, of which I liked best, which works well in Windows. There was a small problem in launching it when Windows boots, minimized to tray. No problem - let's create a shortcut in the Startup folder by adding the -hidden parameter:

Temperature monitoring

lm-sensors and hddtemp are responsible for temperature monitoring (the latter, respectively, takes the temperature of the hard drive, and the first - the processor, chipset, fan speeds, etc.). I found out about this, and how to set it all up, apparently, though the note was written a long time ago, so now everything is done a little differently, and we don’t need conky (for the console).

So, let's install:

Sudo apt-get install lm-sensors hddtemp

Then we run the monitoring tool search utility on All We answer yes to questions:

Sudo sensors-detect

You can reboot the entire system, but the command indicated in the note seems to work:

sudo /etc/init.d/module-init-tools , or in more modern spelling,
sudo service module-init-tools start

Now let's configure hddtemp. To do this, first stop the service if it suddenly starts:

sudo service hddtemp stop (or via webmin)

Next, you need to edit /etc/default/hddtemp: the article suggests changing the value of the RUN_DAEMON="true" parameter (although judging by the description this most likely refers to remote temperature monitoring over the network), and, of course, in the DISKS parameter, list the disks to be monitored, for example DISKS="/dev/sda /dev/sdb" . Don't forget to remove the comment sign (#).

You can start the daemon. Now, to view the temperature from the console, you can use the commands sensors (without parameters) and sudo hddtemp , For example:

Sudo hddtemp /dev/sda

In addition to the console, the temperature of the processor and hard drives is displayed in the System information section of the web interface. You can also install the psensors GUI application, and even a certain psensor-server, which implements its web access to sensor readings (port 3131):


Pretty nice, but it’s not clear how to display the temperature of the hard drives there.

In general, there was still a small problem with the temperature of the video card - I saw it only in the GUI application, but while writing this section I finally found how to view it in the console - the nvidia-smi command is used for this. Let me remind you that my server has a passively cooled NVidia GeForce 7600 video card, and after installing the GUI I installed the proprietary driver. Although, to be fair, the temperature of the video card is probably only relevant in graphics mode, because in theory there is practically no load on it in text mode.

Uninterruptible power supply management

Interestingly, the graphical interface in some form was picked up by UPS anyway, but the settings turned out to be quite meager and not entirely clear (for example, what a “low charge level” is). After thinking a little, I still did not rely on such functionality, and decided to set up nut. Basically she helped me with this, although it is about something a little different.

So, the first thing you need to do is check whether your UPS is supported by this software package at all; this is done in the Compatibility section of the official project website. Fortunately, my Powercom BNT-600AP has the highest level of compatibility, and as for the information in the instructions that scared me about the need to compile this same nut with certain keys, everything was already compiled stolen before me.


So, getting this all to take off was perhaps the most difficult part of setting up the server. Firstly, you will have to edit several configs at once. Luckily they are all located in /etc/nut. First of all, in nut.conf we set the local operating mode: MODE=standalone . The fact is that you can also configure the network mode, i.e. monitoring and managing not only the local uninterruptible power supply (connected to this computer), but also others over the network.

The next step is to add information about the “controlled” UPS to ups.conf. This is done in the style of Windows .inf files - the name of the section is used to determine the device identifier (within the framework of nut - I specified BNT600AP). You must provide the driver and port as parameters. We determine the driver according to the compatibility table - in my case it is usbhid-ups, and without further ado I specified auto as the port. I also added a description for added importance. This is what happened:

Driver=usbhid-ups port=auto desc="Powercom BNT-600AP"

We skip upsd.conf, and in the upsd.users file we add the administrator nut:

Password = mypass upsmon master actions = SET instcmds = ALL

Of course, my password is different. For the initial setup, all that remains is to edit the MONITOR parameter in the upsmon.conf file, where all the previously entered settings (UPS ID, user and password) will be required, in my case:

MONITOR BNT600AP@localhost 1 admin mypass master

The last parameter means that the computer is turned off last, giving the “slave” devices the opportunity to turn off first, and 1 means that only 1 uninterruptible power supply is connected. I seem to have left the rest of the parameters at default.

The question of what “low battery level” is remains unclear. To view information about UPS from the terminal, use the upsc command , in my case upsc BNT600AP. Among other things, I was interested in the parameter battery.charge.low, equal to 10 (percent). I didn't think this was very reliable. To override this parameter, in ups.conf in the section dedicated to our UPS, add the line:

Override.battery.charge.low=20

Thus, we will set the battery discharge level to 20%.

By the way, three daemons are responsible for all this “management” - nut-client, nut-server and ups-monitor, which most likely should be disabled while editing configuration files.

Well, UPS was launched, but monitoring its parameters from the console is somehow not very convenient. The web interface provides the nut-cgi package, and this will be "second". The main problem is that the default settings of the Apache web server are not suitable for monitoring work. I needed at least two things - enable mod-cgi and allow execution of cgi programs from usr/lib. I did it via Webmin - we include the module in Servers - Apache Webserver - Global Configuration - Configure Apache Modules:


But as for the cgi programs from usr/lib, I have now searched all over Webmin and still don’t understand how I did it. The only thing I found was the file /etc/apache2/conf-available/serve-cgi-bin. conf with the following content:

Define ENABLE_USR_LIB_CGI_BIN ScriptAlias ​​/cgi-bin/ /usr/lib/cgi-bin/ AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Require all granted # vim: syntax=apache ts=4 sw=4 sts=4 sr noet

For the changes to take effect, restart Apache (the fastest way is in Webmin - in the Apache Webserver section there are links “Apply changes” or “Stop / Start Apache”). Next you need to edit a couple more configuration files. In /etc/nut/hosts.conf we add monitoring of our UPS:

MONITOR BNT600AP@localhost "BNT600AP"

In the /etc/nut/upsset.conf file, uncomment the line (remove the # sign) I_HAVE_SECURED_MY_CGI_DIRECTORY

Ln -s /usr/share/nut/www /var/www/html/nut

Let's make sure that Apache follows symbolic links, to do this in the file /etc/apache2/apache2.conf in the block The following options must be specified:

Options Indexes FollowSymLinks

Most likely, this is the default, so now, if I haven't missed anything, I can finally view the UPS status in the browser: http://192.168.1.2/nut/

It is also possible to tweak something by using the user in accordance with upsd.users, although in my case only one setting is available - a timeout before turning off the UPS after the system shuts down:


But you can send several commands, including control of the tweeter, shutdown and self-test:


Conclusion

So, we have looked at the most important, in my opinion, aspects of setting up a home server. Due to technical limitations, I didn’t cover everything I wanted, so tasks such as setting up a download manager, ftp server, remote desktop management, and possibly more detailed setup of Apache for web development will be described in the second part of the article, which , I hope it won’t keep you waiting long.

Note from 02/25/2019: alas, 5 years can hardly be described that way. Therefore, I removed “Part 1” from the title, and the new article refers to a more current version of the OS:

Ubuntu is one of the most popular Linux distributions developed by Canonical. By default, this distribution uses its own graphical shell - Unity. It is applied on top of the Gnome 3 desktop environment and looks quite nice.

But Unity has one significant drawback - it has too few settings, and there are still some errors and shortcomings. In addition, not everyone likes this shell. But you don't have to use it, you can install any of the available desktop environments for Linux. Here your choice is limited only by your taste. In this article, we will look at the best graphical shells for Ubuntu 16.04, as well as how to install them on this system.

1. GNOME Shell

Gnome 3 or GNU Network Object Model Environment is part of the GNU Project and is developed by the Gnome Project team. This Ubuntu desktop environment is similar to Unity, but quite different from it. Gnome is used as the default Ubuntu desktop for the Ubuntu Gnome edition.

Main features:

  • Composite Manager Mutter or Compiz;
  • View Mode "Actions" allows you to see all open windows on one screen, move them between desktops, search and much more;
  • There is a desktop notification system;
  • Extensions are supported, with which you can change the appearance and functionality of the environment. You can install them from extensions.gnome.org;
  • By default windows cannot be minimized, it is recommended to use desktops and display mode to replace this feature "Actions". But minimizing windows can be enabled;
  • Dynamic number of desktops. You can open them as many as you need.

To install:

$ sudo apt install ubuntu-gnome-desktop

2.Xfce

Xfce is a lightweight desktop environment for Ubuntu and other Linux distributions. The environment consumes very few system resources, looks beautiful and is user friendly. Along with the environment itself, several additional applications, panels and plugins are supplied, and it also uses its own Xfwm window manager.

In addition to the standard components, this Ubuntu desktop environment includes additional programs with the xfce prefix. To install the xfce desktop environment on Ubuntu run:

$ sudo apt-get install xubuntu-desktop

3. KDE Plasma

KDE is another very powerful and beautiful desktop environment, similar in functionality and resource consumption to Gnome. But unlike Gnome, there are a lot of settings and you can configure the environment as you want. KDE has a Windows-like appearance, which is very useful for beginners.

Main features:

  • You can configure a huge number of parameters and literally any aspect of the behavior of the working environment;
  • Panels can be placed on the edges of the screen and can be used as launchpads or taxbars;
  • You can launch programs from the menu, through the launcher, or using shortcuts;
  • You can place Plasma widgets on your desktop;
  • Action mode allows you to switch between desktops and spaces.

To install the desktop environment and all additional packages, run in a terminal:

$ sudo apt install kubuntu-desktop

4. LXDE

LXDE is another very lightweight desktop environment that focuses on minimal resource consumption and maximum performance. Openbox is used as a window manager. But besides this, the environment set includes several utilities with the LX prefix - these are system settings, application loader, panel, session manager, audio player, terminal and much more.

Main features:

  • Consumes little CPU and memory;
  • Looks simple and beautiful;
  • There are many settings you can use to make your environment look just the way you want it to;
  • Environment components can be used independently of each other.

To change the ubuntu desktop environment, run the following command:

$ sudo apt-get install lubuntu-desktop

5. Cinnamon

Cinnamon is a fork of Gnome 3 developed by the Linux Mint distribution team. The environment uses its own shell, which makes the Gnome 3 interface similar to Gnome 2. It uses new software, while at the same time you get a modern interface and the ability to install extensions. The environment has a familiar panel at the bottom of the screen, a familiar application launch menu, and the ability to add widgets to the desktop.

To install:

$ sudo add-apt-repository ppa:embrosyn/cinnamon
$ sudo apt update
$ sudo apt install cinnamon blueberry

6. MATE

MATE is a fork of Gnome 2, which was created right after the announcement of the release of Gnome 3. Many users did not like the new version and wanted to keep the same appearance. The environment looks exactly like the traditional Gnome 2 interface.

Key Features:

  • Has a traditional Gnome 2 look and feel;
  • Comes with older versions of some Gnome 2 applications;
  • All conflicts between MATE and Gnome 3 have been resolved, so both environments can be installed on the system without any problems.
  • GTK2 and GTK3 applications are supported.

To install use this command:

$ sudo apt-get install ubuntu-mate-desktop

7. Pantheon

Pantheon is a graphical front-end for Gnome 3, developed as part of the Elementary OS project. But it can be installed on Ubuntu as well.

Peculiarities:

  • The top panel is called WingPanel, it mixes the best of Gnome 2 and Gnome Shell panels;
  • The Slingshot launcher is used to launch applications;
  • At the bottom of the screen is the Plank dock;
  • The Cerebere utility runs in the background and monitors the operation of all other components, and also restarts them in case of an error;
  • You can choose which environment modules to use on your system.

To install, run the following commands:

$ sudo add-apt-repository ppa:elementary-os/daily
$ sudo apt update
$ sudo apt install elementary-desktop

8. GNOME Flashback

This is a version of the classic Gnome desktop environment, ported to new technologies such as GTK3 and others. This is its main difference from MATE. It's almost the same Gnome 2, just slightly updated, something between Gnome 2 and 3. It runs better on older hardware.

Peculiarities:

  • Has a classic application menu and panel;
  • The panel is configured in the same way as in Gnome 2, only you need to press Alt;
  • Overall stability has been improved, applets can no longer be moved, and vertical panels work better.

To install, type the command:

$ sudo apt install gnome-session-flashback

9. Awesome

Awesome is not really a desktop environment, it's a tile-based window manager. By default, it comes with a panel where you can place your application applets, desktop switchers, and widgets. There are also several widget libraries that you can add to your desktop.

Tiling allows you to automatically switch the arrangement of windows without overlapping so that they fill the screen evenly, but you can make windows float, as is done in regular environments.

Peculiarities:

  • Don't waste screen space;
  • There is no need to select the location of windows using the mouse or touchpad;
  • Setting up window snaps;
  • There is mouse support.

To install, just do:

$ sudo apt-get install awesome

10. Enlightenment (E)

Enlightenment environments focus on beautiful appearance while using minimal resources. It has a set of its own applications, as well as its own window manager. There is a dock panel at the bottom of the screen, and you can add widgets to the desktop. To install:

$ sudo add-apt-repository ppa:enlightenment-git/ppa
$ sudo apt-get update
$ sudo apt-get install e20

11.i3wm

i3wm is another great and simple tiled window manager. The developers have focused on maximum simplicity of both use, code and configuration.

Peculiarities:

  • Multiple monitor support;
  • UTF-8 support;
  • Easy to set up (no programming language required);
  • Create layouts for window placement dynamically;
  • Processing floating and pop-up windows;
  • Various modes, like in Vim.

To install:

$ sudo apt-get install i3

12.Deepin DE

The Deepin Linux distribution uses its own specially designed desktop environment, integrated with applications such as Deepin Video, Deepin Music and others. A characteristic feature of this environment is the side settings panel, like in WIndows 8.1, only much more convenient.

Installing the Ubuntu environment is done with the command:

$ sudo sh -c "echo "deb http://packages.linuxdeepin.com/deepin trusty main non-free universe" >> /etc/apt/sources.list"
$ sudo sh -c "echo "deb-src http://packages.linuxdeepin.com/deepin trusty main non-free universe" >> /etc/apt/sources.list"
$ wget http://packages.linuxdeepin.com/deepin/project/deepin-keyring.gpg
$ gpg --import deepin-keyring.gpg
$ sudo gpg --export --armor 209088E7 | sudo apt-key add -
$ sudo apt-get update
$ sudo apt-get install dde-meta-core python-deepin-gsettings deepin-music-player deepin-software-center deepin-movie deepin-game-center

13. Budgie

Budgie is a desktop environment based on Gnome and developed by the Solus distribution team. The developers focused on creating the most beautiful interface possible. This ubuntu graphical shell is used by default in the Ubuntu Budgie edition, which recently became official.

Peculiarities:

  • Integrates with the Gnome stack;
  • There's a Raven sidebar where you can quickly access settings;
  • All settings are made through the Raven panel.

To install, type the following commands:

$ sudo add-apt-repository ppa:budgie-remix/ppa
$ sudo apt update
$ sudo apt install budgie-desktop

14.Openbox

Openbox is a highly customizable window manager. It has a minimalistic appearance and is very highly customizable. You can change almost any aspect of the shell. You can customize the look as you log in, and use KDE or Gnome applications.

To install this Ubuntu desktop environment follow.

There are several ways to launch X Window. Sometimes during OS installation they agree with the installer’s offer to launch them automatically. If everything went well during installation, then you will be in graphical mode immediately after starting the OS. However, judging by my experience (especially my experience with version 3 of XFree86), System X does not always install automatically, so in the section on OS installation I advised against automatic startup. How to launch the graphical shell?

From the previous text you should know that you need to start the X server first. This can be done by directly launching the appropriate server from the /usr/X11R6/bin directory. You already know that as a result you will see a gray rectangle on the screen with a cross of the mouse cursor in the middle. But you are unlikely to achieve anything further, since the window manager and not a single client program are running. So just press the key combination< Ctrl>+< Alt>+< Backs pace>to shut down the X server.

A slightly more successful (but still not the most correct) way to enter graphical mode is to issue the command xinit.

Program xinit(it is located in the /usr/X11R6/bin directory) is intended to launch the X Window System server and at least one client program.

If the command line does not specify which X server to start, xinit looks for the .xserverrc file in the user's home directory in order to execute the server startup script contained in it. If there is no such file, xinit by default executes the following script:

X:0

that is, it runs a program named X on display number 0. It assumes that in one of the directories listed in the search paths there is a program called X. As you already know, this must be a link to a suitable server. Using the script.xserverrc, make sure that the command exec it runs an existing X server. Otherwise, the download will be very slow and will exit immediately.

If on the run command line xinit the client program that needs to be launched is not specified, the program xinit searches the user's home directory for a .xinitrc file to execute as a script that launches client programs. If such a file does not exist, xinit by default executes the command instead of this script:

xterm -geometry +1+1 -n login -display:0

If you have not yet created your .xinitrc file after installing Red Hat Linux, simply run the command xinit from the command line, you will see an almost empty desktop with a single terminal window. Since there is no window manager, you cannot do anything with this window (move, resize, etc.), but you can run other programs in this window, including a window manager. For example, go to the /usr/X11R6/bin directory and issue the command fvwm or twm(one of these window managers is usually installed by default). After this, the screen view will change somewhat, you will be able to move windows (in the usual way, by clicking on the window title with the mouse), and by left-clicking on an empty field of the desktop you will exit to the menu.

If you choose this method of calling the graphical interface, then each time you start it you will have to repeat the same sequence of commands (not counting other disadvantages of this method). Naturally, the user should take advantage of the opportunity to create a .xinitrc script to automate this routine work.

Below is an example of a .xinitrc script that starts a watch, multiple terminals, and leaves the window manager as the "last" client.

#!/bin/sh

xrdb -load $HOME/.Xresources

xsetroot -solid gray &

xclock -g 50x50-0+0 -bw 0 &

xload -g 50x50-50+0 -bw 0 &

xterm -g 80x24+0+0 &

xterm -g 80x24+0-0 &

twm

It's important to note that programs launched from .xinitrc should run in the background unless they exit immediately. Otherwise, these programs will prevent other programs from launching. However, one of the running programs (usually a window manager or terminal emulator) must be running in the foreground rather than in the background so that the script does not terminate (by terminating that program, the user tells the program xinit, that I finished the work and that the program itself xinit should complete). In the example above, if the window manager is configured correctly, then to exit the X session, just select the command Exit in the manager menu twm.

Arguments given on the command line of the call xinit, allow you to bypass the execution of the .xinitrc and .xserverrc scripts. An alternative client program and/or an alternative server may be specified on the command line. The client program must be the first argument on the command line of the call xinit. To call a specific X server, add a double dash (after the client program and its arguments), followed by the name of the desired server.

The server and client program names must begin with a slash (/) or a period (.). Otherwise, they are treated as arguments added to the command line of the call to the corresponding (previous) program. This way, you can add arguments (for example, set background and text colors) without having to re-enter the entire command line.

If a specific server name is not specified and the double dash is followed by a colon followed by a number, xinit will treat this number as the display number instead of the default zero. In general, all arguments following the double dash are added to the command line of the server call.

Here are some command line examples of calling the program xinit.

$xinit

This command will start the server pointed to by link X and execute the user script .xinitrc, if one exists, otherwise it’s just launched xterm.

$ xinit -- /usr/X11R6/bin/Xqdss:1

Thus, it is possible to run a specific server on an alternative display.

$ xinit -geometry =80x65+10+10 -fn 8x13 -j -fg white -bg navy

This command will start the server pointed to by the link X, and the default command xterm the arguments listed on the command line will be passed. Script .xinitrc will be ignored.

$ xinit -e widgets -- .Xsun -l -c

In this case, the command used to start the server is . Xsun -l -c , and the default client program xterm arguments will be passed -e widgets.

Since a novice user typically lacks the expertise to create their own version of the .xinitrc script, site administrators can assist them in calling the GUI by creating a publicly available script that performs this function. Such scripts are usually called x11, xstart, or startx and are a convenient way to create a simple interface for novice users. Here is an example of a simple script of this type:

#!/bin/sh

xinit /usr/local/lib/site.xinitrc -- /usr/X11R6/bin/X bc

When installing the standard version of Red Hat Linux, a more complex version of the script is created startx, which is located in the /usr/X11/bin directory (you can browse it). There is also a man page for it, which says that this script is created simply as a sample for site administrators, and is intended for creating their own versions of such a script.

If you look at the standard version of the script startx, we will see that practically it comes down to executing just three commands:

xauth add $display . $mcookie

xauth add `hostname -f`$display . $mcookie

xinit $clientargs -- $display $serverargs

That is, ultimately startx calls the command we have already considered xinit, only pre-generates the required values ​​of the command line arguments for it. The first argument is the name of the xinitrc file, and if there is a .xinitrc file in the user's home directory, then it is taken (indicating the path), and if there is no such file in the home directory, then the system-wide file /etc/X11/xinit/xinitrc is taken, i.e. i.e. "clientargs" = "/etc/X11/xinit/xinitrc".

The value of the variable is formed in the same way serverargs: if there is a file.xserverrc in the user's home directory, then the variable serverargs will point to him. If there is no such file, then serverargs will point to /etc/X11/xinit/xserverrc. Variable display the value is assigned: 0. Further in the script startx the arguments that were specified on the command line when it was called are analyzed (we will not analyze this part in detail for now, since first we will call the script without parameters) and, finally, at the end of the call line xinit is added - auth $HOME/.Xauthority. Thus, immediately after installing the system (until the user has created the .xinitrc and . xserverrc in its home directory) will be called as follows:

xinit /etc/X11/xinit/xinitrc -- :0 /etc/X11/xinit/xserverrc -auth  $HOME/.Xauthority

Teams xauth and option -auth $HOME/.Xauthority, transmitted to the X server, they are used to authorize the user who starts the graphical mode. We are not interested in authorization mechanisms yet, so we will not consider this part (if interested, see the interactive guide man with Xsecurity parameter).

V. Kostromin (kos at rus-linux dot net) - 7.4. Starting the X Window System.

Ubuntu is one of the most popular Linux distributions developed by Canonical. By default, it uses its own graphical shell - Unity. It is applied on top of the Gnome 3 desktop environment and looks beautiful.

But Unity has one significant drawback - there are too few settings, and there are still some errors and shortcomings. In addition, not everyone likes this shell. But you don't have to use it, you can install any of the available desktop environments for Linux. Here your choice is limited only by your taste. In this article, we will look at the best graphical shells for Ubuntu 16.04, as well as how to install them on this system.

Gnome 3 or GNU Network Object Model Environment is part of the GNU Project and is developed by the Gnome Project team. This desktop environment is used as the default Ubuntu graphical shell in the Ubuntu Gnome edition of the distribution.

Main features:

  • Composite Manager Mutter or Compiz;
  • View Mode "Actions" allows you to see all open windows on one screen, move them between desktops, search and much more;
  • There is a desktop notification system;
  • Extensions are supported, with which you can change the appearance and functionality of the environment. You can install them from extensions.gnome.org;
  • By default windows cannot be minimized, it is recommended to use desktops and display mode to replace this feature "Actions". But minimizing windows can be enabled;
  • Dynamic number of desktops. You can open them as many as you need.

To install:

sudo apt install ubuntu-gnome-desktop

2.Xfce

Xfce is a lightweight desktop environment for Ubuntu and other Linux distributions. It consumes very few system resources, looks beautiful and is user friendly. Along with the environment itself, several additional applications, panels and plugins are supplied, and it also uses its own Xfwm window manager.

In addition to the standard components, this Ubuntu desktop environment includes additional programs with the xfce prefix. To install the xfce desktop environment on Ubuntu, run:

sudo apt-get install xubuntu-desktop

3. KDE Plasma

KDE is another very powerful and beautiful desktop environment, similar in functionality and resource consumption to Gnome. But, unlike Gnome, there are a lot of settings here, and you can configure the environment as you want. KDE has a Windows-like appearance, which is very useful for beginners.

Main features:

  • You can configure a huge number of parameters and literally any aspect of the behavior of the working environment;
  • Panels can be placed on the edges of the screen, used as launchpads or taxbars;
  • You can launch programs from the menu, through the launcher, or using shortcuts;
  • You can place Plasma widgets on your desktop;
  • Action mode allows you to switch between desktops and spaces.

To install the desktop environment and all additional packages, run in a terminal:

sudo apt install kubuntu-desktop

4. LXDE

LXDE is another lightweight desktop environment focused on minimal resource consumption and maximum performance. Openbox is used as a window manager. But besides this, the set includes several utilities with the LX prefix: system settings, application loader, panel, session manager, audio player, terminal and much more.

Main features:

  • Consumes little CPU and memory;
  • Looks simple and beautiful;
  • There are many settings you can use to make your environment look just the way you want it to;
  • Environment components can be used independently of each other.

To change the ubuntu desktop environment, run the following command:

sudo apt-get install lubuntu-desktop

5. Cinnamon

Cinnamon is a fork of Gnome 3 developed by the Linux Mint distribution team. The environment uses its own shell, which makes the Gnome 3 interface similar to Gnome 2. It uses new software, while at the same time you get a modern interface and the ability to install extensions. The environment has the usual panel at the bottom of the screen and application launch menu, as well as the ability to add widgets to the desktop.

To install:

sudo add-apt-repository ppa:embrosyn/cinnamon
$ sudo apt update
$ sudo apt install cinnamon blueberry

6. MATE

MATE is a fork of Gnome 2, which was created immediately after the announcement of the release of Gnome 3. Many users did not like the new version - they wanted to keep the same appearance. The environment looks exactly like the traditional Gnome 2 interface.

Key Features:

  • Has a traditional Gnome 2 look and feel;
  • Comes with older versions of some Gnome 2 applications;
  • All conflicts between MATE and Gnome 3 have been resolved, so both environments can be installed on the system without any problems.
  • GTK2 and GTK3 applications are supported.

To install use this command:

sudo apt-get install ubuntu-mate-desktop

7. Pantheon

Pantheon is a graphical front-end for Gnome 3, developed as part of the Elementary OS project. But it can be installed on Ubuntu as well.

Peculiarities:

  • The top panel is called WingPanel, it mixes the best of Gnome 2 and Gnome Shell panels;
  • The Slingshot launcher is used to launch applications;
  • At the bottom of the screen is the Plank dock;
  • The Cerebere utility runs in the background and monitors the operation of all other components, and also restarts them in case of an error;
  • You can choose which environment modules to use on your system.

To install, run the following commands:

sudo add-apt-repository ppa:elementary-os/daily
$ sudo apt update
$ sudo apt install elementary-desktop

8. GNOME Flashback

This is a version of the classic Gnome desktop environment, ported to new technologies such as GTK3 and others. This is its main difference from MATE: almost the same Gnome 2, only slightly updated - something between Gnome 2 and 3. It works better on older hardware.

Peculiarities:

  • Has a classic application menu and panel;
  • The panel is configured in the same way as in Gnome 2, only you need to press Alt;
  • Overall stability has been improved, applets can no longer be moved, and vertical panels work better.

To install, type the command:

sudo apt install gnome-session-flashback

9. Awesome

Awesome is not really a desktop environment, it's a tile-based window manager. By default, it comes with a panel where you can place your application applets, desktop switchers, and widgets. There are also several widget libraries that you can add to your desktop.

Tiling allows you to automatically switch the position of windows without overlapping so that they fill the screen evenly, but you can make windows float, as is implemented in regular environments.

Peculiarities:

  • No screen space is wasted;
  • There is no need to select the location of windows using the mouse or touchpad;
  • Setting up window snaps;
  • There is mouse support.

To install, just do:

sudo apt-get install awesome

10. Enlightenment (E)

Enlightenment environments focus on beautiful appearance while using minimal resources. It has a set of its own applications, as well as its own window manager. There's a dock at the bottom of the screen, and you can add widgets to the desktop. To install:

sudo add-apt-repository ppa:enlightenment-git/ppa
$ sudo apt-get update
$ sudo apt-get install e20

11.i3wm

i3wm is another great and simple tiled window manager. The developers have focused on maximum simplicity of both use and code with settings.

Peculiarities:

  • Multiple monitor support;
  • UTF-8 support;
  • Easy to set up (no programming language required);
  • Create layouts for window placement dynamically;
  • Processing floating and pop-up windows;
  • Various modes like in Vim.

To install:

sudo apt-get install i3

12.Deepin DE

The Deepin Linux distribution uses its own specially designed desktop environment, integrated with applications such as Deepin Video, Deepin Music and others. Its characteristic feature is the side settings panel like in WIndows 8.1, only much more convenient.

Installing the Ubuntu environment is done with the command:

sudo sh -c "echo "deb http://packages.linuxdeepin.com/deepin trusty main non-free universe" >> /etc/apt/sources.list"
$ sudo sh -c "echo "deb-src http://packages.linuxdeepin.com/deepin trusty main non-free universe" >> /etc/apt/sources.list"
$ wget http://packages.linuxdeepin.com/deepin/project/deepin-keyring.gpg
$ gpg --import deepin-keyring.gpg
$ sudo gpg --export --armor 209088E7 | sudo apt-key add -
$ sudo apt-get update
$ sudo apt-get install dde-meta-core python-deepin-gsettings deepin-music-player deepin-software-center deepin-movie deepin-game-center

13. Budgie

Budgie is a desktop environment based on Gnome and developed by the Solus distribution team. The developers focused on creating the most beautiful interface possible. This Ubuntu graphical shell is used by default in the Ubuntu Budgie edition, which recently became official.

Peculiarities:

  • Integrates with the Gnome stack;
  • There's a Raven sidebar where you can quickly access settings;
  • All settings are made through the Raven panel.

To install, type the following commands:

sudo add-apt-repository ppa:budgie-remix/ppa
$ sudo apt update
$ sudo apt install budgie-desktop

14.Openbox

Openbox is a window manager. It has a minimalistic appearance and is very highly customizable. You can change almost any aspect of the shell. You can customize the look however you want and use KDE or Gnome applications.

To install this Ubuntu desktop environment, run:

sudo apt install openbox

conclusions

In this article, we looked at the best graphical shells for Ubuntu 16.04. All of them can be installed on your operating system with relative ease. What to choose depends only on the taste of the user. What Ubuntu environment are you using? Which one would you recommend other users use? Write in the comments!

Despite the fact that when working with Linux servers it is customary to use the console, this is still far from the most convenient way to work with a computer. Especially when it comes to routine operations.

Therefore, it makes sense to optimize the work with it by installing a graphical or web interface.

Installation and use of the graphical shell will be discussed in this article. Let's take Ubuntu Server 16.04 as an example.

Installing the graphical shell

In Ubuntu Server, you can install either the standard Ubuntu shell or any other one, depending on your preferences.

The standard shell is installed using the command:

Shell

apt-get install ubuntu-desktop

This shell consumes much less system resources and also has an interface similar to Windows (see screenshot below). Therefore, newcomers to Linux who have previously worked with Windows should pay attention to it.

Despite the seemingly extensive menu, the LXDE shell can hardly be called super equipped. The abundance of programs and options out of the box is clearly not about it. Even the office is represented only by a program for viewing files. Only the bare minimum. No more.

But, nevertheless, for most typical tasks this is enough. Programs included in the LXDE distribution package that are most in demand during the work process:

  • Leafpad– a simple text editor. Analogous to Notepad in Windows;
  • LXTerminal– work with the console;
  • PCManFM- file manager;
  • Xarchiver– archiver. Supports formats: bz2, gz, lzma, xz, tar.bz2, tar.gz, tar.lzma, tar.xz, 7z.

Of the shortcomings.

When installing on Ubuntu in LXDE, the "End Session" button sometimes does not work. And, along with it, the ability not only to log out of the system, but also to reboot, put into sleep mode, etc. using a graphical interface.

This is due to the fact that this shell may not be installed correctly and it lacks the lxsession-logout program.

In order to fix this problem, simply install this program separately.

apt-get install lxsession-logout

apt - get install lxsession - logout

Installing a package managerSynaptic

Installing a graphical shell is already a big step in making it easier to work with the system. But installation of programs can still only be done from the console.

This problem can be solved by installing a graphical package manager. For example, Synaptic.

apt-get install synaptic

apt - get install synaptic

There are two ways to launch Synaptic:

  • Using the command

    sudo synaptic

  • Using a graphical interface.
    Main menu - "Debian" - "Applications" - "System" - "Package Management" - "Synaptic PackageManager"
  • When you start Synaptic (in LXDE all Synaptic windows work together with the “background” LXTeminal window) it will ask for a password for a user with rights to work as a superuser. After entering your username and password, the main Synaptic window will open.

    The “Brief Description” window can be closed and, if desired, disabled completely.

    In order to install a program using Synaptic, simply select the package by selecting the checkbox next to its name and clicking the “Apply” button on the toolbar. Then, after confirming the installation in the dialog box that opens, Synaptic will perform all the necessary actions automatically.

    If the program requires additional packages, Synaptic will offer to add them to the one already selected.

    If any package is already installed, the checkbox will be colored green.

    Installing programs using an exampleMySQLWorkbench

    To work with the MySQL DBMS in Linux, you can use the MySQL Workbench program just like in Windows. At the same time, the process of working with MySQL Workbench on Windows and Linux is no different.

    In Synaptic, the required package is located in the “Databases (universe)” section. We select the checkbox next to the mysql-workbench package and agree to add the necessary packages to the installation.

    After clicking the Apply button and confirming the installation, MySQL Workbench will be installed.

    You can launch it from the graphical interface as follows: Main menu - “Debian” - “Applications” - “Programming” - “MySQL Workbench”.

    Now working with MySQL is greatly simplified, and security is also significantly increased (when remote access to MySQL is disabled) since there is no longer a need not only to use console utilities, but also to open access via the web (phpMyAdmin).

    In a similar way, you can install other programs with a graphical interface to perform certain operations.

    Summary

    Using a graphical shell can greatly simplify working with the server.

    Of course, Linux doesn't allow you to completely abandon the console, but you don't really need to. Using graphical interface programs to perform basic operations is already enough to significantly optimize your work.

    Despite the well-established opinion that “real servers are made in the console,” the server still exists for you, and not you for the server. Therefore, there is nothing reprehensible in making work more convenient and efficient.