About VNC session

Hello,

I have a problem where VNC session launches only after I do ssh to slurm compute node manually or if I do pre-login in slurm compute node (GUI) already phyisally in the server room. I am using mate desktop session in slurm compute node with ubuntu 24.04. I tried with a lot of options with batch job script to automate the launch of the vnc session but nothing works. As I am struggling more than a month with this, would be greatful I am if someone help me with this.

Thanks in advance!

Hello,
Is there anyone to help me with this?

Hi sorry for the delay. IIRC this has something to do with systemd’s loginctl enable-linger functionality. Searching for linger on this site seems to confirm this as well as a google search of “slurm vnc launches only after ssh login

Something like this in prologue

loginctl enable-linger $ SLURM_JOB_USER

With something like this in the epilogue

loginctl disable-linger $SLURM_JOB_USER

Hi @jeff.ohrstrom,

Many thanks for your kind repsonse! I jus had a look at linger and got to understand how it works with vnc. But there’s another problem which I didn’t added in above details. Even thogh I enbale loginctl enable-linger for a specific user like below (an example);

$ loginctl enable-linger harjad

But then inside the vnc session, the web browser (Firefox, Chromium & Steam) is not working. Is this something related to desktop session or with remote enable loginctl? Cause thes ework well when I already login into the mate desktop (GUI) physically on a server. Do you have any suggestion or recommendaiton for this? This would be very helpful to go forward with my work as I was hanged up with this as well.

Thanks in advance!

I’m not 100% sure, but I’d suggest you start them from the command line to see the stdout output to see what the error could be.

Thanks again @jeff.ohrstrom

I already tried running firefox from Mate terminal where it throws the same error as below;


failed to load module "appmenu-gtk-module" No protocol specified Error: cannot open display: :4


But gtk moule already exists and the display is also open at :4 I don understand why this throws same error again and again. But this error doesn’t appear and also it works fine when I already login pysically in GUI node (slurm compute node). I tried my best to resolve this error but nothing works out. If you have any suggestion then please let me know!

Thanks again!

I’m not sure what could be the issue. Can you share the output.log and/or vnc.log from the job? That may give us some insight.

Thanks again @jeff.ohrstrom
I have enclosed the vnc and output logs here as txt files here. I don know whether is this a correct way to share the files or not. if not, please let me know the exact format which you feel comfortable. Your inputs are indedd;

Output_log.txt (23.1 KB)

VNC_log.txt (9.0 KB).

Thanks again!