Cheatography
https://cheatography.com
Installationyum install tigervnc-server tigervnc RedHat Enterprise Linux |
Configuration - Single Usercopy configuration file cp /usr/lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@.service | replace USER with actual user vi /etc/systemd/system/vncserver@.service ExecStart=/usr/sbin/runuser -l USER -c "/usr/bin/vncserver %i -geometry 1280x1024" PIDFile=/home/USER/.vnc/%H%i.pid | reload systemd daemon systemctl daemon-reload | set the password for the user su - USER vncpasswd | start vnc server systemctl start vncserver@:1.service systemctl enable vncserver@:1.service |
Configuration - Two Userscopy configuration file cp /usr/lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver-USER_1@.service cp /usr/lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver-USER_2@.service | replace USER with actual user vi /etc/systemd/system/vncserver-USER_1@.service ExecStart=/usr/sbin/runuser -l USER_1 -c "/usr/bin/vncserver %i -geometry 1280x1024" PIDFile=/home/USER_1/.vnc/%H%i.pid vi /etc/systemd/system/vncserver-USER_2@.service ExecStart=/usr/sbin/runuser -l USER_2 -c "/usr/bin/vncserver %i -geometry 1280x1024" PIDFile=/home/USER_2/.vnc/%H%i.pid | reload systemd daemon systemctl daemon-reload | set the password for the user su - USER_1 vncpasswd su - USER_2 vncpasswd | start vnc server systemctl start vncserver-USER_1@:3.service systemctl enable vncserver-USER_1@:3.service systemctl start vncserver-USER_2@:5.service systemctl enable vncserver-USER_2@:5.service |
| | Configuration - Xinetdinstall packages yum install gdm tigervnc tigervnc-server xinetd | start xinetd systemctl enable xinetd.service systemctl start xinetd.service | set systemd default target systemctl set-default graphical.target | enable XDMCP vi /etc/gdm/custom.conf [xdmcp] Enable=true | create xnvcserver file vi /etc/xinetd.d/xvncserver service service_name { disable = no protocol = tcp socket_type = stream wait = no user = nobody server = /usr/bin/Xvnc server_args = -inetd -query localhost -once -geometry selected_geometry -depth selected_depth securitytypes=none }
| define service vi /etc/services # VNC xinetd GDM base service_name 5950/tcp
| reboot system reboot | verify that gdm is listening on UDP port 177 netstat -anu|grep 177 | restart the xinetd service systemctl restart xinetd.service | verify that the xinetd service has loaded the new services netstat -anpt|grep 595 | test the setup vncviewer localhost:5950 | configure firewall firewall-cmd --permanent --zone=public --add-port=5950/tcp firewall-cmd --reload |
Configuration - Share Existing Desktopinstall packages yum install tigervnc-server | set the VNC password vncpasswd | start x0vncserver x0vncserver -PasswordFile=.vnc/passwd -AlwaysShared=1 |
| | VNC Viewerstart viewer vncviewer address:display_number |
Configuration - Firewallsee firewalld settings firewall-cmd --list-all | open a port for TCP traffic in the public zone firewall-cmd --zone=public --add-port=5904/tcp | view the ports that are currently open for the public zone firewall-cmd --zone=public --list-ports |
Tips & Tricksconnecting to VNC Server Using SSH vncviewer -via user@host:display_number | restricting VNC Access ExecStart=/usr/sbin/runuser -l user -c "/usr/bin/vncserver -localhost %i" |
|
Created By
Metadata
Comments
No comments yet. Add yours below!
Add a Comment
More Cheat Sheets by misterrabinhalder