How to remotely run Firefox on Ubuntu Server 18.04
date
Dec 28, 2019
slug
run-firefox-remotely-on-ubuntu
status
Published
tags
Tutorial
summary
Run Firefox browser via X11 forwarding.
type
Post
My environment
- Ubuntu Server 18.04 on my local Hyper-V (on Windows 10 Pro 19H2)
- SSH client: Xshell 6
Procedure
Configure X11 Forwarding
- Download and install VcXsrv. Start "XLaunch" in the Start Menu. A configure wizard will appear. Just keep clicking "Next" to the end.
- It's assumed that you've already had the SSH profile in your installed Xshell. You need to enable the X11 forwarding in that profile. From the toolbar, click
Properties. From Category, SelectSSH, and thenTunneling. SelectForward X11 connections to, then clickOKbutton.
- You also need to enable X11 forwarding in Ubuntu Server. Open the
/etc/ssh/sshd_configfile. Set the X11Forwarding option as following:X11Forwarding yes
- Restart the SSH server:
service ssh restart
- Reconnect to the Ubuntu Server if needed, and run the following command:
sudo apt install -y xauth x11-apps
- You may run
xcalcto see if X11 forwarding is working properly.
Install Firefox and its dependencies
- Run the following command:
sudo apt install -y xorg openbox mesa-utils libgl1-mesa-glx firefox
- If you want to install Chinese fonts, run:
sudo apt install -y fonts-droid-fallback fonts-wqy-zenhei fonts-wqy-microhei fonts-arphic-ukai fonts-arphic-uming
- You can run
firefoxnow.
Important reminder
Do NOT install Firefox through
snap! The snap version is actually broken on Ubuntu Server.