Report this

What is the reason for this report?

How can I run GUI apps like chrome, gedit etc on ubuntu based droplet?

Posted on August 30, 2016

I want to know is there any way I can access GUI environment of my VPS like browsing the web, using other GUI apps, or I have to work with command line only?



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

You can install a desktop environment on your droplet though there is not one installed on any of our images by default. This script can either be added to the user-data box on the droplet create page or can be run on your droplet once it is created. The script will install x2go, a remote desktop server along with the XFCE desktop environment on your droplet. While this script is targeted at Ubuntu 14.04 I just ran a test on a fresh Ubuntu 16.04 droplet and the script works as expected.

Once you’ve run that script on your droplet, download and install the x2go client for your operating system. You should be able to connect by default with the root user. If you received your root password via email you will need to log in once via ssh to set a new password before you’ll be able to connect with x2go.

Running GUI applications like Chrome or gedit on a remote Ubuntu-based droplet requires forwarding the graphical output to your local machine. There are several methods to achieve this, including using SSH with X11 forwarding or setting up a VNC server.

Method 1: SSH with X11 Forwarding

  1. Install Necessary Packages on the Droplet:

    Make sure the xauth and xorg packages are installed on your droplet:

sudo apt update
sudo apt install -y xauth xorg
  1. Install the GUI Applications:

For example, to install Chrome and gedit:

sudo apt install -y gedit
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb
sudo apt-get install -f  # To install any missing dependencies
  1. Enable X11 Forwarding in SSH:

Ensure X11 forwarding is enabled in your SSH configuration. Edit /etc/ssh/sshd_config and set:

X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost yes

Restart the SSH service:

sudo systemctl restart ssh

Connect to the Droplet with X11 Forwarding:

On your local machine, use an SSH client that supports X11 forwarding.

  1. Run the GUI Application:

Once connected, you can run GUI applications like:

gedit &
google-chrome &

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.