본문으로 바로가기

콘솔 화면은 우분투의 데스크톱 환경으로 접속 할 수 있다. 하지만, 원격으로 접속하는 방법은 SSH가 일반적이다. 리눅스와 유닉스의 데스크톱 환경으로 접속하게 해주는 Xmanager 라는 유료 제품도 있다. 오늘 알아볼 것은 우분투에서 패키지로 제공하는 xrdp 원격 데스크톱 서비스와 데스크톱 환경 xfce4를 구축 하는 방법이다. xrdp와 xfce4를 설치하면 윈도우의 원격 데스크톱으로 리눅스 데스크톱 환경에 접속 할 수 있다.


xrdp, xfce4 패키지로 설치하기. -y 옵션을 사용하면 사용자의 입력을 묻는 것에 대답 할 필요 없이 자동으로 설치 된다. xfce4는 설치 해야 할 패키지가 많아 1분 정도 걸린 듯 하다.

root@localhost:~# apt install -y xrdp

Reading package lists... Done

Building dependency tree

Reading state information... Done

The following additional packages will be installed:

  vnc4server xbase-clients

Suggested packages:

  vnc-java x11-xfs-utils

The following NEW packages will be installed:

  vnc4server xbase-clients xrdp

0 upgraded, 3 newly installed, 0 to remove and 123 not upgraded.

Need to get 1841 kB of archives.

After this operation, 7135 kB of additional disk space will be used.

Get:1 http://kr.archive.ubuntu.com/ubuntu xenial/universe amd64 xbase-clients all 1:7.7+13ubuntu3 [4570 B]

Get:2 http://kr.archive.ubuntu.com/ubuntu xenial/universe amd64 vnc4server amd64 4.1.1+xorg4.3.0-37.3ubuntu2 [1622 kB]

Get:3 http://kr.archive.ubuntu.com/ubuntu xenial/universe amd64 xrdp amd64 0.6.1-2 [215 kB]

Fetched 1841 kB in 0s (12.4 MB/s)

Selecting previously unselected package xbase-clients.

(Reading database ... 214585 files and directories currently installed.)

Preparing to unpack .../xbase-clients_1%3a7.7+13ubuntu3_all.deb ...

Unpacking xbase-clients (1:7.7+13ubuntu3) ...

Selecting previously unselected package vnc4server.

Preparing to unpack .../vnc4server_4.1.1+xorg4.3.0-37.3ubuntu2_amd64.deb ...

Unpacking vnc4server (4.1.1+xorg4.3.0-37.3ubuntu2) ...

Selecting previously unselected package xrdp.

Preparing to unpack .../xrdp_0.6.1-2_amd64.deb ...

Unpacking xrdp (0.6.1-2) ...

Processing triggers for man-db (2.7.5-1) ...

Processing triggers for systemd (229-4ubuntu21.1) ...

Processing triggers for ureadahead (0.100.0-19) ...

Setting up xbase-clients (1:7.7+13ubuntu3) ...

Setting up vnc4server (4.1.1+xorg4.3.0-37.3ubuntu2) ...

update-alternatives: using /usr/bin/vnc4server to provide /usr/bin/vncserver (vncserver) in auto mode

update-alternatives: using /usr/bin/Xvnc4 to provide /usr/bin/Xvnc (Xvnc) in auto mode

update-alternatives: using /usr/bin/x0vnc4server to provide /usr/bin/x0vncserver (x0vncserver) in auto mode

update-alternatives: using /usr/bin/vnc4passwd to provide /usr/bin/vncpasswd (vncpasswd) in auto mode

update-alternatives: using /usr/bin/vnc4config to provide /usr/bin/vncconfig (vncconfig) in auto mode

Setting up xrdp (0.6.1-2) ...

Processing triggers for systemd (229-4ubuntu21.1) ...

Processing triggers for ureadahead (0.100.0-19) ...



root@localhost:~# apt install -y xfce4

Reading package lists... Done

Building dependency tree

Reading state information... Done

The following additional packages will be installed:

  desktop-base exo-utils greybird-gtk-theme gtk2-engines-pixbuf gtk2-engines-xfce libbonobo2-0 libbonobo2-common

  libbonoboui2-0 libbonoboui2-common libexo-1-0 libexo-common libexo-helpers libgarcon-1-0 libgarcon-common libglade2-0

  libgnome-2-0 libgnome2-0 libgnome2-bin libgnome2-common libgnomecanvas2-0 libgnomecanvas2-common libgnomeui-0

  libgnomeui-common libgnomevfs2-0 libgnomevfs2-common libjpeg-progs libjpeg9 libkeybinder-3.0-0 libkeybinder0

  liborbit-2-0 libthunarx-2-0 libtumbler-1-0 libwnck-common libwnck22 libxfce4panel-2.0-4 libxfce4ui-1-0 libxfce4ui-2-0

  libxfce4ui-common libxfce4ui-utils libxfce4util-bin libxfce4util-common libxfce4util7 libxfconf-0-2 orage pavucontrol

  tango-icon-theme thunar thunar-data thunar-volman tumbler tumbler-common xfce4-appfinder xfce4-notifyd xfce4-panel

  xfce4-pulseaudio-plugin xfce4-session xfce4-settings xfce4-volumed xfconf xfdesktop4 xfdesktop4-data xfwm4

  xscreensaver xscreensaver-data xubuntu-icon-theme

