Hi Norr,
I have included my Xvnc script in this email.
This version of the script first starts the X server and after that x11vnc.
I have also tried it the other way around but with the same result.
Hope you have a suggestion.
Kind regards,
Harm-Jan
--- /usr/bin/Xvnc ---
#!/bin/sh
#
# Wrapper script converting Xvnc call to a x11vnc, Xdummy call
#
colon=':.*'
display=""
geom=""
prev=""
declare -i error=0
declare -i skip=0
declare -i dispno=0
declare -i port=5900
x11vncparms=""
xdummyparms=""
# goto user home directory
cd
# install Xdummy for the user
if [ ! -d /tmp/Xdummy."$USER" ]; then
/usr/bin/Xdummy -install
/usr/bin/Xdummy :10
fi
# Construct x11vnc parameters and find the display
for parm in "${@}"; do
if [[ "${parm}" =~ $colon ]]; then
if [ -z "$display" ]; then
display="$parm"
tmp="${display#:}"
dispno="${tmp%.*}"
if [ $dispno -lt 10 -o $dispno -gt 20 ]; then
error=1
fi
port+=$dispno
else
error=1
fi
continue
fi
case "$parm" in
-bs)
;;
-ac)
;;
-depth)
skip=1
;;
-dpi)
skip=1
;;
-nolisten)
skip=1
;;
-auth)
skip=1
;;
-N)
;;
*)
if [ $skip -eq 0 ]; then
x11vncparms="$x11vncparms $parm"
fi
skip=0
;;
esac
done
if [ -z "$x11vncparms" ]; then
error=1
fi
if [ $error -ne 0 ]; then
exit $error
fi
x11vnclog="-o /tmp/x11vnc.$dispno.log"
xdummylog="/tmp/Xorg.$dispno.log"
date >> $xdummylog
echo "$x11vncparms" >> $xdummylog
/usr/bin/x11vnc -display "$display" -rfbport "$port" -auth ./.Xauthority
-ncache 6 -norc -sleepin 0.03 -repeat -forever -novncconnect
$x11vncparms $x11vnclog &
# Construct Xdummy parameters
prev=""
for parm in "${@}"; do
if [[ "${parm}" =~ $colon ]]; then
continue
fi
case "$parm" in
-geometry)
geom="-geom"
;;
-auth)
skip=1
;;
-defer)
skip=1
;;
-deferUpdate)
skip=1
;;
-rfbauth)
skip=1
;;
-N)
;;
-localhost)
;;
-nolisten)
skip=1
;;
*)
if [ $skip -eq 0 ]; then
if [ "$prev" == "-geometry" ]; then
geom="$geom $parm"
# xdummyparms="$xdummyparms $prev"
else
xdummyparms="$xdummyparms $parm"
fi
fi
skip=0
;;
esac
prev="$parm"
done
if [ -z "$xdummyparms" -o -z "$geom" ]; then
error=1
fi
if [ $error -ne 0 ]; then
exit $error
fi
echo "$xdummyparms" "$geom" >> $xdummylog
# DISPLAY="$display" ; export DISPLAY
/usr/bin/startx -- /usr/bin/Xdummy "$display" $geom $xdummyparms -auth
./.Xauthority & >> $xdummylog 2>&1
# /usr/bin/Xdummy "$display" $xdummyparms $geom -auth ./.Xauthority >>
$xdummylog 2>&1
# /usr/bin/Xvfb "$display" -fbdir /tmp >> $xdummylog 2>&1
exit $error
--- End ---
Norr Arvid schreef op 19-5-2014 14:27:
Hi again
My suggestion was to sleep after (not before) you have started your
vnc server .
Please provide your script.
Regards
Arvid
On 2014-05-19 10:57, Zorro wrote:
Hi
Thanks for your suggestion but that didn't do the trick.
If I look at the source in session.c I have the impression that a
child process waits for the X display to become available after which
it continues (don't know yet with what).
So putting a sleep before starting x11vnc presumably works the wrong
direction.
Regards,
Harm-Jan
Norr Arvid schreef op 19-5-2014 10:15:
Hi
I have not tried that kind of setup but I suggest you add a sleep
after you have started your vnc server.
The VNC server maybe requires some time to start.
Regards
Arvid
On 2014-05-17 21:02, Zorro wrote:
Dear list,
I am trying to use xrdp with x11vnc instead of Xvnc.
x11vnc was originally developed to provide VNC access to an existing X
session.
However x11vnc can also be used with a virtual framebuffer X session
with Xvfb or Xdummy.
Using xrdp-v0.6.1 I am trying to connect to x11vnc using Xvfb.
Since xrdp starts Xvnc I developed a shell script Xvnc which parses
the
command line and then calls Xvfb and then x11vnc.
When I try to connect to the host running xrdp using Module
'sesman-Xvnc' I do get a connection and in the connection log pane:
connecting to sesman ip 127.0.0.1 port 3350
sesman connect ok
sending login info to session manager, please wait ...
xrdp_mm_process_login_response: login successful for display
started connecting
connecting to 127.0.0.1 5910
error - problem connecting
I then close the log pane and go back to windows and reconnect to the
host using using Module 'console' connecting to port 5910 and the
connection succeeds and everything works fine.
Does anyone have experience in setting this up so I do not have to
connect twice before I have a running xrdp session?
Kind regards,
Harm-Jan Zwinderman
------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
xrdp-devel mailing list
xrdp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xrdp-devel