-
Notifications
You must be signed in to change notification settings - Fork 0
/
kde.sh
66 lines (58 loc) · 1.65 KB
/
kde.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
bin/sh
# This script is modification of https://raw.githubusercontent.com/EXALAB/Anlinux-Resources/master/Scripts/DesktopEnvironment/Heavy/KDE/Ubuntu/de-ubuntu-kde.sh (Licensed under GPL-2.0)
echo 'Installing KDE, please wait...'
dnf config-manager --set-enabled powertools
dnf install epel-release
dnf groupinstall "KDE Plasma Workspaces" --skip-broken
dnf install tigervnc-server dbus-x11 pulseaudio tigervnc-server-module -y
echo 'Setting up KDE, please wait...'
mkdir ~/.vnc
echo '#!/bin/bash
xrdb $HOME/.Xresources
dbus-launch startplasma-x11
export PULSE_SERVER=127.0.0.1' >> ~/.vnc/xstartup
echo '#!/bin/sh
export USER=root
export HOME=/root
case `uname -m` in
aarch64)
archurl="aarch64" ;;
arm*)
archurl="arm" ;;
amd64)
archurl="x86_64" ;;
x86_64)
archurl="x86_64" ;;
i*86)
archurl="i386" ;;
x86)
archurl="i386" ;;
*)
echo "unknown architecture"; exit 1 ;;
esac
LD_PRELOAD=/lib/${archurl}-linux-gnu/libgcc_s.so.1 vncserver -name remote-desktop -localhost no :1
echo 'VNC server address: 127.0.0.1:1'' >> /usr/local/bin/start
echo '#!/bin/sh
export USER=root
export HOME=/root
vncserver -kill :1
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
dnf remove konqueror ksysguard plasma-discover kde-partition-manager kde-connect kwalletmanager -y
passwd
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