How to run Firefox or Chrome on Linux without a GUI

How to run Firefox & Chrome on Linux without a GUI

Is it possible to run Firefox or other graphical applications without a desktop environment?

Yes.

If you have a Linux virtual server that uses low hardware resources and you need to run software such as Firefox, Chrome or other graphic programs without installing desktop environments such as GNOME, XFCE, KDE, … Follow the instructions below:

At this tutorial i used Ubuntu.

1- Update linux repository

sudo apt-get update -y

2- install X Window System

sudo apt-get install xorg

3- Install xinit

xinit is an X display server

sudo apt-get install -y xinit

4- Install the required program. I need Firefox and Google Chrome

Install firefox-esr

sudo apt-get install firefox-esr

5- Install Google Chrome

wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb

sudo apt-get install ./google-chrome-stable_current_amd64.deb

6- Run X Environment

startx

7- Run your Browser

Run Firefox:

firefox-esr

Run google chrome:

You should not use the root user to run Chrome. Create a new user and give it the necessary access.

Then restart the Linux and login with a new user . Chrome does not run with the root user

adduser mirdehghan
usermod -aG sudo mirdehghan
reboot

After login

startx
google-chrome-stable

After finishing the work, you can exit the X environment so that the server resources are not involved.

exit
Leave a Reply

Your email address will not be published. Required fields are marked *

2 × 2 =