NI Linux Real-Time Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

howto make x11vnc start on boot?

Solved!
Go to solution

I have some cRio 9041s running programs on their RT targets and I am currently using x11vnc to control them from a host laptop

 

Currently I start the x11vnc server by sshing into the devices and running:
> export DISPLAY=:0

> xrandr --fb 1280x800

> x11vnc -display :0 -forever -geometry 1280x800


I would rather have this happen when the device boots so I can skip the ssh portion.  There are guides on the web on how to do this on ubuntu and other systems, but I'm not sure how to do it on the real-time linux that's installed on the Rio.

 

One thing I tried was to put the startup commands in a .sh file, and add that to Settings->Session and Startup-> Application Autostart, but the xrandr command doesn't get set correctly, which results in a vnc viewer only seeing a small portion of the screen.

 

Has anyone done this?  Any advice? 

 

Thanks

J

0 Kudos
Message 1 of 5
(6,615 Views)

I've been facing the same problem, I ended up adding a system exec with the resolution command in the startup vi😀

0 Kudos
Message 2 of 5
(6,505 Views)

I tried putting the xrandr command in a system exec vi in my startup vi, but it didn't seem to do anything.  Can you give me more details on what you did?

0 Kudos
Message 3 of 5
(6,489 Views)
Solution
Accepted by topic author J_Webster

Hey 

 

Let me know if this helps. 

1. VNC into the RT device

    i.) Open a Putty Port 22 connection

   ii.) Execute the commands

        #xrandr --fb 1480x900

        #DISPLAY=:0 x11vnc -forever

 

2. In Settings Manager 

    Settings Manager > Session and Startup > Application Autostart > + Add

    Copy whats in the attached image 

3. Now make that .vi that runs at startup as shown in image.

 

If you need further assistance setup a zoom meeting I'll help you out then, just note that my time zone is GMT +2

 

 

Download All
Message 4 of 5
(6,481 Views)

Ah, I get it now.  Yes that works.  Thanks!

0 Kudos
Message 5 of 5
(6,471 Views)