CachyOS Remote Desktop - ryzendew/Linux-Tips-and-Tricks GitHub Wiki
CachyOS Remote Desktop Guide
Complete beginner-friendly guide to remote desktop on CachyOS, including VNC, RDP, SSH X11 forwarding, and remote access setup.
Table of Contents
- Understanding Remote Desktop
- VNC Setup
- RDP Setup
- SSH X11 Forwarding
- Remote Access Security
- Troubleshooting
Understanding Remote Desktop
What is Remote Desktop?
Remote desktop allows accessing desktop from another computer.
What it does:
- Remote access: Access computer from anywhere
- Desktop sharing: Share desktop with others
- Remote control: Control computer remotely
- Network access: Access over network/internet
Why use remote desktop:
- Remote work: Work from anywhere
- Support: Help others remotely
- Access: Access home computer
- Convenience: Easy remote access
VNC Setup
What is VNC?
VNC (Virtual Network Computing) is remote desktop protocol.
What it does:
- Remote desktop: Access desktop remotely
- Cross-platform: Works on multiple OS
- Simple: Easy to set up
- Widely supported: Many clients available
Installing VNC
Install TigerVNC:
sudo pacman -S tigervnc
What this does:
- Installs TigerVNC server
- Provides VNC server
- Makes remote access available
Or install other VNC servers:
sudo pacman -S tightvnc
# or
sudo pacman -S x11vnc
Configuring VNC
Set VNC password:
vncpasswd
What this does:
- Sets VNC password
- Required for access
- Secures VNC connection
Start VNC server:
vncserver :1
What this does:
- Starts VNC server on display :1
- Makes desktop accessible
- Port 5901 (5900 + display number)
Stop VNC server:
vncserver -kill :1
What this does:
- Stops VNC server
- Closes remote access
- Frees resources
VNC Clients
Connect from client:
- Use VNC client (TigerVNC, RealVNC, etc.)
- Connect to
server-ip:5901 - Enter password
- Access desktop
RDP Setup
What is RDP?
RDP (Remote Desktop Protocol) is Windows remote desktop.
What it does:
- Windows compatibility: Works with Windows
- Good performance: Efficient protocol
- Audio support: Audio forwarding
- File sharing: File transfer support
Installing RDP
Install xrdp:
yay -S xrdp
What this does:
- Installs xrdp server
- Provides RDP server
- Makes RDP access available
Start xrdp:
sudo systemctl enable --now xrdp.service
What this does:
- Enables xrdp at boot
- Starts xrdp server
- Makes RDP available
Configuring RDP
xrdp config:
sudo nano /etc/xrdp/xrdp.ini
What this does:
- Opens xrdp configuration
- Configure RDP settings
- Customize RDP server
Default settings usually work
SSH X11 Forwarding
What is X11 Forwarding?
X11 forwarding runs GUI applications over SSH.
What it does:
- Secure: Uses SSH encryption
- GUI apps: Run graphical applications
- No VNC needed: Direct application access
- Secure: Encrypted connection
Using X11 Forwarding
Connect with X11 forwarding:
ssh -X user@server
What this does:
- Connects with X11 forwarding
- Enables GUI application forwarding
- Runs GUI apps remotely
Trusted X11 forwarding:
ssh -Y user@server
What this does:
- Trusted X11 forwarding
- Less secure but more compatible
- Use when -X doesn't work
Run GUI application:
firefox
What this does:
- Runs Firefox
- Displays on local machine
- Over SSH connection
Remote Access Security
Security Best Practices
Use strong passwords:
- Strong VNC/RDP passwords
- Change default passwords
- Use unique passwords
Use SSH tunneling:
ssh -L 5901:localhost:5901 user@server
What this does:
- Tunnels VNC through SSH
- Encrypts VNC connection
- More secure
Firewall configuration:
- Only allow from trusted IPs
- Use firewall rules
- Restrict access
VPN:
- Use VPN for remote access
- More secure
- Encrypted connection
Troubleshooting
VNC Not Connecting
Check VNC server:
vncserver -list
What this does:
- Lists running VNC servers
- Verifies server is running
- Helps troubleshoot
Check firewall:
sudo firewall-cmd --list-ports
What this does:
- Lists open ports
- VNC needs port 5901 (or other)
- Allow port if blocked
Allow VNC port:
sudo firewall-cmd --add-port=5901/tcp --permanent
sudo firewall-cmd --reload
What this does:
- Allows VNC port
- Makes VNC accessible
- Fixes firewall issues
RDP Not Working
Check xrdp status:
sudo systemctl status xrdp
What this does:
- Shows xrdp status
- Verifies it's running
- Helps troubleshoot
Check firewall:
sudo firewall-cmd --add-service=rdp --permanent
sudo firewall-cmd --reload
What this does:
- Allows RDP service
- Makes RDP accessible
- Fixes firewall issues
Additional Resources
- CachyOS Network Configuration - Network setup
- CachyOS Security Configuration - Security settings
- Arch Linux Wiki - VNC: https://wiki.archlinux.org/title/VNC
- Arch Linux Wiki - xrdp: https://wiki.archlinux.org/title/xrdp
Summary
This guide covered:
- Understanding remote desktop - What it is
- VNC setup - Virtual Network Computing
- RDP setup - Remote Desktop Protocol
- SSH X11 forwarding - Secure GUI access
- Security - Remote access security
- Troubleshooting - Common remote desktop issues
Key Takeaways:
- VNC for simple remote desktop
- RDP for Windows compatibility
- SSH X11 forwarding for secure GUI access
- Use strong passwords
- Configure firewall properly
- Use VPN for security
- Test connectivity if issues occur
This guide is based on the CachyOS Wiki and Arch Linux Wiki and expanded with detailed explanations for beginners. For the most up-to-date remote desktop information, always refer to the official documentation.