1

Build: Server with Ubuntu 18.04 in data center with Ubuntu Mate Desktop interface.

As I understand, any GUI app needs a display in which to function. I connect to the server via ssh with x2go to display the ubuntu mate interface. Once connected, I have a scheduled cron job that launches a terminal, a GUI and some commands.

Everything works perfect as I have previously detected what display I'm using as a user and specify that to launch the terminal and the commands.

Problem: if I'm not connected via x2go client to the server and provide that display, I noticed today that the cron job didn't launch at the specific time (08:50), which was previous to my x2go client connection (09:23); it just launched when I did the x2go client connection from my desktop manually -- my understanding is that it didn't launch because there was not any available display.

I'm not technical enough to get more deep into this problem.

¿Is there anyway in which I can make the cron script function (i.e. that it launchs the terminal and the GUI) without the need of manually getting into my desktop and launching the remote desktop client (x2go)?

My ideas go for having another minimal setup in that data center or another that takes the advantages of being there and have a physical monitor to display constantly connected to the main server OR just manually entering the server via x2go every day.

EDIT: When I disconnect the x2go client session from the server, the launched GUI and etc perfectly maintains, without dissapearing because "I have terminated the session and eliminated the display"

0

Finally got it working with the great help of one of x2go founders (Oleksandr Shneyder) after understanding how x2go handles the sessions and the X server.

Sessions can suspended/hibernated, disconnected and terminated.

Suspended/hibernated: when "manually" or automatically the x2go server side suspends so that it saves resources.

Disconnected: when you exit the session window and the x2go client in your desktop/laptop.

Terminated: when you log out from the DE environment or issue the x2goterminate-session command in the terminal inside the session.

My x2go app was somehow entering into suspending mode in the server, causing that the display (50 in my case) in which the scheduled cronjob need to be run and launche the GUIs, "was not awaken" until I entered into the session via the app. In that moment, the cronjob started executing.

To tell x2go server to not hibernate, I needed to change the X2GO_NXOPTIONS in /etc/x2go/x2goagent.options to X2GO_NXOPTIONS="sleep=0"

After this, everything functions perfectly in the server.

Hope it helps others.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.