Suggested packages:

  libbonobo2-bin gnome-icon-theme libgnomevfs2-bin libgnomevfs2-extra gamin | fam gnome-mime-data devhelp sox

  kdelibs-data thunar-archive-plugin thunar-media-tags-plugin tumbler-plugins-extra xfce4-goodies xfce4-power-manager

  gtk3-engines-xfce fortunes-mod menu xfwm4-themes xfishtank xdaliclock xscreensaver-gl fortune qcam | streamer gdm3

  | kdm-gdmcompat

Recommended packages:

  perl5

The following NEW packages will be installed:

  desktop-base exo-utils greybird-gtk-theme gtk2-engines-pixbuf gtk2-engines-xfce libbonobo2-0 libbonobo2-common

  libbonoboui2-0 libbonoboui2-common libexo-1-0 libexo-common libexo-helpers libgarcon-1-0 libgarcon-common libglade2-0

  libgnome-2-0 libgnome2-0 libgnome2-bin libgnome2-common libgnomecanvas2-0 libgnomecanvas2-common libgnomeui-0

  libgnomeui-common libgnomevfs2-0 libgnomevfs2-common libjpeg-progs libjpeg9 libkeybinder-3.0-0 libkeybinder0

  liborbit-2-0 libthunarx-2-0 libtumbler-1-0 libwnck-common libwnck22 libxfce4panel-2.0-4 libxfce4ui-1-0 libxfce4ui-2-0

  libxfce4ui-common libxfce4ui-utils libxfce4util-bin libxfce4util-common libxfce4util7 libxfconf-0-2 orage pavucontrol

  tango-icon-theme thunar thunar-data thunar-volman tumbler tumbler-common xfce4 xfce4-appfinder xfce4-notifyd

  xfce4-panel xfce4-pulseaudio-plugin xfce4-session xfce4-settings xfce4-volumed xfconf xfdesktop4 xfdesktop4-data xfwm4

  xscreensaver xscreensaver-data xubuntu-icon-theme

0 upgraded, 66 newly installed, 0 to remove and 123 not upgraded.

Need to get 22.6 MB of archives.

After this operation, 95.2 MB of additional disk space will be used.

Get:1 http://kr.archive.ubuntu.com/ubuntu xenial/universe amd64 desktop-base all 8.0.2ubuntu1 [6416 kB]

Get:2 http://kr.archive.ubuntu.com/ubuntu xenial/main amd64 libbonobo2-common all 2.32.1-3 [34.7 kB]

Get:3 http://kr.archive.ubuntu.com/ubuntu xenial/main amd64 liborbit-2-0 amd64 1:2.14.19-1build1 [140 kB]

Get:4 http://kr.archive.ubuntu.com/ubuntu xenial/main amd64 libbonobo2-0 amd64 2.32.1-3 [211 kB]


-- 생략 --


Setting up xfce4-notifyd (0.2.4-3ubuntu1) ...

Setting up xfce4-volumed (0.2.0-0ubuntu2) ...

Setting up xscreensaver-data (5.34-2ubuntu1) ...

Setting up xscreensaver (5.34-2ubuntu1) ...

Setting up xubuntu-icon-theme (16.04.2) ...

Processing triggers for initramfs-tools (0.122ubuntu8.10) ...

update-initramfs: Generating /boot/initrd.img-4.13.0-45-generic

Processing triggers for libc-bin (2.23-0ubuntu10) ...


정상적으로 설치 되었는지 확인한다.

root@localhost:~# dpkg -l xrdp xfce4

Desired=Unknown/Install/Remove/Purge/Hold

| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend

|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)

||/ Name                     Version           Architecture      Description

+++-========================-=================-=================-======================================================

ii  xfce4                    4.12.2            all                   Meta-package for the Xfce Lightweight Desktop Environm

ii  xrdp                     0.6.1-2           amd64             Remote Desktop Protocol (RDP) server


원격 데스크톱으로 접속할 때, xfce4의 환경을 사용하기 위한 설정을 한다. xfce4가 속도면에서 장점이 있다.

root@localhost:~# echo "xfce4-session" > ~/.xsession

root@localhost:~# cat .xsession

xfce4-session


xrdp 서비스를 재시작한다.

root@localhost:~# service xrdp restart


윈도우 원격 데스크톱으로 접속하기. "윈도우키 + R" 로 실행 창 불러오기.


우분투 서버의 IP를 입력한다.


우분투에 원격 접속 된 화면, 계정 정보를 입력한다.


우분투 원격 데스크톱 환경에 접속 완료.