-
Notifications
You must be signed in to change notification settings - Fork 0
/
xfce.sh
52 lines (43 loc) · 1.29 KB
/
xfce.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/sh
# This script is modification of https://raw.githubusercontent.com/AndronixApp/AndronixOrigin/master/Fedora/XFCE4/xfce4_de.sh (Licensed under MIT)
echo 'Installing XFCE, please wait...'
dnf install epel-release
dnf config-manager --set-enabled powertools
dnf install 'dnf-command(copr)'
dnf copr enable stenstorp/lightdm
dnf groupinstall xfce -y
dnf install lightdm tigervnc-server dbus-x11 pulseaudio -y
echo 'Setting up XFCE, please wait...'
mkdir ~/.vnc
echo '#!/bin/sh
xrdb $HOME/.Xresources
startxfce4
export PULSE_SERVER=127.0.0.1' >> ~/.vnc/xstartup
echo '#!/usr/bin/env bash
export USER=root
export HOME=/root
vncserver -name remote-desktop -localhost no :1
echo 'VNC server address: 127.0.0.1:1'' >> /usr/local/bin/start
echo '#!/usr/bin/env bash
export USER=root
export HOME=/root
vncserver -kill :1
rm -rf /root/.vnc/localhost:1.pid
rm -rf /tmp/.X1-lock
rm -rf /tmp/.X11-unix/X1' >> /usr/local/bin/stop
echo '#!/bin/sh
stop
start' >> /usr/local/bin/restart
cd /usr/local/bin
chmod +x start
chmod +x stop
chmod +x restart
cd
chmod +x ~/.vnc/xstartup
echo "export DISPLAY=":1"" >> /etc/profile
source /etc/profile
echo 'Starting up VNC Server'
echo 'To start VNC server use start command'
echo 'To stop VNC server use stop command'
echo 'To restart VNC server use restart command'
start