CENTOS GUI
2016-07-13 11:04
926 查看
http://unix.stackexchange.com/questions/181503/how-to-install-desktop-environments-on-centos-7
Would you like to answer one of these unanswered questions instead?
How to install Desktop Environments on CentOS 7?
up vote56down votefavorite 48 | I have recently installed CentOS 7 (Minimal Install without GUI) and now I want to install a GUI environment in it. How can I install Desktop Environments on previously installed CentOS7 without reinstalling it? centos gui desktop-environment
| |||
add a comment |
2 Answers
activeoldestvotesup vote99down voteaccepted | 1. Installing GNOME-Desktop:Install GNOME Desktop Environment on here.# yum -y groups install "GNOME Desktop" Input a command like below after finishing installation: # startx GNOME Desktop Environment will start. For first booting, initial setup runs and you have to configure it for first time. Select System language first. Select your keyboard type. Add online accounts if you'd like to. Finally click "Start using CentOS Linux". GNOME Desktop Environments starts like follows. How to use GNOME Shell?The default GNOME Desktop of CentOS 7 starts with classic mode but if you'd like to use GNOME Shell, set like follows:Option A: If you start GNOME with startx, set like follows. # echo "exec gnome-session" >> ~/.xinitrc Option B: set the system graphical login systemctl set-default graphical.targetand reboot the system. After system starts Click the button which is located next to the "Sign In" button. Select "GNOME" on the list. (The default is GNOME Classic) Click "Sign In" and log in with GNOME Shell. GNOME shell starts like follows: 2. Installing KDE-Desktop:Install KDE Desktop Environment on here.# yum -y groups install "KDE Plasma Workspaces" Input a command like below after finishing installation: # echo "exec startkde" >> ~/.xinitrc KDE Desktop Environment starts like follows: 3. Installing Cinnamon Desktop Environment:Install Cinnamon Desktop Environment on here.First Add the EPEL Repository (EPEL Repository which is provided from Fedora project.) Extra Packages for Enterprise Linux (EPEL) How to add EPEL Repository? # yum -y install epel-release # sed -i -e "s/\]$/\]\npriority=5/g" /etc/yum.repos.d/epel.repo # set [priority=5] # sed -i -e "s/enabled=1/enabled=0/g" /etc/yum.repos.d/epel.repo # for another way, change to [enabled=0] and use it only when needed # yum --enablerepo=epel install [Package] # if [enabled=0], input a command to use the repository And now install the Cinnamon Desktop Environment from EPEL Repository: # yum --enablerepo=epel -y install cinnamon* Input a command like below after finishing installation: # echo "exec /usr/bin/cinnamon-session" >> ~/.xinitrc Cinnamon Desktop Environment will start. For first booting, initial setup runs and you have to configure it for first time. Select System language first. Select your keyboard type. Add online accounts if you'd like to. Finally click "Start using CentOS Linux". Cinnamon Desktop Environment starts like follows. 4. Installing MATE Desktop Environment:Install MATE Desktop Environment on here.# yum --enablerepo=epel -y groups install "MATE Desktop" Input a command like below after finishing installation: # echo "exec /usr/bin/mate-session" >> ~/.xinitrc MATE Desktop Environment starts. 5. Installing Xfce Desktop Environment:Install Xfce Desktop Environment on here.# yum --enablerepo=epel -y groups install "Xfce" Input a command like below after finishing installation: # echo "exec /usr/bin/xfce4-session" >> ~/.xinitrc Xfce Desktop Environment starts.
| ||||||||
|
up vote5down vote | Rather than make use of the hacking of a startxcommand into a .xinitrcfile, it's probably better to tell Systemd that you want to boot into a graphical GUI vs. the terminal. To accomplish this simply do the following: $ sudo yum groupinstall "GNOME Desktop" $ ln -sf /lib/systemd/system/runlevel5.target /etc/systemd/system/default.target Then simply reboot. The last bit will associate the runlevel 5 target as your default with respect to Systemd. Doing it with SystemdYou can also use Systemd to accomplish this. This is arguably the better method since you're managing the state of the system directly through Systemd and its CLIs.You can see what your current default target is: $ sudo systemctl get-default multi-user.target And then change it to graphical: $ sudo systemctl set-default graphical.target TargetsIn Systemd the targets runlevel5.target and graphical.target are identical. So too are runlevel2.target and multi-user.target.Runlevel Target Units Description 0 runlevel0.target, poweroff.target Shut down and power off the system. 1 runlevel1.target, rescue.target Set up a rescue shell. 2 runlevel2.target, multi-user.target Set up a non-graphical multi-user system. 3 runlevel3.target, multi-user.target Set up a non-graphical multi-user system. 4 runlevel4.target, multi-user.target Set up a non-graphical multi-user system. 5 runlevel5.target, graphical.target Set up a graphical multi-user system. 6 runlevel6.target, reboot.target Shut down and reboot the system. ReferencesInstall Gnome GUI on CentOS 7 / RHEL 78.3. WORKING WITH SYSTEMD TARGETS
| ||||||||
|
protected by Community♦ Feb 10 at 1:03
Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).Would you like to answer one of these unanswered questions instead?
Not the answer you're looking for? Browse other questions tagged centos gui desktop-environment or ask your own question.
相关文章推荐
- 热插拔:软件+硬件 自己的学习总结
- linux sheel脚本里面“$? -eq o”
- linux的基本命令
- linux中less命令使用详解(内容分页显示)
- VMware安装CentOS7.0 图文教程
- centos文件权限详解
- 简单几步让CentOS系统时间同步
- 初窥Linux 之 我最常用的20条命令
- 简析 linux中free_page()释放页优化操作
- Linux远程下载文件的两种方法之 ftp命令和scp命令
- Linux TCP反向连接shellcode
- Linux centos中开机无法上网问题解决方法
- Linux目录结构
- centos 6.5 DNS服务器搭建
- Linux常用命令大全
- Linux设备驱动相关
- 在 Linux 下使用任务管理器
- centos 7 /etc/rc.local 开机不执行的问题
- 嵌入式linux------ffmpeg移植 解码H264(am335x解码H264到yuv420并通过SDL显示)
- linux硬件信息查看