[X2Go-User] Advice needed on a somewhat working x2go configuration
Mike Gabriel
mike.gabriel at das-netzwerkteam.de
Tue Aug 20 08:30:27 CEST 2013
Hi Yohan,
On So 18 Aug 2013 18:48:21 CEST Yohan Bataille wrote:
> I need a GUI application (RetroShare) to start on boot on my
> headless server (Debian Wheezy up to date with x2go repos)
> and be available remotely. I got it working with the scripts below
> but it's cumbersome. Is it how it is supposed to be done ?
> $ cat /etc/rc.local
>
> su -l -c /home/yohan/launch_x2go.sh yohan
>
> $ cat /home/yohan/launch_x2go.sh
> #!/bin/bash
> export DISPLAY=:1
>
> # Xvfb is a framebuffer Xserver.
> Xvfb :1 -screen 0 900x550x16 &
> sleep 15
> pyhoca-cli --server localhost -N -c LXDE --user yohan
> --add-to-known-hosts --password mypasswd --kbd-layout fr --kbd-type
> pc105/fr &
> export DISPLAY=:51
> sleep 20
> lxterminal &
> lxterminal &
> /home/yohan/reboot_RS.sh &
> sleep 240
> pyhoca-cli --server localhost -S ALL --user yohan --password mypasswd &
> sleep 10
> killall Xvfb
>
> Before killing Xvfb :
> $ ps auxf
There should be no need for using Xvfb. X2Go has its own X-Server
(x2goagent/nxagent), so when using Xvfb, you actually use X-Servers.
Why not go this approach...
pyhoca-cli --server localhost -N -c LXDE --user yohan \
--add-to-known-hosts --password mypasswd \
--kbd-layout fr --kbd-type pc105/fr &
sleep 5
X2GO_SESSION=$(<detect-session-id-of-just-started-session>)
<launch whatever application you want to launch in session $X2GO_SESSION>
# Whenever you need that application on screen...
pyhoca-cli --resume $X2GO_SESSION --server localhost
This can also be done rootless, just by not using a desktop shell
command as --command:
pyhoca-cli --server localhost -N -c <YOUR-COMMAND-IN-$PATH> --user yohan \
--add-to-known-hosts --password mypasswd \
--kbd-layout fr --kbd-type pc105/fr &
Greets,
Mike
--
DAS-NETZWERKTEAM
mike gabriel, herweg 7, 24357 fleckeby
fon: +49 (1520) 1976 148
GnuPG Key ID 0x25771B31
mail: mike.gabriel at das-netzwerkteam.de, http://das-netzwerkteam.de
freeBusy:
https://mail.das-netzwerkteam.de/freebusy/m.gabriel%40das-netzwerkteam.de.xfb
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digitale PGP-Unterschrift
URL: <http://lists.x2go.org/pipermail/x2go-user/attachments/20130820/f54f0819/attachment.pgp>
More information about the x2go-user
mailing list