How to Disable the Remote Desktop Feature in Ubuntu

The Open Port Risk

Ubuntu includes a built-in remote desktop sharing capability (often utilizing the VNC protocol) that allows you to control your machine from a different computer on the network. While this is an incredibly powerful tool for system administrators or users who run headless home servers, it represents a significant security vulnerability if left enabled on a standard daily-driver laptop. If your machine is connected to a public Wi-Fi network at a coffee shop or an airport, broadcasting an active remote desktop service essentially advertises an open door to your file system, inviting malicious actors to attempt brute-force login attacks against your user account.

Shutting Down the Sharing Daemon

To secure your machine and ensure that no external device can remotely view or control your screen, you must explicitly disable the desktop sharing service within the system settings.

Open your application drawer and search for Settings to launch the main GNOME control panel. In the left-hand navigation sidebar, click on Sharing. In the top-right corner of the main window, you will see a master toggle switch. However, before turning the master switch off, click on the specific Remote Desktop option in the list. Ensure the toggle switch labelled Remote Desktop is turned Off. Also, ensure the toggle for Remote Control is turned Off. Finally, back out to the main Sharing menu and turn the master Sharing toggle switch in the top right corner to the Off position. The background daemon will immediately terminate, closing the associated network ports and securing your Ubuntu system from remote access attempts.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.