03-15-2017, 04:45 AM
Here is a quick tutorial on how to configure x11vnc (VNC Server) for remote access/control to your Linux Lite 3.x PC via VNC client. (please consider adding it to Lite Manual)
A 30 seconds setup:
Copy & paste the code below into leafpad:
Save changes and close leafpad. Then copy /lib/systemd/system/x11vnc.service to /etc/systemd/system/
Update graphical.target file content as shown below:
Save changes and close leafpad. Then copy /lib/systemd/system/graphical.target to /etc/systemd/system/
Reboot:
or start x11vnc without rebooting:
Add Firewall Rule to allow VNC traffic IN
Open Firewall Configuration, select the Rules tab and add a firewall rule as shown below
Remotely accessing/controlling Linux Lite 3.x
From a client computer in your network, using a VNC client of your choice (Remmina, Ultra VNC, TightVNC, Chicken VNC, VNC Viewer, Screen Sharing, (you name it) enter the IP address of your Linux Lite box or its hostname (if there is local DNS resolution available in your network) and enjoy your hard work
For additional details on x11vnc configuration options such as file transfers, etc. read on x11vnc manual:
A 30 seconds setup:
- Start by installing x11vnc. From Terminal:
Code:
sudo apt install -y x11vnc
- Next, let’s create a directory to store a file that will contain the password used for VNC authentication:
Code:
sudo mkdir /etc/x11vnc
- And… well, create an encrypted password file and save it in /etc/x11vnc/. You will be prompted to type and verify the password:
Code:
sudo x11vnc --storepasswd /etc/x11vnc/vncpwd
- Now we will create the systemd service file for the x11vnc service:
Code:
gksu leafpad /lib/systemd/system/x11vnc.service
Copy & paste the code below into leafpad:
Quote:[Unit]
Description=VNC Server for X11
Requires=display-manager.service
After=display-manager.service
[Service]
Type=forking
ExecStart=/usr/bin/x11vnc -dontdisconnect -auth guess -forever -shared -noxdamage -repeat -rfbauth /etc/x11vnc/vncpwd -rfbport 5900 -bg -o /var/log/x11vnc.log
ExecStop=/usr/bin/killall x11vnc
Restart=on-failure
Restart-sec=5
[Install]
WantedBy=multi-user.target
Save changes and close leafpad. Then copy /lib/systemd/system/x11vnc.service to /etc/systemd/system/
Code:
sudo cp /lib/systemd/system/x11vnc.service /etc/systemd/system/
- Next, let’s edit /lib/systemd/system/graphical.target
Code:
gksu leafpad /lib/systemd/system/graphical.target
Update graphical.target file content as shown below:
Quote:# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
[Unit]
Description=Graphical Interface
Documentation=manystemd.special(7)
Requires=multi-user.target
Wants=display-manager.service x11vnc.service
Conflicts=rescue.service rescue.target
After=multi-user.target rescue.service rescue.target display-manager.service
AllowIsolate=yes
Save changes and close leafpad. Then copy /lib/systemd/system/graphical.target to /etc/systemd/system/
Code:
sudo cp /lib/systemd/system/graphical.target /etc/systemd/system/
- Reload services and enable the x11vnc service at boot time:
Code:
sudo systemctl daemon-reload
sudo systemctl enable graphical.target
- Finally, either reboot Linux Lite or manually start x11vnc service:
Reboot:
Code:
sudo reboot now
or start x11vnc without rebooting:
Code:
sudo systemctl start x11vnc.service
Add Firewall Rule to allow VNC traffic IN
Open Firewall Configuration, select the Rules tab and add a firewall rule as shown below
Remotely accessing/controlling Linux Lite 3.x
From a client computer in your network, using a VNC client of your choice (Remmina, Ultra VNC, TightVNC, Chicken VNC, VNC Viewer, Screen Sharing, (you name it) enter the IP address of your Linux Lite box or its hostname (if there is local DNS resolution available in your network) and enjoy your hard work
For additional details on x11vnc configuration options such as file transfers, etc. read on x11vnc manual:
Code:
~ $ man x11vnc
https://unlockforus.com
Sorry for seeming stupid and preferring Linux - I just don't know any better.
Sorry for seeming stupid and preferring Linux - I just don't know any better.