diff options
Diffstat (limited to 'network')
-rw-r--r-- | network/xrdp/README | 34 | ||||
-rw-r--r-- | network/xrdp/doinst.sh | 1 | ||||
-rw-r--r-- | network/xrdp/patches/Makefile.NOPAM.diff | 13 | ||||
-rw-r--r-- | network/xrdp/patches/Makefile.PAM.diff (renamed from network/xrdp/Makefile.PAM.diff) | 0 | ||||
-rw-r--r-- | network/xrdp/patches/sesman.ini.diff | 30 | ||||
-rw-r--r-- | network/xrdp/patches/xrdp_control.sh.diff (renamed from network/xrdp/xrdp_control.sh.diff) | 0 | ||||
-rw-r--r-- | network/xrdp/slack-desc | 2 | ||||
-rw-r--r-- | network/xrdp/xrdp-xwmconfig | 215 | ||||
-rw-r--r-- | network/xrdp/xrdp.SlackBuild | 52 | ||||
-rw-r--r-- | network/xrdp/xrdp.info | 10 |
10 files changed, 327 insertions, 30 deletions
diff --git a/network/xrdp/README b/network/xrdp/README index a689ff947f..290a45d14c 100644 --- a/network/xrdp/README +++ b/network/xrdp/README @@ -2,8 +2,11 @@ xrdp - Remote Desktop Server for Linux Xrdp provides a fully functional Linux terminal server, capable of accepting connections from rdesktop and Microsoft's own terminal server/remote desktop -clients. Xrdp uses Xvnc or X11rdp (which are installed separately) to manage -the X session. +clients. Xrdp uses Xvnc or X11rdp (which are installed separately) to manage +the X session. This means a RDP client can connect to a VNC server on the +xrdp server machine in addition to the RDP server. Xrdp can also act as a +bridging server, allowing RDP clients to connect to other RDP or VNC servers +through the xrdp server. Xvnc can be installed by installing tightvnc (available on SlackBuilds.org). X11rdp can be compiled and installed by following the directions in the @@ -13,18 +16,25 @@ By default, this script will make xrdp without PAM support since PAM is not installed in Slackware by default. The script supports building with PAM, but it is completely untested by us. If you want to enable PAM, run the script as follows: - USE_PAM=yes ./xrdp.SlackBuild + USE_PAM=YES ./xrdp.SlackBuild After installing xrdp there are some configuration files in /etc/xrdp that can be modified. sesman.ini has some useful options to take note of such as the ability to allow xrdp use by only a certain group and to specify the log -location (by default the sesman log appears in the program directory so this -should be changed). xrdp.ini should be modified so that you have the options -you want at the server login screen. For instance, if you want xrdp's default -options to be like those of a Windows RDP server then change xrdp.ini so that -the (by default) given sesman-X11rdp set is option xrdp1. -The man page for xrdp.ini has more details on the file. +location (the default log location has been changed to /var/log/sesman.log). +xrdp.ini should be modified so that you have the options you want at the +server login screen. For instance, if you want xrdp's default options to be +like those of a Windows RDP server then change xrdp.ini so that the default +set of options under [xrdp1] corresponds to sesman-X11rdp. Similarly, you +might want to change the options (eg. port number) for VNC (listed as +"console" by default). The man page for xrdp.ini has more details on the +file. -/usr/lib/xrdp/startwm.sh by default loads KDE during a session. Change this -as desired to load a different DE/WM. A similar script can be executed on a -per-user basis. See the sesman man page for more details. +/etc/xrdp/xrdp-xinitrc by default loads KDE during a X11rdp session. Change +this as desired to load a different DE/WM. A similar script can be executed +on a per-user basis by creating an executable script at ~/.xrdp-xinitrc. A +utility program, xrdp-xwmconfig, is included to allow you to use your xinit +scripts during X11rdp sessions. It works just like xwmconfig, so run it as +root to set the global default, or run it as a normal user to set only the +default for that user. See the sesman.ini man page for details about +defining different names or locations for the X11rdp startup scripts. diff --git a/network/xrdp/doinst.sh b/network/xrdp/doinst.sh index 40e18dcacc..19d3ab6ba6 100644 --- a/network/xrdp/doinst.sh +++ b/network/xrdp/doinst.sh @@ -19,6 +19,7 @@ if [ -e etc/rc.d/rc.xrdp ]; then fi config etc/rc.d/rc.xrdp.new +config etc/xrdp/xrdp-xinitrc.new config etc/xrdp/rsakeys.ini.new config etc/xrdp/sesman.ini.new config etc/xrdp/xrdp.ini.new diff --git a/network/xrdp/patches/Makefile.NOPAM.diff b/network/xrdp/patches/Makefile.NOPAM.diff new file mode 100644 index 0000000000..0d63f34eee --- /dev/null +++ b/network/xrdp/patches/Makefile.NOPAM.diff @@ -0,0 +1,13 @@ +Patch generated 20080922 by Phillip Warner <pc_warner@yahoo.com> +Permission granted to use this patch as you see fit. + +--- Makefile.orig 2008-09-22 11:57:24.000000000 -0500 ++++ Makefile 2008-09-22 11:57:51.000000000 -0500 +@@ -46,7 +46,6 @@ + make -C sesman install + make -C xup install + make -C docs install +- if [ -d /etc/pam.d ]; then install instfiles/pam.d/sesman /etc/pam.d/sesman; fi + install instfiles/xrdp_control.sh $(DESTDIR)/xrdp_control.sh + + installdeb: diff --git a/network/xrdp/Makefile.PAM.diff b/network/xrdp/patches/Makefile.PAM.diff index adc2599739..adc2599739 100644 --- a/network/xrdp/Makefile.PAM.diff +++ b/network/xrdp/patches/Makefile.PAM.diff diff --git a/network/xrdp/patches/sesman.ini.diff b/network/xrdp/patches/sesman.ini.diff new file mode 100644 index 0000000000..4cbea3403f --- /dev/null +++ b/network/xrdp/patches/sesman.ini.diff @@ -0,0 +1,30 @@ +Patch generated 20080925 by Phillip Warner <pc_warner@yahoo.com> +Permission granted to use this patch as you see fit. + +--- sesman/sesman.ini.orig 2008-09-22 12:56:51.000000000 -0500 ++++ sesman/sesman.ini 2008-09-25 11:39:03.000000000 -0500 +@@ -2,11 +2,11 @@ + ListenAddress=127.0.0.1 + ListenPort=3350 + EnableUserWindowManager=1 +-UserWindowManager=startwm.sh ++UserWindowManager=.xrdp-xinitrc + DefaultWindowManager=startwm.sh + + [Security] +-AllowRootLogin=1 ++AllowRootLogin=0 + MaxLoginRetry=4 + TerminalServerUsers=tsusers + TerminalServerAdmins=tsadmins +@@ -18,8 +18,8 @@ + DisconnectedTimeLimit=0 + + [Logging] +-LogFile=./sesman.log +-LogLevel=DEBUG ++LogFile=/var/log/sesman.log ++LogLevel=INFO + EnableSyslog=0 + SyslogLevel=DEBUG + diff --git a/network/xrdp/xrdp_control.sh.diff b/network/xrdp/patches/xrdp_control.sh.diff index f65954bd9c..f65954bd9c 100644 --- a/network/xrdp/xrdp_control.sh.diff +++ b/network/xrdp/patches/xrdp_control.sh.diff diff --git a/network/xrdp/slack-desc b/network/xrdp/slack-desc index 68972661d6..b4f21481be 100644 --- a/network/xrdp/slack-desc +++ b/network/xrdp/slack-desc @@ -6,7 +6,7 @@ # leave one space after the ':'. |-----handy-ruler---------------------------------------------------------| -xrdp: xrdp - Remote Desktop Server for Linux +xrdp: xrdp (Remote Desktop Server for Linux) xrdp: xrdp: Xrdp provides a fully functional Linux terminal server, capable of xrdp: accepting connections from rdesktop and Microsoft's own terminal server diff --git a/network/xrdp/xrdp-xwmconfig b/network/xrdp/xrdp-xwmconfig new file mode 100644 index 0000000000..b614ba6020 --- /dev/null +++ b/network/xrdp/xrdp-xwmconfig @@ -0,0 +1,215 @@ +#!/bin/sh +# Copyright 1999, 2002 Patrick Volkerding, Moorhead, Minnesota USA +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# Modified by Phillip Warner <pc_warner@yahoo.com> +# for editing xrdp-xinitrc for use with xrdp + +# $DWM is the file under /usr/lib/xrdp that points to /etc/xrdp/xrdp-xinitrc. +# /etc/xrdp/xrdp-xinitrc will be modified by this script if run by root. +# $UWM is the file under $HOME that will be modified by this script. +# The values for DefaultWindowManager and UserWindowManager, respectively, +# in sesman.ini should match these. +DWM=startwm.sh +UWM=.xrdp-xinitrc + +# First, let's bail if our being here doesn't make sense: +if [ ! -d /etc/X11/xinit ]; then + exit +fi +if [ "`cd /etc/X11/xinit ; echo *.*`" = '*.*' ]; then + exit +fi +if [ ! -d /etc/xrdp ]; then + exit +fi +if [ $(grep -w DefaultWindowManager /etc/xrdp/sesman.ini | cut -f2 -d"=") != $DWM ] +then + echo "DefaultWindowManager in sesman.ini MUST be $DWM to use this tool. Aborting..." + exit +fi +if [ $(grep -w UserWindowManager /etc/xrdp/sesman.ini | cut -f2 -d"=") != $UWM ] +then + echo "UserWindowManager in sesman.ini MUST be $UWM to use this tool. Aborting..." + exit +fi + +if [ "$USER" = "root" ]; then + TMP=/var/log/setup/tmp +else + TMP=$HOME/.xrdp-xwmconfig +fi + +if [ ! -d $TMP ]; then + mkdir -p $TMP + chmod 700 $TMP +fi + +# Do we already have an existing default? +unset PRESELECT +if [ -L /etc/xrdp/xrdp-xinitrc ]; then + CURRENT="$(basename $(/bin/ls -l /etc/xrdp/xrdp-xinitrc | cut -f 2 -d '>'))" + PRESELECT=" --default-item $CURRENT " +fi + +# Figure out who we are and set up some background information: +if [ "$USER" = "root" ]; then + BACKTITLE="--backtitle \"Setting system-wide default xrdp window manager at /etc/xrdp/xrdp-xinitrc\"" +else + BACKTITLE="--backtitle \"Setting user default xrdp window manager in $HOME/$UWM\"" +fi + +# This stops --backtitle from cluttering the initial install: +if [ ! -r /proc/kcore ]; then + BACKTITLE="" +fi + +# Remove any previous script: +rm -f $TMP/tmpscript.sh + +# Add the top of the script: +cat << EOF > $TMP/tmpscript.sh +dialog $BACKTITLE --title "SELECT DEFAULT WINDOW MANAGER FOR XRDP" $PRESELECT --menu \\ +"Please select the default window manager to use with XRDP. \\ +This will define the style of graphical user interface the \\ +client computer uses in remote X11rdp sessions." 0 0 0 \\ +EOF + +# Add KDE as the first and default entry: +if [ -r /etc/X11/xinit/xinitrc.kde ]; then + echo "\"xinitrc.kde\" \"KDE: K Desktop Environment\" \\" >> $TMP/tmpscript.sh +fi + +# Then, we add GNOME: +if [ -r /etc/X11/xinit/xinitrc.gnome ]; then + echo "\"xinitrc.gnome\" \"GNU Network Object Model Environment\" \\" >> $TMP/tmpscript.sh +fi + +# Add XFce: +if [ -r /etc/X11/xinit/xinitrc.xfce ]; then + echo "\"xinitrc.xfce\" \"The Cholesterol Free Desktop Environment\" \\" >> $TMP/tmpscript.sh +fi + +# Add Enlightenment: +if [ -r /etc/X11/xinit/xinitrc.e ]; then + echo "\"xinitrc.e\" \"Enlightenment\" \\" >> $TMP/tmpscript.sh +fi + +# Add Fluxbox: +if [ -r /etc/X11/xinit/xinitrc.fluxbox ]; then + echo "\"xinitrc.fluxbox\" \"The fluxbox window manager\" \\" >> $TMP/tmpscript.sh +fi + +# Add Blackbox: +if [ -r /etc/X11/xinit/xinitrc.blackbox ]; then + echo "\"xinitrc.blackbox\" \"The blackbox window manager\" \\" >> $TMP/tmpscript.sh +fi + +# Add WindowMaker: +if [ -r /etc/X11/xinit/xinitrc.wmaker ]; then + echo "\"xinitrc.wmaker\" \"WindowMaker\" \\" >> $TMP/tmpscript.sh +fi + +# Add FVWM2: +if [ -r /etc/X11/xinit/xinitrc.fvwm2 ]; then + echo "\"xinitrc.fvwm2\" \"F(?) Virtual Window Manager (version 2.xx)\" \\" >> $TMP/tmpscript.sh +fi + +# Add FVWM95: +if [ -r /etc/X11/xinit/xinitrc.fvwm95 ]; then + echo "\"xinitrc.fvwm95\" \"FVWM2 with a Windows look and feel\" \\" >> $TMP/tmpscript.sh +fi + +# Add icewm: +if [ -r /etc/X11/xinit/xinitrc.icewm ]; then + echo "\"xinitrc.icewm\" \"ICE Window Manager\" \\" >> $TMP/tmpscript.sh +fi + +# Add sawfish: +if [ -r /etc/X11/xinit/xinitrc.sawfish ]; then + echo "\"xinitrc.sawfish\" \"Sawfish without GNOME\" \\" >> $TMP/tmpscript.sh +fi + +# Add twm: +if [ -r /etc/X11/xinit/xinitrc.twm ]; then + echo "\"xinitrc.twm\" \"Tab Window Manager (very basic)\" \\" >> $TMP/tmpscript.sh +fi + +# Add mwm: +if [ -r /etc/X11/xinit/xinitrc.mwm ]; then + echo "\"xinitrc.mwm\" \"Motif WM\" \\" >> $TMP/tmpscript.sh +fi + +# Now, add support for the other window managers: +( cd /etc/X11/xinit + for file in xinitrc.* ; do + if [ ! "$file" = "xinitrc.kde" -a ! "$file" = "xinitrc.gnome" \ + -a ! "$file" = "xinitrc.e" -a ! "$file" = "xinitrc.wmaker" \ + -a ! "$file" = "xinitrc.fvwm2" -a ! "$file" = "xinitrc.fvwm95" \ + -a ! "$file" = "xinitrc.icewm" -a ! "$file" = "xinitrc.twm" \ + -a ! "$file" = "xinitrc.mwm" -a ! "$file" = "xinitrc.xfce" \ + -a ! "$file" = "xinitrc.blackbox" -a ! "$file" = "xinitrc.fluxbox" \ + -a ! "$file" = "xinitrc.sawfish" ]; then + echo "\"$file\" \"$file\" \\" >> $TMP/tmpscript.sh + fi + done +) + +# Then, the tail end: +cat << EOF >> $TMP/tmpscript.sh +2> $TMP/output +if [ ! \$? = 0 ]; then + rm -f $TMP/output + echo "Canceled." + exit +fi +EOF + +sh $TMP/tmpscript.sh + +if [ ! -r $TMP/output ]; then + rm -f $TMP/tmpscript.sh + exit +fi + +OUTPUT=`cat $TMP/output` + +# If xrdp-xwmconfig is run by root, it changes the system-wide default for users +# that do not have a $HOME/$UWM: +if [ "$USER" = "root" ]; then + if [ -r /etc/X11/xinit/$OUTPUT ]; then + ( cd /etc/xrdp/ ; rm -f xrdp-xinitrc ; ln -sf /etc/X11/xinit/$OUTPUT xrdp-xinitrc ) + fi +fi + +# Also set up a new $HOME/$UWM: +if [ -r /etc/X11/xinit/$OUTPUT -a ! "$HOME" = "/" ]; then + if [ -r $HOME/$UWM ]; then + rm -f $HOME/${UWM}-backup + mv $HOME/$UWM $HOME/${UWM}-backup + chmod -x $HOME/${UWM}-backup + fi + cat /etc/X11/xinit/$OUTPUT > $HOME/$UWM + # Unlike .xinitrc, $UWM *MUST* be executable + chmod u+x $HOME/$UWM +fi + +rm -f $TMP/tmpscript.sh $TMP/output + diff --git a/network/xrdp/xrdp.SlackBuild b/network/xrdp/xrdp.SlackBuild index 24e9b2b690..b7a0ff2f0f 100644 --- a/network/xrdp/xrdp.SlackBuild +++ b/network/xrdp/xrdp.SlackBuild @@ -1,10 +1,10 @@ #!/bin/sh # Slackware build script for xrdp -# Written by Phil Warner <pc_warner@yahoo.com> +# Written by Phillip Warner <pc_warner@yahoo.com> PRGNAM=xrdp -VERSION=0.4.0 +VERSION=0.4.1 ARCH=${ARCH:-i486} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -15,8 +15,8 @@ PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} # If you have PAM installed and wish to install /etc/pam.d/sesman, -# then run this script as: "USE_PAM=yes ./xrdp.SlackBuild" -USE_PAM=${USE_PAM:-no} +# then run this script as: "USE_PAM=YES ./xrdp.SlackBuild" +USE_PAM=${USE_PAM:-NO} if [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" @@ -26,7 +26,7 @@ fi set -e -rm -rf $PKG +rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION @@ -35,15 +35,22 @@ cd $PRGNAM-$VERSION chown -R root:root . chmod -R a-s,u+rw,go-w . -if [ ! "$USE_PAM" = "no" ]; then - patch < $CWD/Makefile.PAM.diff +if [ ! "$USE_PAM" = "NO" ]; then + patch < $CWD/patches/Makefile.PAM.diff make else + patch < $CWD/patches/Makefile.NOPAM.diff make nopam fi # Fix path in what will become the init script -patch -d instfiles/ < $CWD/xrdp_control.sh.diff +patch -d instfiles/ < $CWD/patches/xrdp_control.sh.diff + +# Set LogFile at /var/log/sesman.log +# Change LogLevel to INFO instead of DEBUG +# Disable Root logins by default +# Set user-specific RDP session script to ~/.xrdp-xinitrc +patch -d sesman/ < $CWD/patches/sesman.ini.diff make install \ PKGDIR=$PKG \ @@ -53,13 +60,16 @@ make install \ MANDIR=$PKG/usr/man \ DOCDIR=$PKG/usr/doc/$PRGNAM-$VERSION -# Install routines for man pages and docs missing from Makefile +# Install routines for man pages missing from Makefile mkdir -p $PKG/usr/man/man5 $PKG/usr/man/man8 cp -a docs/man/*.5 $PKG/usr/man/man5 cp -a docs/man/*.8 $PKG/usr/man/man8 +# Make sure log directory is there +mkdir -p $PKG/var/log + # Fix permissions from install -chmod a-x $PKG/etc/xrdp/* +chmod a-x $PKG/etc/$PRGNAM/* if [ -e $PKG/etc/pam.d/ ]; then chmod a-x $PKG/etc/pam.d/sesman fi @@ -69,12 +79,26 @@ chmod a-x $PKG/usr/lib/$PRGNAM/{Tahoma-10.fv1,*.bmp,*.cur} mkdir -p $PKG/etc/rc.d mv $PKG/usr/lib/$PRGNAM/xrdp_control.sh $PKG/etc/rc.d/rc.$PRGNAM.new +# Move startwm.sh to a more sane location with a name that makes more sense +mv $PKG/usr/lib/$PRGNAM/startwm.sh $PKG/etc/$PRGNAM/xrdp-xinitrc.new + +# Unfortunately, sesman.ini seems to ignore absolute paths for +# startwm.sh, so we need to leave a link where it expects to find +# the file under the program directory. +( cd $PKG/usr/lib/$PRGNAM + ln -s /etc/$PRGNAM/xrdp-xinitrc startwm.sh +) + # Let's not clobber existing configs -cd $PKG/etc/xrdp +( cd $PKG/etc/$PRGNAM mv rsakeys.ini rsakeys.ini.new mv sesman.ini sesman.ini.new mv xrdp.ini xrdp.ini.new -cd - +) + +# Install the xrdp-xwmconfig utility +install -D -m 0755 $CWD/xrdp-xwmconfig \ + $PKG/usr/bin/xrdp-xwmconfig ( cd $PKG find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true @@ -88,6 +112,10 @@ cd - mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a COPYING design.txt install.txt readme.txt $PKG/usr/doc/$PRGNAM-$VERSION + +# Keep a backup copy of startwm.sh in the docs +cat sesman/startwm.sh > $PKG/usr/doc/$PRGNAM-$VERSION/startwm.sh-example + cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install diff --git a/network/xrdp/xrdp.info b/network/xrdp/xrdp.info index 4b1ed62a18..2c3318d6d9 100644 --- a/network/xrdp/xrdp.info +++ b/network/xrdp/xrdp.info @@ -1,8 +1,8 @@ PRGNAM="xrdp" -VERSION="0.4.0" +VERSION="0.4.1" HOMEPAGE="http://xrdp.sourceforge.net/" -DOWNLOAD="http://downloads.sourceforge.net/xrdp/xrdp-0.4.0.tar.gz" -MD5SUM="dc83d149e385c4cd402d990695691f55" -MAINTAINER="Phil Warner" +DOWNLOAD="http://downloads.sourceforge.net/xrdp/xrdp-0.4.1.tar.gz" +MD5SUM="86a2afcb8d304d5003ecbbdbf46058c0" +MAINTAINER="Phillip Warner" EMAIL="pc_warner@yahoo.com" -APPROVED="rworkman" +APPROVED="David Somero" |