-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopenbox.sh
53 lines (44 loc) · 1.36 KB
/
openbox.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
#!/bin/sh
# This script is modification of https://github.com/AndronixApp/AndronixOrigin/raw/master/WM/APT/openbox.sh (Licensed under MIT)
echo "Installing Openbox..."
apt install keyboard-configuration tzdata dialog libexo-2-0 openbox obconf tigervnc-standalone-server nano dbus-x11 xorg xfce4-terminal thunar cairo-dock --no-install-recommends -y
apt-get clean
echo 'Setting up Openbox...'
mkdir -p ~/.vnc
echo "#!/bin/bash
[ -r ~/.Xresources ] && xrdb ~/.Xresources
XAUTHORITY=~/.Xauthority
export XAUTHORITY
dbus-launch openbox
export PULSE_SERVER=127.0.0.1
dbus-launch cairo-dock" > ~/.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
apt remove xterm -y
apt autoremove -y
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