{"id":960,"date":"2018-04-23T11:57:57","date_gmt":"2018-04-23T11:57:57","guid":{"rendered":"http:\/\/jaipurhosting.com\/blog\/?p=960"},"modified":"2019-04-29T15:20:17","modified_gmt":"2019-04-29T09:50:17","slug":"how-to-setup-a-desktop-environment-in-cent-os-7","status":"publish","type":"post","link":"https:\/\/www.jaipurhosting.com\/blog\/how-to-setup-a-desktop-environment-in-cent-os-7\/","title":{"rendered":"How To Setup A Desktop Environment in Cent OS 7"},"content":{"rendered":"<p><strong>Description&nbsp;<\/strong><\/p>\n<p>A default CentOS 7 instance comes with a graphical user interface (GUI) installed.<\/p>\n<p>However, in case you have decided to skip the GUI installation, or are using a minimal distribution, you can always set up your visual environment later.<\/p>\n<p>As CentOS is a distribution typically aimed for systems administrators, most users prefer working on their system over the terminal.<\/p>\n<p>You can check with the centos plan details<\/p>\n<p>#The most common desktop environments for Linux distributions<\/p>\n<p><strong>GNOME3<\/strong><br \/>\n<strong>KDE Plasma 5<\/strong><br \/>\n<strong>Cinnamon<\/strong><br \/>\n<strong>MATE<\/strong><br \/>\n<strong>Xfce<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p><strong>Step 1 :&nbsp;<\/strong><\/p>\n<p>Check with the available group list using below command<\/p>\n<pre class=\"theme:dark-terminal lang:default decode:true \">[root@vps ~]# yum group list<\/pre>\n<p>&nbsp;<\/p>\n<p>Now we are going to look about installing of Gnome desktop<\/p>\n<p><strong>Step 2 :&nbsp;<\/strong><\/p>\n<p>Execute the below command to install GNOME 3 desktop environment<\/p>\n<pre class=\"theme:dark-terminal lang:default decode:true \">[root@vps ~]# yum -y groupinstall \u201cGNOME Desktop\u201d<\/pre>\n<p>&nbsp;<\/p>\n<p>This will take some time to install.<\/p>\n<p>Once this is done, execute the command- startx. This is used to start the GUI.<\/p>\n<pre class=\"theme:dark-terminal lang:default decode:true \">[root@vps ~]# startx<\/pre>\n<p>&nbsp;<\/p>\n<p><strong>Step 3 :&nbsp;<\/strong><\/p>\n<p>The GNOME desktop environment is now set up.<\/p>\n<p>For the initial boot, you will have to configure the following<\/p>\n<p><strong>System Language<\/strong><br \/>\n<strong>Keyboard type<\/strong><br \/>\n<strong>Online accounts<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>Once you\u2019ve entered your preferred settings for the items listed above, GNOME Desktop will have started in Classic mode.<\/p>\n<p>You can check the default settings by using the below command<\/p>\n<p>&nbsp;<\/p>\n<pre class=\"theme:dark-terminal lang:default decode:true \">[root@vps ~]# systemctl get-default<\/pre>\n<p>&nbsp;<\/p>\n<p>This will return the default type- <strong>multi-user.target<\/strong><\/p>\n<p>&nbsp;<\/p>\n<pre class=\"theme:dark-terminal lang:default decode:true \">[root@vps ~]# multi-user.target<\/pre>\n<p>&nbsp;<\/p>\n<p><strong>Step 4 :&nbsp;<\/strong><\/p>\n<p>We can change this setting to GNOME shell by using either of the two options detailed below<\/p>\n<p>Option 1,&nbsp;If you use the startx command to start the service, you can then execute the following<\/p>\n<p>&nbsp;<\/p>\n<pre class=\"theme:dark-terminal lang:default decode:true \">[root@vps ~]# echo \u201cexec gnome-session\u201d &gt;&gt; ~\/.xinitr<\/pre>\n<pre class=\"theme:dark-terminal lang:default decode:true \">[root@vps ~]# startx<\/pre>\n<p>&nbsp;<\/p>\n<p>Option 2, use the command systemctl set-default graphical.target and reboot the system<\/p>\n<pre class=\"theme:dark-terminal lang:default decode:true \">[root@vps ~]# systemctl set-default graphical.target<\/pre>\n<p>After reboot, click the button next to Sign In.<\/p>\n<p>Select GNOME from the list.<\/p>\n<p>Click Sign in and you will have logged in with a GNOME shell.<\/p>\n<p><strong>Step 5 :&nbsp;<\/strong><\/p>\n<p>Here is a list of systemd targets with the specific level defined.<\/p>\n<p>By default, this is set to level 3 and in order to use a GUI we must change it to level 5.<\/p>\n<p>&nbsp;<\/p>\n<style type=\"text\/css\"><!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}--><\/style>\n<table dir=\"ltr\" style=\"height: 250px;\" border=\"1\" width=\"696\" cellspacing=\"0\" cellpadding=\"0\">\n<colgroup>\n<col width=\"100\">\n<col width=\"246\">\n<col width=\"273\"><\/colgroup>\n<tbody>\n<tr>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;RUN LEVEL&quot;}\">RUN LEVEL<\/td>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;\\tTARGET UNITS&quot;}\">TARGET UNITS<\/td>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;DESCRIPTION&quot;}\">DESCRIPTION<\/td>\n<\/tr>\n<tr>\n<td data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:0}\">0<\/td>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;runlevel0.target, poweroff.target&quot;}\">runlevel0.target, poweroff.target<\/td>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;\\tShut down and power off the system&quot;}\">Shut down and power off the system<\/td>\n<\/tr>\n<tr>\n<td data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:1}\">1<\/td>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;runlevel1.target, rescue.target&quot;}\">runlevel1.target, rescue.target<\/td>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;\\tSet up a rescue shell&quot;}\">Set up a rescue shell<\/td>\n<\/tr>\n<tr>\n<td data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:2}\">2<\/td>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;runlevel2.target, multi-user.target&quot;}\">runlevel2.target, multi-user.target<\/td>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;\\tSet up a non-graphical multi-user system&quot;}\">Set up a non-graphical multi-user system<\/td>\n<\/tr>\n<tr>\n<td data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:3}\">3<\/td>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;runlevel3.target, multi-user.target&quot;}\">runlevel3.target, multi-user.target<\/td>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Set up a non-graphical multi-user system&quot;}\">Set up a non-graphical multi-user system<\/td>\n<\/tr>\n<tr>\n<td data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:4}\">4<\/td>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;runlevel4.target, multi-user.target&quot;}\">runlevel4.target, multi-user.target<\/td>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Set up a non-graphical multi-user system&quot;}\">Set up a non-graphical multi-user system<\/td>\n<\/tr>\n<tr>\n<td data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:5}\">5<\/td>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;runlevel5.target, graphical.target&quot;}\">runlevel5.target, graphical.target<\/td>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Set up a graphical multi-user system&quot;}\">Set up a graphical multi-user system<\/td>\n<\/tr>\n<tr>\n<td data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:6}\">6<\/td>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;runlevel6.target, reboot.target&quot;}\">runlevel6.target, reboot.target<\/td>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Shut down and reboot the system&quot;}\">Shut down and reboot the system<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p><strong>Step 6 : Installing KDE DESKTOP&nbsp;<\/strong><\/p>\n<p>To install the KDE environment you can use the command- yum -y groupinstall \u201cKDE\u201d<\/p>\n<pre class=\"theme:dark-terminal lang:default decode:true \">[root@vps ~]# yum -y groupinstall \u201cKDE\u201d<\/pre>\n<p>&nbsp;<\/p>\n<p>This will take some time to complete. After the installation is complete, use the following commands to start in GUI mode<\/p>\n<pre class=\"theme:dark-terminal lang:default decode:true \">[root@vps ~]# startx<\/pre>\n<p>Reboot the system and you will be able see the KDE desktop environment up and running.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Step 7 : Installing CINNAMON DESKTOP<\/strong><\/p>\n<p>Before starting the Cinnamon installation, you will have to add the EPEL (Extra Packages for Enterprise Linux) repository to your system.<\/p>\n<p>Use the&nbsp; <a href=\"http:\/\/jaipurhosting.com\/blog\/how-to-enable-epel-repository-in-centos-7\/\">Link&nbsp;<\/a> to know about EPEL repository<\/p>\n<p>Then use the command- yum install cinnamon -y to complete the installation.<\/p>\n<pre class=\"theme:dark-terminal lang:default decode:true \">[root@vps ~]# yum install cinnamon -y<\/pre>\n<p>Once the installation is complete, you can use following commands to start the GUI.<\/p>\n<p>The Cinnamon desktop will be seen on reboot. As usual, the first time you use it you will have to set language preferences, among other things.<\/p>\n<pre class=\"theme:dark-terminal lang:default decode:true \">[root@vps ~]# echo \"exec \/usr\/bin\/cinnamon-session\"&gt;&gt; ~\/.xinitrc<\/pre>\n<pre class=\"theme:dark-terminal lang:default decode:true \">[root@vps ~]# startx<\/pre>\n<p>&nbsp;<\/p>\n<p><strong>Step 8 : Installing MATE DESKTOP&nbsp;<\/strong><\/p>\n<p>Similar to Cinnamon, you will have to first install the EPEL repository in case it is not already present, using the command- yum install epel-release -y.<\/p>\n<p>Once this is done, you can install MATE desktop using the command \u2013 yum groupinstall \u201cMATE Desktop\u201d<\/p>\n<pre class=\"theme:dark-terminal lang:default decode:true \">[root@vps ~]# yum groupinstall \u201cMATE Desktop\u201d<\/pre>\n<p>You can now start the environment and reboot the system to make it effective<\/p>\n<pre class=\"theme:dark-terminal lang:default decode:true \">[root@vps ~]# echo \"exec \/usr\/bin\/cinnamon-session\"&gt;&gt; ~\/.xinitrc<\/pre>\n<pre class=\"theme:dark-terminal lang:default decode:true \">[root@vps ~]# startx<\/pre>\n<p>&nbsp;<\/p>\n<p><strong>Step 9 : Installing XFCE DESKTOP<\/strong><\/p>\n<p>For our final desktop environment, first install the EPEL repository using the command- yum install epel-release -y.<\/p>\n<p>Then, you may install Xfce using the command- yum groupinstall xfce -y<\/p>\n<pre class=\"theme:dark-terminal lang:default decode:true \">[root@vps ~]# yum groupinstall xfce -y<\/pre>\n<p>Once installed, you can execute the following commands to start Xfce.<\/p>\n<pre class=\"theme:dark-terminal lang:default decode:true \">[root@vps ~]# echo \"exec \/usr\/bin\/cinnamon-session\"&gt;&gt; ~\/.xinitrc<\/pre>\n<pre class=\"theme:dark-terminal lang:default decode:true \">[root@vps ~]# startx<\/pre>\n<p>&nbsp;<\/p>\n<p>We hope you\u2019ve found this useful!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Description&nbsp; A default CentOS 7 instance comes with a graphical user interface (GUI) installed. However, in case you have decided to skip the GUI installation, or are using a minimal distribution, you can always set up your visual environment later. As CentOS is a distribution typically aimed for systems administrators, most users prefer working on [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1307,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-960","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-categorized"],"_links":{"self":[{"href":"https:\/\/www.jaipurhosting.com\/blog\/wp-json\/wp\/v2\/posts\/960","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jaipurhosting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jaipurhosting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jaipurhosting.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jaipurhosting.com\/blog\/wp-json\/wp\/v2\/comments?post=960"}],"version-history":[{"count":3,"href":"https:\/\/www.jaipurhosting.com\/blog\/wp-json\/wp\/v2\/posts\/960\/revisions"}],"predecessor-version":[{"id":1556,"href":"https:\/\/www.jaipurhosting.com\/blog\/wp-json\/wp\/v2\/posts\/960\/revisions\/1556"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.jaipurhosting.com\/blog\/wp-json\/wp\/v2\/media\/1307"}],"wp:attachment":[{"href":"https:\/\/www.jaipurhosting.com\/blog\/wp-json\/wp\/v2\/media?parent=960"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jaipurhosting.com\/blog\/wp-json\/wp\/v2\/categories?post=960"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jaipurhosting.com\/blog\/wp-json\/wp\/v2\/tags?post=960"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}