Installing XRDP on Ubuntu 13.04 Install needed Packages #apt-get install vnc4server autoconf automake libtool libssl-dev libpam0g-dev libx11-dev libxfixes-dev git gcc and install the updated version of XRDP #cd /tmp #git clone https://github.com/charlesvg/xrdp.git #mv xrdp /usr/lib/xrdp-v0.7-obasi #cd /usr/lib/xrdp-v0.7-obasi Now to install updated version of XRDP #./bootstrap #./configure #make #make install Generate custom rsakeys.ini #/usr/local/bin/xrdp-keygen xrdp auto Configure session manager #nano –w /etc/xrdp/sesman.ini Edit the line to AllowRoot=0 AssignSessionByname=1 Setup s Groups #/usr/sbin/groupadd tss #/usr/sbin/groupadd tss Edit Groups file #nano -w /etc/group Edit the following lines to look like this. tss:x:501:YOURNAME tss:x:502:root Now to setup VNC for the that you want to use XRDP Services #su YOURNAME #vncwd Insert your twice #exit To return root Start vnc4server #su YOURNAME #vnc4server -geometry 800x600 #killall Xvnc4 #nano -w ~/vnc/xstartup
Make the file look like this: #!/bin/sh # Uncomment the following two lines for normal desktop: unset SESSION_MANAGER # exec /etc/X11/xinit/xinitrc [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources xsetroot -solid grey vncconfig -iconic & #x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" & #x-window-manager & startxfce4 & Starting xfce session with X : Fix gray screen issue #echo “xfce4-session” > /home/YOURNAME/.xsession Remove display environment variables #cat /home/YOURNAME/.bashrc Make sure there is no DISPLAY environment variable defined #cat /home/YOURNAME/.bash_profile Make sure there is no DISPLAY environment variable defined Now to hook XRDP and vnc4server to the rc.local file #nano -w /etc/rc.local Add the following to the end of the file /etc/xrdp/xrdp.sh start su YOURNAME -c “vnc4server -geometry 800x600 -depth 16” Copy keyboard settings /usr/lib64/xrdp-v0.7-obasi/instfiles/km-0813.ini /etc/xrdp/ Remove all modes from /etc/xrdp/xrdp.ini except xvnc... Turn on the services #/sbin/chkconfig vncserver on #/etc/xrdp/xrdp.sh start Turn off terminal bell
Installing XRDP on Centos 5 Stop NX #/sbin/chkconfig freenx-server off #/etc/init.d/freenx-server stop Install/Update EPEL & RPMforge #cd /tmp #wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el5.rf.x86_64.rpm #rpm -Uvh rpmforge-release-0.5.3-1.el5.rf.x86_64.rpm #rm -f rpmforge-release-0.5.3-1.el5.rf.x86_64.rpm #rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm Install needed Packages #yum install -y vnc-server autoconf automake libtool openssl-devel pam-devel libX11-devel libXfixes-devel git gcc and install the updated version of XRDP #cd /tmp #git clone https://github.com/charlesvg/xrdp.git #mv xrdp /usr/lib64/xrdp-v0.7-obasi #cd /usr/lib64/xrdp-v0.7-obasi Now to install updated version of XRDP #./bootstrap #./configure #make #make install Generate custom rsakeys.ini #/usr/local/bin/xrdp-keygen xrdp auto Configure session manager #nano –w /etc/xrdp/sesman.ini Edit the line to AllowRoot=0 AssignSessionByname=1 Setup s Groups #/usr/sbin/groupadd tss #/usr/sbin/groupadd tss Edit Groups file #nano -w /etc/group Edit the following lines to look like this. tss:x:501:YOURNAME tss:x:502:root
Now to setup VNC for the that you want to use XRDP Services #su YOURNAME #vncwd Insert your twice #exit To return root Edit the VNC Server #nano -w /etc/sysconfig/vncservers Insert at the end of file VNCSERVERS="1:YOURNAME" VNCSERVERARGS[1]="-geometry 1024x768 -depth 16" Run VNC server to create xstartup script #/sbin/service vncserver start Modify xstartup script to run a full blown desktop in VNC Server #nano -w /home/YOURNAME/.vnc/xstartup Uncomment following lines: # unset SESSION_MANAGER # exec /etc/X11/xinit/xinitrc Remove display environment variables #cat /home/YOURNAME/.bashrc Make sure there is no DISPLAY environment variable defined #cat /home/YOURNAME/.bash_profile Make sure there is no DISPLAY environment variable defined #/sbin/service vncserver restart Now to hook XRDP Server to the rc.local file #nano -w /etc/rc.local Add the following to the end of the file /etc/xrdp/xrdp.sh start Copy keyboard settings /usr/lib64/xrdp-v0.7-obasi/instfiles/km-0813.ini /etc/xrdp/ Remove all modes from /etc/xrdp/xrdp.ini except xvnc... Turn on the services #/sbin/chkconfig vncserver on #/etc/xrdp/xrdp.sh start Turn off terminal bell If on an Oracle Fusion AS, edit frmxml2f.sh #nano -w /home/YOURNAME/Oracle/Middleware/asinst_1/bin/frmxml2f.sh Add a new line at the top (after #!/bin/bash) with the contents: export DISPLAY=:1.0
Installing XRDP on Centos 6 Stop NX (probably not installed on Centos 6) #/sbin/chkconfig freenx-server off #/etc/init.d/freenx-server stop Install/Update EPEL & RPMforge #rpm -Uvh http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.22.el6.rf.x86_64.rpm #rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm Install needed Packages #yum install -y tigervnc-server autoconf automake libtool openssl-devel pam-devel libX11devel libXfixes-devel git gcc and install the updated version of XRDP #cd /tmp #git clone https://github.com/charlesvg/xrdp.git #mv xrdp /usr/lib64/xrdp-v0.7-obasi #cd /usr/lib64/xrdp-v0.7-obasi Now to install updated version of XRDP #./bootstrap #./configure #make #make install Generate custom rsakeys.ini #/usr/local/bin/xrdp-keygen xrdp auto Configure session manager #nano –w /etc/xrdp/sesman.ini Edit the line to AllowRoot=0 AssignSessionByname=1 Setup s Groups #/usr/sbin/groupadd tss #/usr/sbin/groupadd tss Edit Groups file #nano -w /etc/group
Edit the following lines to look like this. tss:x:501:YOURNAME tss:x:502:root Now to setup VNC for the that you want to use XRDP Services #su YOURNAME #vncwd Insert your twice #exit To return root Edit the VNC Server #nano -w /etc/sysconfig/vncservers Insert at the end of file VNCSERVERS="1:YOURNAME" VNCSERVERARGS[1]="-geometry 1024x768 -depth 16" Run VNC server to create xstartup script #/sbin/service vncserver start Remove display environment variables #cat /home/YOURNAME/.bashrc Make sure there is no DISPLAY environment variable defined #cat /home/YOURNAME/.bash_profile Make sure there is no DISPLAY environment variable defined #/sbin/service vncserver restart Now to hook XRDP Server to the rc.local file #nano -w /etc/rc.local Add the following to the end of the file /etc/xrdp/xrdp.sh start Copy keyboard settings /usr/lib64/xrdp-v0.7-obasi/instfiles/km-0813.ini /etc/xrdp/ Remove all xrdp modes from /etc/xrdp/xrdp.ini except xrdp2 and rename xrdp2 to xrdp1 Turn on the services #/sbin/chkconfig vncserver on #/etc/xrdp/xrdp.sh start Turn off terminal bell If on an Oracle Fusion AS, edit frmxml2f.sh #nano -w /home/YOURNAME/Oracle/Middleware/asinst_1/bin/frmxml2f.sh Add a new line at the top (after #!/bin/bash) with the contents: export DISPLAY=:1.0