Difference between revisions of "Remote desktop"
Jump to navigation
Jump to search
(Created page with "Reference tutorial here: [http://blog.jeffcosta.com/2021/04/05/how-to-setup-tigervnc-on-jetson-nano/ here] # Install nano, tigervnc-standalone-server and autocutsel: #: <code...") |
|||
| Line 29: | Line 29: | ||
# Create a service to make VNC server start automatically: | # Create a service to make VNC server start automatically: | ||
#: <code>sudo nano /etc/systemd/system/vncserver@.service</code> | #: <code>sudo nano /etc/systemd/system/vncserver@.service</code> | ||
| + | # Open VNC conf file: | ||
| + | #: <code>sudo nano /etc/vnc.conf</code> | ||
| + | # Check if <code>$localhost = "no";</code> is NOT commented. | ||
# Create a service to make VNC server start automatically: | # Create a service to make VNC server start automatically: | ||
#: <code>sudo nano /etc/systemd/system/vncserver@.service</code> | #: <code>sudo nano /etc/systemd/system/vncserver@.service</code> | ||
| Line 44: | Line 47: | ||
ExecStartPre=-/usr/bin/vncserver -kill :%i > /dev/null 2>&1 | ExecStartPre=-/usr/bin/vncserver -kill :%i > /dev/null 2>&1 | ||
ExecStart=/usr/bin/vncserver :%i -depth 24 -geometry 1920x1080 -nolisten tcp | ExecStart=/usr/bin/vncserver :%i -depth 24 -geometry 1920x1080 -nolisten tcp | ||
| − | |||
ExecStop=/usr/bin/vncserver -kill :%i | ExecStop=/usr/bin/vncserver -kill :%i | ||
| Line 51: | Line 53: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
# Save and exit nano: Ctrl+o (o as in Oscar) to save, press Enter to continue, then Ctrl+x to exit | # Save and exit nano: Ctrl+o (o as in Oscar) to save, press Enter to continue, then Ctrl+x to exit | ||
| + | # Load the new service: | ||
| + | #: <code>sudo systemctl daemon-reload</code> | ||
| + | #: <code>sudo systemctl enable vncserver@1</code> | ||
| + | #: <code>sudo systemctl start vncserver@1</code> | ||
Revision as of 16:45, 26 October 2021
Reference tutorial here: here
- Install nano, tigervnc-standalone-server and autocutsel:
sudo apt install nano tigervnc-standalone-server autocutsel
- Set a password for the VNC server:
vncpasswd
- Create the file ~/.vnc/xstartup using nano:
nano ~/.vnc/xstartup
- Edit with the following content:
!/bin/sh export XDG_RUNTIME_DIR=/run/user/1000 export XKL_XMODMAP_DISABLE=1 unset SESSION_MANAGER unset DBUS_SESSION_BUS_ADDRESS xrdb $HOME/.Xresources xsetroot -solid grey # copy/paste enablement vncconfig -nowin & autocutsel -forkgnome-session & startlxde &
- Save and exit nano: Ctrl+o (o as in Oscar) to save, press Enter to continue, then Ctrl+x to exit
- Make xstartup executable:
chmod +x ~/.vnc/xstartup
- Check if .Xresources exists:
ls -al ~/.Xresources
- If it does not exist, create it:
touch ~/.Xresources
- Create a service to make VNC server start automatically:
sudo nano /etc/systemd/system/vncserver@.service
- Open VNC conf file:
sudo nano /etc/vnc.conf
- Check if
$localhost = "no";is NOT commented. - Create a service to make VNC server start automatically:
sudo nano /etc/systemd/system/vncserver@.service
- Add the following content, and replace <username> by your username :
[Unit] Description=Start TigerVNC Server at startup After=syslog.target network.target [Service] Type=forking User=<username> Group=<username> WorkingDirectory=/home/<username> PIDFile=/home/<username>/.vnc/%H:%i.pid ExecStartPre=-/usr/bin/vncserver -kill :%i > /dev/null 2>&1 ExecStart=/usr/bin/vncserver :%i -depth 24 -geometry 1920x1080 -nolisten tcp ExecStop=/usr/bin/vncserver -kill :%i [Install] WantedBy=multi-user.target
- Save and exit nano: Ctrl+o (o as in Oscar) to save, press Enter to continue, then Ctrl+x to exit
- Load the new service:
sudo systemctl daemon-reloadsudo systemctl enable vncserver@1sudo systemctl start vncserver@1