Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #230150
| From | Linux-Fan <Ma_Sys.ma@web.de> |
|---|---|
| Newsgroups | linux.debian.user |
| Subject | Re: graphical session in LXC automatically started at boot and reachable via VNC/RDP/X2GO |
| Date | 2020-12-30 23:50 +0100 |
| Message-ID | <BrSs1-Oh-1@gated-at.bofh.it> (permalink) |
| References | <BrupI-2vn-13@gated-at.bofh.it> <Brwrv-3Y4-3@gated-at.bofh.it> <BrPu9-7rW-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
Yvan Masson writes: [...] > What I did not understand from your answers (sorry maybe I missed something) > is how to start the graphical session automatically when the container > starts, so that the software can be started and listening on the network, > and then later someone can attach to this session with VNC/RDP/X2GO. It > seems your script Linux-Fan starts a VNC server, but does it start a session > in it? I did not mention it explicitly, because with the VNC server I am using (`tightvncserver`) does this automatically. The trick most important steps are as follows: * Prepare a configuration for the session of interest to start, I have these lines in my "Dockerfile" (i.e. image preparation stage): echo \$vncStartup = \"exec /usr/bin/icewm\" > $HOME/.vncrc; \ [...] printf "%s\n\n%s\n" "#!/bin/sh -e" "/usr/bin/megasync &" \ > /etc/X11/icewm/startup; \ This way, it configures `icewm` to be the window manager to use and uses IceWM's autorun facility to start my program of interest (`megasync`). * In the container's startup script, run the VNC server. /usr/bin/vncserver -geometry 1024x768 :0 This will start `icewm` (as configured in `.vncrc`) which (by configuration in `/etc/X11/icewm/startup`) runs `megasync`. See also: vncserver(1) -- https://manpages.debian.org/buster/tightvncserver/tightvncserver.1.en.html * To automatically start the container upon OS boot, I use Docker's `--restart=unless-stopped`. This will be different for LXC of course! * For the gory details of setting passwords, making the right files executable or resuming from "crashed" sesions (i.e. delete temp files) check the respective source codes: https://github.com/m7a/lo-megasync/blob/master/megasync_ctrl.sh https://github.com/m7a/lo-megasync/blob/master/Dockerfile HTH Linux-Fan öö
Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
graphical session in LXC automatically started at boot and reachable via VNC/RDP/X2GO Yvan Masson <yvan@masson-informatique.fr> - 2020-12-29 22:10 +0100
Re: graphical session in LXC automatically started at boot and reachable via VNC/RDP/X2GO Georgi Naplatanov <gosho@oles.biz> - 2020-12-29 22:30 +0100
Re: graphical session in LXC automatically started at boot and reachable via VNC/RDP/X2GO Linux-Fan <Ma_Sys.ma@web.de> - 2020-12-30 00:20 +0100
Re: graphical session in LXC automatically started at boot and reachable via VNC/RDP/X2GO Yvan Masson <yvan@masson-informatique.fr> - 2020-12-30 20:40 +0100
Re: graphical session in LXC automatically started at boot and reachable via VNC/RDP/X2GO Linux-Fan <Ma_Sys.ma@web.de> - 2020-12-30 23:50 +0100
Re: graphical session in LXC automatically started at boot and reachable via VNC/RDP/X2GO Yvan Masson <yvan@masson-informatique.fr> - 2020-12-31 09:30 +0100
Re: graphical session in LXC automatically started at boot and reachable via VNC/RDP/X2GO Linux-Fan <Ma_Sys.ma@web.de> - 2020-12-31 14:20 +0100
csiph-web