apt update
apt install xfce4 xfce4-goodies lightdm xrdp uim uim-byeoru
adduser xrdp ssl-cert
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
# 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
sed -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
END
/etc/skel/.config/autostart/uim-toolbar.desktop
[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
/etc/skel/.uim.d/customs/custom-global.scm
(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")))
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/
systemctl restart xrdp
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
apt install -y ./google-chrome-stable_current_amd64.deb
apt install -y gedit
mkdir /etc/skel/Desktop
cd /etc/skel/Desktop
cp /usr/share/applications/{google-chrome.desktop,org.gnome.gedit.desktop,exo-terminal-emulator.desktop} .
chmod 755 *.desktop

mkdir -p /root/Desktop
cp -arp /etc/skel/Desktop/* /root/Desktop
sed -e 's/Exec=/usr/bin/google-chrome-stable/Exec=/usr/bin/google-chrome-stable --no-sandbox/g' -i /root/Desktop/google-chrome.desktop

Ref

https://gist.github.com/jpwhite3/80007c752f09b52737d9b86dbf54daa9

https://askubuntu.com/questions/1063481/lightlocker-and-xscreensaver-conflicting

https://unix.stackexchange.com/questions/367294/how-do-i-change-my-default-session

https://lapina.tistory.com/147

https://c-nergy.be/blog/?p=9285

  • 레이블 없음