- 1 1. Introduction: Why Use Remote Desktop on Ubuntu
- 2 2. Comparison of Remote Desktop Methods on Ubuntu: VNC vs RDP
- 3 3. [Latest] How to Enable RDP (Remote Desktop) on Ubuntu 22.04
- 4 4. How to Connect Remotely Using xrdp on Ubuntu 20.04 and Earlier
- 5 5. Connecting with a VNC Server (vino / tightvnc)
- 6 6. How to Connect from Windows to Ubuntu
- 7 7. Troubleshooting Japanese Input and Keyboard Issues
- 7.1 Common issues with Japanese input during remote sessions
- 7.2 Japanese input does not work / IME is inactive
- 7.3 Half-width/Full-width key not working or incorrect key mapping
- 7.4 Backslash (\) or pipe (|) cannot be entered
- 7.5 Alternative input shortcuts when switching fails
- 7.6 Last resort: Copy and paste from the local machine
- 7.7 Summary: Japanese input behavior depends on the protocol
- 8 8. Secure Remote Access Using SSH Tunneling
- 8.1 Security risks of remote desktop connections
- 8.2 What is an SSH tunnel?
- 8.3 Prerequisites: Enable SSH on Ubuntu
- 8.4 Create an SSH tunnel from Windows (VNC example)
- 8.5 Using SSH tunneling with RDP
- 8.6 Improve security with public key authentication
- 8.7 Pros and cons of SSH tunneling
- 8.8 Conclusion: SSH tunneling is essential for external access
- 9 9. FAQ: Common Questions About Ubuntu Remote Desktop
- 9.1 Q1. Why does my remote connection fail?
- 9.2 Q2. The screen is laggy or unstable
- 9.3 Q3. Can Ubuntu connect to Windows?
- 9.4 Q4. How do I connect from outside my network?
- 9.5 Q5. Can I avoid password entry?
- 9.6 Q6. Why does Japanese input fail?
- 9.7 Q7. Is remote desktop free?
- 9.8 Q8. Can multiple users share the same screen?
- 9.9 Q9. Ubuntu enters sleep mode during remote access
- 9.10 Q10. Should I use RDP or VNC?
- 10 10. Conclusion: Master Secure and Efficient Remote Access on Ubuntu
1. Introduction: Why Use Remote Desktop on Ubuntu
Remote operation of Ubuntu is becoming increasingly common
Linux-based operating systems such as Ubuntu have traditionally been associated with developers and server administrators, and were mainly used in local environments. However, in recent years, with the expansion of remote work and the increasing adoption of Ubuntu as a learning PC, the demand for remotely operating Ubuntu has grown significantly.
For example, many users remotely manage their home Ubuntu servers while away, or install Ubuntu on an older laptop and use it as a remote development machine. The range of use cases for remote desktop technology continues to expand.
How is it different from Windows? Advantages unique to Ubuntu
You may wonder, “Windows already has Remote Desktop—why use Ubuntu?” In fact, Ubuntu has several features that make it particularly suitable for remote operation.
- Lightweight and stable, allowing smooth operation even on low-spec hardware
- High security and strong compatibility with encrypted communication such as SSH
- Free and open source, making it cost-effective for multi-device usage
For these reasons, Ubuntu is increasingly chosen for programming education and server use, and is actively utilized through remote connections.
Beginner-friendly despite its reputation for complexity
For users unfamiliar with Linux-based operating systems, remote connection setup may seem intimidating, often associated with command-line operations. In the past, setting up remote access on Ubuntu required manual VNC server configuration or SSH port forwarding, demanding a certain level of technical knowledge.
However, starting with Ubuntu 22.04 LTS, remote connections via RDP (Remote Desktop Protocol) are supported out of the box and can be configured entirely through the GUI. This improvement has made remote desktop usage far more accessible to beginners.
Purpose and structure of this article
This article provides a step-by-step, beginner-friendly explanation of how to enable remote desktop connections on Ubuntu. It covers the latest Ubuntu 22.04 features, xrdp configuration for older versions, and advanced security techniques using VNC and SSH tunneling.
By comparing the characteristics of each method, this guide helps you choose the approach that best fits your environment. We encourage you to read through to the end.
2. Comparison of Remote Desktop Methods on Ubuntu: VNC vs RDP
Multiple protocols are available for remote connections
There is more than one way to implement remote desktop access on Ubuntu. The three most common approaches are:
- RDP (Remote Desktop Protocol)
- VNC (Virtual Network Computing)
- SSH (Secure Shell) with X forwarding or tunneling
Among these, RDP and VNC are primarily used to transfer the desktop screen itself, making them suitable for general remote operations. SSH is mainly used for command-line access or as a supplementary security mechanism.
This section focuses on RDP and VNC, which are particularly beginner-friendly, and compares their characteristics.
What is RDP (Remote Desktop Protocol)?
RDP is a protocol originally developed by Microsoft and widely used as a standard feature in Windows. On Ubuntu, remote access via RDP is possible using software such as xrdp.
From Ubuntu 22.04 onward, RDP functionality is built directly into the GNOME desktop environment, eliminating the need to install xrdp separately and allowing configuration entirely through the GUI.
Key features of RDP:
- High compatibility with Windows and accessible using the standard Windows Remote Desktop client
- Fast and smooth screen rendering
- Built-in authentication and encryption for relatively strong security
Recommended for:
- Users working with both Ubuntu and Windows
- Beginners who want easy GUI-based configuration
- Users who prioritize security and stability
What is VNC (Virtual Network Computing)?
VNC is a cross-platform remote desktop technology. On Ubuntu, it can be implemented using software such as vino or tightvncserver.
Unlike RDP, VNC transfers desktop images sequentially, which can result in slightly slower rendering. However, it offers greater flexibility, including session sharing, allowing multiple users to view and control the same desktop.
Key features of VNC:
- Cross-platform compatibility (Linux, macOS, Android, and more)
- Allows multiple users to share the same desktop session
- Weaker native security, typically used together with SSH tunneling
Recommended for:
- Remote collaboration involving multiple users
- Access from non-Windows devices
- Intermediate to advanced users who want more customization
Comparison Table: RDP vs VNC
| Item | RDP | VNC |
|---|---|---|
| Ease of setup | Excellent (GUI-based, easy from Windows) | Moderate (initial setup required) |
| Display performance | Excellent (smooth) | Moderate (may feel sluggish) |
| Security | Excellent (encryption enabled by default) | Moderate (SSH tunneling recommended) |
| Session sharing | No | Yes (multiple users can share) |
| Platform support | Mainly Windows | Cross-platform (Linux, macOS, Android, etc.) |
Which should you choose?
RDP is recommended for beginners and Windows users. It is easy to configure and provides stable performance, making it ideal for first-time Ubuntu remote desktop users.
On the other hand, VNC offers greater flexibility for users who need advanced customization or access from non-Windows devices. In such cases, it is essential to combine VNC with SSH tunneling for security.
3. [Latest] How to Enable RDP (Remote Desktop) on Ubuntu 22.04
Built-in RDP support in Ubuntu 22.04
Starting with Ubuntu 22.04 LTS, the default GNOME desktop environment includes built-in remote desktop support. This means you can use RDP without installing external tools such as xrdp.
This feature allows you to connect directly from the standard Windows Remote Desktop client (mstsc.exe), making it extremely user-friendly for beginners.
Prerequisites and checks
Before enabling RDP, please confirm the following:
- Your Ubuntu version is 22.04 or later
- You are using the GNOME desktop environment
- You are logged in using an X.org session, not Wayland (important)
The last point—logging in with X.org instead of Wayland—is especially important. Currently, RDP connections are not supported under Wayland. Follow the steps below to switch sessions.
How to log in using an X.org session
- On the Ubuntu login screen, select your username
- Before entering your password, click the gear icon (⚙) in the lower-right corner
- Select “Ubuntu on Xorg”
- Enter your password and log in
Steps to enable Remote Desktop
- Open the Settings application
- Select Sharing from the left menu
- Click Remote Desktop
- Turn on Enable Remote Desktop
- Set the authentication method to Password and enter a connection password
- Under Network, check Allow connections from users on the local network
This completes the configuration on the Ubuntu side.
How to connect from Windows to Ubuntu
- Press Windows key + R, type mstsc, and press Enter
- Enter the Ubuntu IP address in the Computer field
- When prompted, enter the Ubuntu username and password
- Connection established
You can find the Ubuntu IP address under Settings → Wi-Fi or Wired. Alternatively, use the following command in the terminal:
ip aFirewall configuration (if required)
If Ubuntu’s UFW (Uncomplicated Firewall) is enabled, you must allow the RDP port (TCP 3389 by default).
sudo ufw allow 3389/tcpThen verify the firewall status:
sudo ufw statusCommon issues and solutions
| Issue | Solution |
|---|---|
| Black screen after connecting | Confirm that you are logged in using X.org |
| Connection refused | Check firewall settings and ensure both devices are on the same network |
| No response after entering password | Verify that Remote Desktop is enabled in GNOME Sharing settings |
Note: Intended for LAN usage
This method is primarily designed for use within the same local network (LAN). To connect from outside the network, you will need additional measures such as VPN, port forwarding, or SSH tunneling, which are covered in later sections.
4. How to Connect Remotely Using xrdp on Ubuntu 20.04 and Earlier
xrdp is required on Ubuntu 20.04 and earlier
Ubuntu 20.04 and earlier versions do not include built-in RDP functionality like Ubuntu 22.04. To enable remote access from Windows, you must install xrdp, which adds RDP server capabilities to Ubuntu.
xrdp is compatible with Microsoft’s RDP protocol, allowing easy access from the standard Windows Remote Desktop client.
Installing and configuring xrdp
Run the following commands in the terminal to install xrdp:
sudo apt update
sudo apt install xrdp -yAfter installation, the xrdp service starts automatically. Check its status with:
sudo systemctl status xrdpIf you see “active (running)” in green, the service is operating correctly.
Selecting a desktop environment (Xfce recommended)
The default GNOME desktop environment does not work well with xrdp and may result in black screens or failed sessions.
For better compatibility, it is recommended to install and use the lightweight Xfce desktop environment.
Installing Xfce
sudo apt install xfce4 -yConfiguring the session
Create or edit the following file to instruct xrdp to use Xfce:
echo "startxfce4" > ~/.xsessionSet appropriate permissions:
chmod +x ~/.xsessionIn most local use cases, this configuration is sufficient.
Firewall settings
xrdp uses TCP port 3389. If UFW is enabled, allow this port:
sudo ufw allow 3389/tcpConnecting from Windows
- Press Windows key + R and run
mstsc - Enter the Ubuntu IP address
- When the xrdp login screen appears, enter your Ubuntu username and password
- The Xfce desktop session will start
You can confirm the IP address using ip a or hostname -I.
Common problems and fixes
| Symptom | Cause and solution |
|---|---|
| Black screen after login | Use Xfce instead of GNOME; ensure startxfce4 is set in .xsession |
| “Session ended” message | Desktop environment mismatch; confirm Xfce installation |
| Connection drops after password entry | Possible polkit or security issue; check system logs |
Enable xrdp at system startup (optional)
sudo systemctl enable xrdp5. Connecting with a VNC Server (vino / tightvnc)
What is VNC?
VNC (Virtual Network Computing) is a cross-platform protocol for sharing desktop screens. Ubuntu supports VNC through various server implementations, enabling access from PCs, smartphones, and other devices.
Although VNC may be slower and more complex than RDP, it offers flexible session sharing and broad platform support.
Popular VNC servers on Ubuntu
| Server | Features |
|---|---|
| vino | Integrated with GNOME; easy GUI-based setup |
| tightvncserver | Lightweight, command-line focused |
| x11vnc | Access the active logged-in session; ideal for screen sharing |
Using vino in GNOME (Ubuntu 20.04–22.04)
Install vino if needed
sudo apt install vino -yEnable screen sharing
- Open Settings
- Select Sharing → Screen Sharing
- Turn on Screen Sharing
- Enable network access
- Set a password for authentication
X.org login is required for vino to function properly.
Test the connection
Use a VNC client such as RealVNC Viewer or TigerVNC to connect to:
192.168.1.100:5900Using tightvncserver for lightweight setups
Install
sudo apt install tightvncserver -yInitial startup
vncserverStart a VNC session
vncserver :1This starts a session on port 5901.
Configure a lightweight desktop (optional)
#!/bin/bash
xrdb $HOME/.Xresources
startxfce4 &chmod +x ~/.vnc/xstartupSecurity note: use SSH tunneling
VNC traffic is not encrypted. For use outside a local network, it should always be combined with SSH tunneling.
ssh -L 5901:localhost:5901 your-user@remote-ubuntu6. How to Connect from Windows to Ubuntu
Client software is required on the Windows side
Even if Ubuntu is properly configured, the client machine—usually Windows—must have compatible software.
Using Windows built-in Remote Desktop (RDP)
Steps
- Press Windows key + R and enter mstsc
- Enter the Ubuntu IP address
- Enter your credentials
Advantages
- No additional software required
- Fast and stable performance
- Familiar interface for Windows users
Limitations
- Requires RDP support on Ubuntu
- Designed for LAN usage unless combined with VPN or SSH tunneling
7. Troubleshooting Japanese Input and Keyboard Issues
Common issues with Japanese input during remote sessions
When operating Ubuntu remotely, you may encounter issues such as being unable to input Japanese text, the Half-width/Full-width key not working, or the backslash (\) key not functioning correctly. These problems are caused by differences in session environments between local and remote access.
This section explains common Japanese input and keyboard issues encountered during remote connections and how to resolve them.
Japanese input does not work / IME is inactive
Common causes
- The input method (IME) is not running in the remote session
- Frameworks such as fcitx or ibus are not properly linked to the session
- Compatibility issues between GNOME sessions and RDP
Solution 1: Explicitly restart Mozc + fcitx
The most common Japanese input environment on Ubuntu is fcitx-mozc. If it does not start automatically during a remote session, manually restarting it often resolves the issue.
fcitx-autostartor
fcitx -rSolution 2: Reconfigure input sources per session
- Open Settings → Region & Language → Input Sources
- Confirm that “Japanese (Mozc)” is enabled
- If missing, click “+” to add Japanese input
Logging out and logging back in may be required for changes to take effect.
Half-width/Full-width key not working or incorrect key mapping
Remote desktop sessions may misinterpret keyboard layouts, especially when switching between Japanese (JIS) and US keyboards. This often causes issues with keys such as backslash (\) and at-sign (@).
Solution: Explicitly define the keyboard layout
- Settings → Region & Language → Input Sources
- Select “Japanese” or “Japanese (OADG 109A)”
- Apply the layout using the following command if needed:
setxkbmap -model jp106 -layout jpAdding this command to .xsession or .bashrc ensures it is applied automatically during remote login.
Backslash (\) or pipe (|) cannot be entered
This issue is common with RDP connections and is caused by xrdp keymap mismatches.
Workaround: Adjust xrdp key mappings
- Edit the following file:
sudo nano /etc/xrdp/km-0411.ini- This file defines Japanese keyboard mappings. Advanced users may manually adjust differences between JIS and US layouts.
A more practical solution is to switch to a different protocol such as VNC, which avoids this issue entirely.
Alternative input shortcuts when switching fails
Mozc (fcitx) defaults:
Ctrl + SpaceShift + Space(configurable)
These shortcuts can be customized via the fcitx configuration tool.
Last resort: Copy and paste from the local machine
If Japanese input is completely unavailable, copying text from the local Windows machine and pasting it into Ubuntu can serve as a temporary workaround.
Summary: Japanese input behavior depends on the protocol
| Issue | Cause | Solution |
|---|---|---|
| Japanese input unavailable | IME not running | Restart fcitx-mozc, add input source |
| Incorrect key layout | Keyboard mismatch | Use setxkbmap |
| Backslash not working | xrdp keymap issue | Edit keymap or switch to VNC |
8. Secure Remote Access Using SSH Tunneling
Security risks of remote desktop connections
While RDP and VNC are convenient, exposing them directly to the internet is dangerous. Without proper protection, they are vulnerable to unauthorized access and traffic interception.
SSH tunneling provides a secure solution by creating an encrypted channel for remote desktop traffic.
[Windows] --(SSH encrypted)--> [Ubuntu]
|
+--> (Internal port forwarding for RDP or VNC)What is an SSH tunnel?
An SSH tunnel uses the Secure Shell protocol to securely forward other types of network traffic. This allows even unencrypted protocols like VNC to operate safely over encrypted channels.
Prerequisites: Enable SSH on Ubuntu
sudo apt update
sudo apt install openssh-server -ysudo systemctl status sshsudo ufw allow sshCreate an SSH tunnel from Windows (VNC example)
Using the command line
ssh -L 5901:localhost:5901 your-user@ubuntu-ipThen connect your VNC client to:
localhost:5901Using GUI SSH clients
- Tera Term or PuTTY can configure port forwarding via GUI
- Suitable for users who prefer graphical tools
Using SSH tunneling with RDP
ssh -L 3389:localhost:3389 your-user@ubuntu-ipThen connect using Windows Remote Desktop to localhost:3389.
Improve security with public key authentication
ssh-keygenssh-copy-id your-user@ubuntu-ipPubkeyAuthentication yes
PasswordAuthentication nosudo systemctl restart sshPros and cons of SSH tunneling
| Item | Description |
|---|---|
| ✔ Advantages | Encrypted communication with high security |
| ✔ Advantages | No need to expose RDP/VNC ports directly |
| ✖ Disadvantages | Initial setup complexity |
| ✖ Disadvantages | Tunnel must remain open during use |
Conclusion: SSH tunneling is essential for external access
When accessing Ubuntu remotely from outside the local network, SSH tunneling is strongly recommended. It provides a secure and flexible remote access solution.
9. FAQ: Common Questions About Ubuntu Remote Desktop
Q1. Why does my remote connection fail?
A. Check the following:
- Correct IP address
- Same LAN connection
- Firewall settings
- X.org session for RDP
- Running services (xrdp, VNC, SSH)
Q2. The screen is laggy or unstable
A. Try:
- Lower bandwidth mode in RDP
- Use Xfce for VNC
- Avoid heavy graphics
- Use wired LAN
Q3. Can Ubuntu connect to Windows?
A. Yes. Use Remmina:
sudo apt install remmina -yQ4. How do I connect from outside my network?
A. Use VPN or SSH tunneling. Port forwarding is not recommended.
Q5. Can I avoid password entry?
A. SSH supports public key authentication. RDP/VNC auto-login increases risk and should be avoided.
Q6. Why does Japanese input fail?
A. IME or keyboard layout issues. Restart fcitx or apply setxkbmap.
Q7. Is remote desktop free?
A. Yes. Ubuntu, xrdp, VNC, and Remmina are open source and free.
Q8. Can multiple users share the same screen?
A. VNC allows shared sessions; RDP uses separate sessions.
Q9. Ubuntu enters sleep mode during remote access
gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type 'nothing'Q10. Should I use RDP or VNC?
A. RDP for performance, VNC for sharing and flexibility.
10. Conclusion: Master Secure and Efficient Remote Access on Ubuntu
Remote desktop on Ubuntu is easier than you think
Ubuntu remote desktop is practical and accessible, even for beginners. Ubuntu 22.04 provides built-in RDP, while older versions work well with xrdp or VNC.
Choose the right method for your needs
| Use case | Recommended method | Notes |
|---|---|---|
| Home LAN access | RDP | Fast and easy from Windows |
| External secure access | RDP/VNC + SSH tunnel | Encrypted communication |
| Shared screen sessions | VNC | Ideal for collaboration |
| CLI administration | SSH | Lightweight and robust |
Security starts with one extra step
Always combine remote desktop access with SSH tunneling or VPN when accessing Ubuntu externally.
Troubleshooting is part of the process
Most issues—black screens, input problems, connection failures—have known solutions. Refer back to this guide whenever needed.
Take the first step
Start with RDP on the same LAN and experience how simple Ubuntu remote desktop can be.
This concludes the complete guide to Ubuntu remote desktop connections.
Thank you for reading.


