gentoo下配置xrdp以使win通过RDP连接linux

Pubdate:2012-12-01 23:10:07    Categories: linux    1893 Views
Tags: gentoo, linux


因为公司会议室是windows,大家一般都通过远程桌面连接自己的电脑讲解方案什么的。安装配置了xrdp就能让windows通过远程桌面连接我的gentoo linux了。

应该大致应该是在VNC之上又包了RDP。

中间过程还是很折腾的,后来不知怎么糊里糊涂就配置好了。但直接通过VNC连接反倒是黑屏。留待以后解决吧。简单叙述一下:

主要参考了:

http://en.gentoo-wiki.com/wiki/Xrdp

http://paar.kh.edu.tw/wp/?p=240

 

layman -a bleeding-edge
emerge -av net-misc/xrdp

/etc/xrdp/startwm.sh要改一下:

 

#!/bin/sh

# change the order in line below to run to run whatever window manager you
# want, default to kde

SESSIONS="gnome-session blackbox fluxbox startxfce4 startkde xterm"

#start the window manager
wm_start()
{
for WindowManager in $SESSIONS
do
which $WindowManager
if test $? -eq 0
then
echo "Starting $WindowManager"
$WindowManager
return 0
fi
done
return 0
}

#Execution sequence for interactive login shell
#Following pseudo code explains the sequence of execution of these files.
#execute /etc/profile
#IF ~/.bash_profile exists THEN
# execute ~/.bash_profile
#ELSE
# IF ~/.bash_login exist THEN
# execute ~/.bash_login
# ELSE
# IF ~/.profile exist THEN
# execute ~/.profile
# END IF
# END IF
#END IF
pre_start()
{
if [ -f /etc/profile ]
then
. /etc/profile
fi
if [ -f ~/.bash_profile ]
then
. ~/.bash_profile
else
if [ -f ~/.bash_login ]
then
. ~/.bash_login
else
if [ -f ~/.profile ]
then
. ~/.profile
fi
fi
fi
return 0
}

#When you logout of the interactive shell, following is the
#sequence of execution:
#IF ~/.bash_logout exists THEN
# execute ~/.bash_logout
#END IF
post_start()
{
if [ -f ~/.bash_logout ]
then
. ~/.bash_logout
fi
return 0
}

#. /etc/environment
#export PATH=$PATH
#export LANG=$LANG
export LANG="zh_CN.UTF-8"
export LC_ALL="zh_CN.UTF-8"
export XMODIFIERS="@im=ibus"
export GTK_IM_MODULE="ibus"
export QT_IM_MODULE="xim"
ibus-daemon -d -x


# change PATH to be what your environment needs usually what is in
# /etc/environment
#PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
#export PATH=$PATH

# for PATH and LANG from /etc/environment
# pam will auto process the environment file if /etc/pam.d/xrdp-sesman
# includes
# auth required pam_env.so readenv=1

pre_start
wm_start
post_start

exit 1

 


Comments(2)

相关文章

Comments
  • Druggo

    用gnome的话,开vino就可以了,很简单。

  • Druggo

    审题不清,罪过啊。。。

Leave You Comment
请输入左边图片中的字符
无觅相关文章插件