Problem while attempting use GUI in headless mode

/var/run/lightdm/root/:0

Also, if it still fails then you will have to either set DISPLAY=:0 (export DISPLAY=:0) or run the command as a root user or both.

@Prithviraj probably you do not have a connected display at all?
@AnishAney probably the method requires a physically connected display?
Typically it is also required to enable autologin/ disable screen lock etc in order to use VNC, as per my experience

yes…I dont have a connected display…

I think a physical display may not necessarily be required but I am not 100% sure about it, I will have to do some experiments w/ and w/o a display connected. Enabling autologin/disabling screen lock is not necessary as this offers the lock-screen page once connected through vncviewer.

with situation with disconnected display, what works, as per my experience is

However, as it creates a virtual lxde session - it has hard times running anything GL

hey @Andrey1984 …I did try that method but for some reason after installing tightvncserver and xtightvncviewer, i ran vncserver on nano…it said this…

$ vncserver

New 'X' desktop is jetson:1

Starting applications specified in /home/prithviraj/.vnc/xstartup
Log file is /home/prithviraj/.vnc/jetson:1.log

it indicates start of the server

This comes after doing all those steps…

$ xtightvncviewer
Error: Can't open display:

it indicates the argument after : is missed in the command above

how should I correct that?
like this:

xtightvncviewer 0 <password>

xtightvncviewer:1

this was displayed

$ xtightvncviewer:1
-bash: xtightvncviewer:1: command not found

putting a space still doesn’t help

 xtightvncviewer :1
Error: Can't open display:

ip address value is missed in the command above
it should be

xtightvncviewer ipaddress:1

it still says this error

I have connected the ethernet cable with the jetson and my laptop. I i run vncserver and then when i try xtightvncserver…it says this error…what am i doing wrong?

the steps should be followed in full as quoted from the original author’s post [hxn130599]

Connect JN to laptop using ethernet cable and use putty to enter SSH
in SSH, install vncserver as well as viewer:
sudo apt install tightvncserver && sudo apt instsall xtightvncviewer
then run cmd “vncserver” to enter password
edit file xstartup:
sudo nano ~/.vnc/xstartup
then add 3 lines and save:
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
startlxde &
reboot JN and enter SSH again, then start vncserver and viewer:
vncserver
xtightvncviewer (enter hostname:x and pwd)
Then enjoy using remote desktop of JN with only ethernet cable :))

the display number [:x] is to be taken from output of execution of the vncserver
the hostname is the ip address of the jetson
they are variables that needt o be taken from environment then put as arguments at client that gets connected to the vncserver
your previous posts did show that you are omitting parameters that results in obvious error

Hello @Andrey1984 , first of all thanks for helping me out so much and sorry for the late response…
Secondly, can you give more light on this…

And to be clear…client here means my laptop right?

client typically refers to a computer [accessor] from that an acccessible device[server] is accessed
if yor laptop gets conencted to Jetson AGX[server] it will need to get the ip address of the server specified[ jetson ip], also the display parameter of the jetson vncserver [:x] where x will be a number

Thank you @Andrey1984 for your help…Well I was able to achieve, my task without GUI at the end but there is still some problem in the way I’m trying to set up for GUI…anyways…thanks for your contribution… I hope somebody else does benefits from this…