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 XvfbBefore 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@das-netzwerkteam.de, http://das-netzwerkteam.de
freeBusy: https://mail.das-netzwerkteam.de/freebusy/m.gabriel%40das-netzwerkteam.de.xf...