0

I want to install and run only a web browser on my RPI4 without installing any desktop environment. I am thinking to just enter a specific URL in my browser and then to be able to access a web browser from where I would be able to access web pages from the IP address of the Raspberry Pi.

I was initially thinking to install browsh which is a more advanced terminal-based web browser but the package seems to be incompatible with Raspberry Pi.

I know my alternative would be to install DE and then enable VNC server on the RPI4 and connect over VNC and then to launch a web browser but I want to simplify this setup and reduce the overhead.

  • Do you want a browser that runs on the pi4, or just a web server? – NomadMaker Dec 29 '19 at 22:10
  • I want a browser that runs on the pi4 – Georgi Stoyanov Dec 30 '19 at 18:22
2

If you enable ssh on the Pi4, and install the desired browser you can cause the browser to run on the Pi and display on another system via XWindows without installing a desktop environment on your Pi.

You'll need to have an XServer installed on the other system (your Windows, Linux, Mac, etc desktop system). On Windows there are choices such as Xming, cygwin, or vcxsrv.

Once you have it all set up, you can remotely start the browser from your Windows/Linux/Mac system via ssh and direct it to display on the Xserver.

Here's one way:

On Windows: I use cygwin, and install the Xserver (packages xauth, xhost, xlaunch, xload, xorg-docs, xorg-scripts, xorg-server, xrdb, xset, xterm). I also install keychain for ssh key management.

In my .XWinrc file on the Windows system I have lines similar to the following:

"pisrv1 xterm" exec "/home/bls/bin/fullstartapp pisrv1.starwhite.net xterm"

fullstartup contains:

#!/bin/bash
# keychain must have already been run
#keychain -q --nogui --agents ssh id_dsa
source /home/<youruseridhere>/.keychain/$(hostname)-sh
exec ssh -Xn $*

You can read about ssh keys and keychain at Arch Linux SSH keys or Guide to setting up SSH

On the Pi, do:

apt install chromium-browser firefox-esr xauth xfonts-base xfonts-75dpi xfonts-scalable

This is not 100% complete, but will get you going down the right path, and happy to provide clarifications or further guidance.

| improve this answer | |
  • I am currently trying to do that from a Chromebook. I can eventually use the Linux for Chrome to execute remote commands on the Raspberry Pi and I have also generated id-rsa public and private keys on the Raspberry Pi and I am also using a public key to connect to it. – Georgi Stoyanov Dec 29 '19 at 20:41
  • Adding to @bls great answer, I suggest MobaXterm if you are on windows. It is a pretty good terminal/ssh client based on PuTTy that includes an X server and auto-configures SSH tunneling X for you. The Pi will still need the proper X packages installed. Googling for "tunnel X over SSH" should help provide more info. – 0xSheepdog Dec 29 '19 at 20:51
  • I have managed to forward the X11 and even start a firefox window remotely but it was pretty slow and not really responding. I have done this from my Chromebook executing: ssh -X username@IP_ADDRESS and then firefox-esr. Is it supposed to run smoothly on the Raspberry Pi4 with 4Gb of RAM? – Georgi Stoyanov Dec 29 '19 at 20:57
  • xclock and xeyes is running smoothly though. – Georgi Stoyanov Dec 29 '19 at 20:57
  • chromium-browser is running much better, but it is still a bit choppy. Is there a way to make the X11 forwarding more smooth? – Georgi Stoyanov Dec 29 '19 at 21:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.