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

  1. Download and install VcXsrv. Start "XLaunch" in the Start Menu. A configure wizard will appear. Just keep clicking "Next" to the end.
  1. 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, Select SSH, and then Tunneling. Select Forward X11 connections to, then click OK button.
  1. You also need to enable X11 forwarding in Ubuntu Server. Open the /etc/ssh/sshd_config file. Set the X11Forwarding option as following: X11Forwarding yes
  1. Restart the SSH server: service ssh restart
  1. Reconnect to the Ubuntu Server if needed, and run the following command: sudo apt install -y xauth x11-apps
  1. You may run xcalc to see if X11 forwarding is working properly.

Install Firefox and its dependencies

  1. Run the following command: sudo apt install -y xorg openbox mesa-utils libgl1-mesa-glx firefox
  1. 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
  1. You can run firefox now.

Important reminder

Do NOT install Firefox through snap! The snap version is actually broken on Ubuntu Server.

© Henry Johnson 2021 - 2024

Licensed under CC BY-SA 4.0.

Any and all opinions listed here are my own and not representative of my employers.