ccgx:ccgx_vnc
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
ccgx:ccgx_vnc [2015-10-10 14:41] – [Using VNC to remotely access a CCGX] mvader | ccgx:ccgx_vnc [2017-12-08 14:15] (current) – removed mvader | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Using VNC to remotely access a CCGX ====== | ||
- | **NEW NOTE - Oct 10th 2015**: soon we'll have a standard version of VNC implemented, | ||
- | |||
- | **WARNING**: | ||
- | |||
- | A typical use case where using this would make sense could be the following customer case: 'We will have seven off-grid solar systems to provide energy to remote telemetry equipment. Our client would like to monitor the battery state, as well as other parameters. For this he will make available an Ethernet port, that via a wireless interface, will connect back to base camp. There will be no internet available.' | ||
- | |||
- | ===== Introduction to VNC ===== | ||
- | VNC is a desktop sharing protocol, commonly used to remotely log into a computer. Similar to for example Microsoft Remote Desktop and Teamviewer. It can also be used to remotely view and use a CCGX, from a desktop computer, but also from a phone or tablet! See for example the screenshot below. | ||
- | |||
- | {{ : | ||
- | |||
- | Use the following keys: | ||
- | * ESC is the top left soft button, called ' | ||
- | * Space is the center button | ||
- | * Enter is the top right soft button, called ' | ||
- | |||
- | ===== Prerequisites ===== | ||
- | First, carefully read above warning, and only continue if you know what you are doing. | ||
- | |||
- | Then, you need to have root access to the CCGX ssh shell. Ask for us the login details at mvader@victronenergy.com. | ||
- | |||
- | Enable the SSH server by enabling Remote Support. The Remote support setting is in Settings -> General. | ||
- | |||
- | Connect to the CCGX with a ssh client, for Windows we recommend putty.exe, available at http:// | ||
- | |||
- | ===== Setting up the VNC server ===== | ||
- | 1. Update the package repository | ||
- | |||
- | opkg update | ||
- | | ||
- | 2. Install the vnc server | ||
- | |||
- | opkg install qt4-embedded-plugin-gfxdriver-gfxvnc | ||
- | | ||
- | 3. Go to the directory containing the gui run script | ||
- | |||
- | cd / | ||
- | | ||
- | 4. Start an editor to edit the run file: | ||
- | |||
- | nano -r 1000 ./run | ||
- | | ||
- | A basic text editor will open. Make the changes, and use ctrl-x to save and exit the file. The -r 1000 option is added to prevent nano to 'hard wrap' while changing long lines. | ||
- | |||
- | 5. Add this text to the last line: | ||
- | |||
- | < | ||
- | |||
- | 6. Close the editor (ctrl-x), and then check of you did it correctly: | ||
- | |||
- | cat ./run | ||
- | | ||
- | The contents should be three lines only: | ||
- | |||
- | #!/bin/sh | ||
- | exec 2>&1 | ||
- | exec envdir ./env softlimit -d 2000000 -s 1000000 -a 100000000 / | ||
- | |||
- | 4. Restart the gui | ||
- | |||
- | svc -t . | ||
- | | ||
- | All done! If the gui does not start up any more, double check that you successfully made the changes to the run script. The output of the gui log is in / | ||
- | | ||
- | cat / | ||
- | |||
- | ===== Notes ===== | ||
- | * The above changes will disappear every time that the CCGX is updated | ||
- | * A typical viewer to use on your laptop is available at https:// | ||
- | * With the changes above, you have opened port 5900 for anyone. There is ZERO security. Never do this on a CCGX that is publicly connected to internet. | ||
- | * To go back to the original situation (no VNC) restore the gui script (as well as the rest of the gui) run < | ||
- | * The VNC functionality came 'for free' with the library we use, QT 4.7. The newest version, QT 5, no longer has the VNC option. There is no need to worry immediately: | ||
- | * To make this solution secure, it is probably possible to tunnel it via ssh. Anyone is welcome to figure out how that works exactly and add the information to this page. | ||
- | |||
- | ===== Example use of VNC Viewer for iPhone ===== | ||
- | |||
- | Download and install VNC Viewer from [[https:// | ||
- | |||
- | Setup and save a connection to your Ethernet connected CCGX Broadband/ | ||
- | |||
- | Note the connection will be unencrypted. | ||
- | |||
- | The examples below are from an iPhone 5S. Landscape mode gives a larger image, but portrait mode seems more manageable. Other phones of course may have a different resolution. | ||
- | |||
- | {{ : | ||
- | |||
- | * Pinch and zoom the CCGX image to fit to screen in portrait mode | ||
- | * Tap the keyboard icon | ||
- | |||
- | {{ : | ||
- | |||
- | Navigate using the following keys as shown in the images below: | ||
- | |||
- | * ESC is the top left soft button, called ' | ||
- | * Space is the center button | ||
- | * Enter is the top right soft button, called ' | ||
- | * Up, Down, Left, Right arrows | ||
- | |||
- | {{ : | ||
- | |||
- | {{ : | ||
- | |||
- | To give us an idea of the value of using VNC, please do let us know in the comments below. | ||
- | ===== DISQUS ===== | ||
- | ~~DISQUS~~ |
ccgx/ccgx_vnc.1444480912.txt.gz · Last modified: by mvader