Add xrdp (Windows Remote Desktop) on Ubuntu 18.04 LTS Server
code | theme | Emacs |
---|
linenumbers | true |
---|
|
apt update
apt install xfce4 xubuntuxfce4-desktopgoodies lightdm xrdp uim uim-byeoru
adduser xrdp ssl-cert
mv /etc/xdg/autostart/light-locker.desktop /etc/xdg/autostart/light-locker.desktop.bak
reboot |
코드 블럭 |
---|
language | bash |
---|
theme | Emacs |
---|
linenumbers | true |
---|
|
cp -f /etc/xrdp/xrdp.ini /etc/xrdp/xrdp.ini.bak
cp -f /etc/xrdp/sesman.ini /etc/xrdp/sesman.ini.bak
sed -i "s/autorun=/autorun=Xorg/g" /etc/xrdp/xrdp.ini
sed -i "0,/allow_channels=true/{s/allow_channels=true/allow_channels=false/}" /etc/xrdp/xrdp.ini |
코드 블럭 |
---|
theme | Emacs |
---|
linenumbers | true |
---|
|
# update-alternatives --config x-session-manager
There are 3 choices for the alternative x-session-manager (providing /usr/bin/x-session-manager).
Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/bin/gnome-session 50 auto mode
1 /usr/bin/gnome-session 50 manual mode
2 /usr/bin/startxfce4 50 manual mode
3 /usr/bin/xfce4-session 40 manual mode
Press <enter> to keep the current choice[*], or type selection number: 3 |
코드 블럭 |
---|
language | bash |
---|
theme | Emacs | title | /etc/xrdp/xrdp.ini |
---|
linenumbers | true |
---|
|
[Globals]
#change port if you want
port=3389
... |
코드 블럭 |
---|
theme | Emacs |
---|
title | /etc/xrdp/startwm.sh |
---|
linenumbers | true |
---|
|
...
# Comment on the two lines
#test -x /etc/X11/Xsession && exec /etc/X11/Xsession
#exec /bin/sh /etc/X11/Xsession
# Add following 4 linessed -e 's/^test -x/# test -x/g; s/^exec /# exec /g' -i /etc/xrdp/startwm.sh
tee -a /etc/xrdp/startwm.sh << END
unset DBUS_SESSION_BUS_ADDRESS
unset XDG_RUNTIME_DIR
. \$HOME/.profile
xfce4-session |
코드 블럭 |
---|
theme | Emacs |
---|
linenumbers | true |
---|
|
systemctl restart xrdp
END
|
코드 블럭 |
---|
theme | Emacs |
---|
title | ~/etc/skel/.config/autostart/uim-toolbar.desktop |
---|
linenumbers | true |
---|
|
[Desktop Entry]
Encoding=UTF-8
Version=0.9.4
Type=Application
Name=uim-toolbar
Comment=
Exec=/usr/bin/uim-toolbar
OnlyShowIn=XFCE;
StartupNotify=false
Terminal=false
Hidden=false |
코드 블럭 |
---|
theme | Emacs |
---|
title | ~/etc/skel/.uim.d/customs/custom-global.scm |
---|
linenumbers | true |
---|
|
(define custom-preserved-default-im-name 'byeoru)
(define default-im-name 'byeoru)
(define enabled-im-list '(byeoru))
(define toggle-im-key '("<Meta> " "hangul"))
(define toggle-im-key? (make-key-predicate '("<Meta> " "hangul")))
(define toggle-im-alt-im 'byeoru)
(define byeoru-layout 'byeoru-layout-hangul2)
(define byeoru-on-key '("<Shift> " "hangul"))
(define byeoru-on-key? (make-key-predicate '("<Shift> " "hangul")))
(define byeoru-latin-key '("<Shift> " "hangul"))
(define byeoru-latin-key? (make-key-predicate '("<Shift> " "hangul"))) |
코드 블럭 |
---|
language | bash |
---|
theme | Emacs |
---|
linenumbers | true |
---|
|
mkdir -p /etc/skel/.config/autostart/
mkdir -p /etc/skel/.uim.d/customs/
vi /etc/skel/.uim.d/customs/custom-global.scm
vi /etc/skel/.config/autostart/uim-toolbar.desktop
S=/etc/skel
D=/root
mkdir -p $D/.config/autostart/
mkdir -p $D/.uim.d/customs/
cp -arp $S/.uim.d/customs/custom-global.scm $D/.uim.d/customs/
cp -arp $S/.config/autostart/uim-toolbar.desktop $D/.config/autostart/ |
코드 블럭 |
---|
language | bash |
---|
theme | Emacs |
---|
linenumbers | true |
---|
|
systemctl restart xrdp |
코드 블럭 |
---|
theme | Emacs |
---|
linenumbers | true |
---|
|
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
apt install -y ./google-chrome-stable_current_amd64.deb
mkdir -p /root/Desktop/
tee -a /root/Desktop/google-chrome.desktop << END
[Desktop Entry]
Version=1.0
Name=Google Chrome
Icon=google-chrome
Type=Application
Exec=/usr/bin/google-chrome-stable --no-sandbox
END
chmod 755 /root/Desktop/google-chrome.desktop |
코드 블럭 |
---|
theme | Emacs |
---|
linenumbers | true |
---|
|
apt install -y gedit
tee -a /root/Desktop/org.gnome.gedit.desktop << END
[Desktop Entry]
Name=Text Editor
Comment=Edit text files
Exec=gedit %U
Terminal=false
Type=Application
StartupNotify=true
MimeType=text/plain;
DBusActivatable=true
X-Ubuntu-Gettext-Domain=gedit
[Desktop Action new-window]
Name=New Window
Exec=gedit --new-window
[Desktop Action new-document]
Name=New Document
Exec=gedit --new-document
END
chmod 755 /root/Desktop/org.gnome.gedit.desktop
|
Ref
https://gist.github.com/jpwhite3/80007c752f09b52737d9b86dbf54daa9
...