Friday, July 18, 2014

Install GNOME 3 on top of minimal Centos 7 installation

I was trying to install pidgin on Centos 7 virtual machine. Unfortunatelly it was only minimal server installation. In this post I will describe how to install GNOME 3 to already installed machine.

To install, test and use pidgin I need some kind of desktop environment. I will use yum to display available desktop environments. Desktop environments are printed in bold:

[root@centos-7 ~]$ yum grouplist
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: ftp.cvut.cz
 * extras: centos.ionic.net.pl
 * updates: centos.ionic.net.pl
Available environment groups:
   Minimal Install
   Infrastructure Server
   File and Print Server
   Basic Web Server
   Virtualization Host
   Server with GUI
   GNOME Desktop
   KDE Plasma Workspaces
   Development and Creative Workstation
Available Groups:
   Compatibility Libraries
   Console Internet Tools
   Development Tools
   Graphical Administration Tools
   Legacy UNIX Compatibility
   Scientific Support
   Security Tools
   Smart Card Support
   System Administration Tools
   System Management
Done

To install GNOME 3:

yum -y groupinstall "GNOME3 desktop"

Last step is to tell linux that I want to boot to graphical environment by default. On previous version I would do it by setting runlevel to 5 in /etc/inittab. In Centos 7 I have to tell systemd what default target should be:

[root@centos-7 ~]$ ls -l /etc/systemd/system/default.target
lrwxrwxrwx. 1 root root 37 Jul 18 13:07 /etc/systemd/system/default.target -> /lib/systemd/system/multi-user.target
[root@centos-7 ~]$ ln -sf /etc/systemd/system/default.target /lib/systemd/system/graphical.target
[root@centos-7 ~]$ ls -l /etc/systemd/system/default.target
lrwxrwxrwx. 1 root root 37 Jul 18 13:07 /etc/systemd/system/default.target -> /lib/systemd/system/multi-user.target

Everything is prepared now. I will start graphical environment as non-root user:

[vajko@centos-7 ~]$ startx

And that's it.

1 comment:

  1. You've got the link arguments backwards. It should be:

    ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target

    ReplyDelete