NI Linux Real-Time Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

RDP sever on cRIO

Solved!
Go to solution

1. I am using a cRIO-9045. Since it is using Linux is it possible to install a remote desktop service on the target (essentially I would like to interact with the cRIO as if I had a keyboard + mouse + monitor connected directly to the cRIO).  If yes, where would I find it such package?

 

2. Is there  a good place to find packages that NI Linux RT OS supports? 

 

Thanks

0 Kudos
Message 1 of 10
(5,384 Views)

Hi drakkar,

 

1. From my quick search, I do not see a remote desktop service in the NI repository. What is your use-case? If you are looking to interact with running LabVIEW Applications then a Web-Base Thin Client or Remote Front Panel might be good options. You could probably get xRDP to work, but I have not tried it. I am not sure how much effort it would take.

2. NI Linux RT uses opkg. You can use "opkg list" to see what packages are available on the target, or look at http://download.ni.com/ni-linux-rt/feeds/.

 

Thanks,

Andy 

Product Support Engineer

 

0 Kudos
Message 2 of 10
(5,357 Views)

One possible solution is to use a vnc server on the cRIO (e.g. x11vnc) combined with a vnc viewer on the host side. I've tried RealVNC and it seems to work great. There are other free vnc viewers out there if you search around.

 

x11vnc can be installed on the cRIO target from feeds by running the following commands in a terminal window:

  • opkg update
  • opkg install x11vnc

You can then start it by running x11vnc as 'lvuser'. Also make sure you have 'Embedded UI' enabled in MAX first.

 

I didn't check all the options available in the package feed. There might be other vnc or rdp packages in there. 'opkg list' usually followed by grep can help you sort through the available packages. Another option to see what's available is to look at the http feeds directly e.g. http://download.ni.com/ni-linux-rt/feeds/2018/x64/ but that can be tedious to sort through.

 

Finally if none of the existing packages work for you there is the option to build something from source but that can be a lot more involved.

Message 3 of 10
(5,353 Views)

Hi Gratian,

 

Thanks for pointing me in the right direction. I was able to install x11vnc on cRIO-9045 and a client on a windows machine.

I am also able to connect from client to server however i can't see anything. I just see a low resolution window.

One caveat is that cRIO-9045 uses a USB port as a display port and I am thinking it could pose a problem for the vnc server. 

Do I have to point x11vnc to the right display? How do I list all the display options?

 

Btw, I have used linux for an hour or so, assume I know nothing.

 

Thanks for the help.

 

0 Kudos
Message 4 of 10
(5,338 Views)

Hi drakkar,

The screen for our Embedded UI is typically pretty low resolution to start with. Can you share a screenshot of what you're seeing in the VNC Client side? Here's what I see when I set things up on my end (with the terminal running x11vnc minimized):VNC.png

If that's the case, you can increase the resolution by right-clicking on the desktop and choosing Settings >> Display. If you aren't seeing this, you might not have embedded UI enabled on the remote system. I also started the VNC session within the Embedded UI as opposed to a shell. 

Charlie J.
National Instruments
0 Kudos
Message 5 of 10
(5,333 Views)

I was able to get the VNC client on windows machine to display cRIO linux desktop by doing the following:

 

1. Connected monitor to the cRIO.

2. Rebooted cRIO

3. Launched x11vnc through Linux terminal via putty.

 

This works well, however it requires a monitor to be connected before cRIO is started. Is there a way around that?

There might be instances when a cRIO is out in a field and I want to look at the desktop. In that case I need to have someone connect a monitor AND restart the cRIO. Not very appealing.

 

With windows machines a monitor is not required in order for the RDP to work.

0 Kudos
Message 6 of 10
(5,314 Views)
Solution
Accepted by topic author drakkar

Without a monitor connected the system fails to detect supported screen resolutions and it defaults to something ridiculously low.

To work around this issue you can manually set the (virtual) screen resolution using the 'xrandr' command before starting x11vnc.

 

Using a putty terminal you would:

  1. switch to lvuser: su lvuser
  2. set desired resolution: xrandr --display :0 --fb 1920x1080
  3. start x11vnc with: x11vnc -display :0

All this could be automated in a script. Also I should mention that by default x11vnc has no security - look into setting a password, tunneling the data over an ssh secure connection etc. 'x11vnc --help' is a starting point, more can be found online.

Message 7 of 10
(5,310 Views)

That worked!

 

Just for other people that might be interested in this. Keyboard and mouse only work on the client side if you set your connection to disable View-only, otherwise you can only view the desktop but not interact with it.

 

 

vnc.jpg

0 Kudos
Message 8 of 10
(5,303 Views)

Dear All,

I have followed all the steps related to x11vnc. It works fine but gets log out if when I exit the UltraVNC viewer.

It was suggested to use  -forever or -loop  keep running the interface.

Due to my limited knowledge in Linux, can anyone suggest on how to write the command in Linux for a continuous x11vnc loop.

 

Please help.

 

Thank you.

 

 

 

 

0 Kudos
Message 9 of 10
(4,737 Views)

I'd recommend referring to the official x11vnc documentation. The commands in the answer to this thread should get you started if you add the right flag (e.g, -forever) to the x11vnc command. 

Charlie J.
National Instruments
0 Kudos
Message 10 of 10
(4,725 Views)