Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Launching Web Browser from Linux Terminal (using ssh)

I have ssh'd into my raspberry pi which uses Raspian OS (like Debian). I am trying to launch the default web browser from the terminal but I'm running into problems. I have looked at this post on launching web browsers from terminal. I have tried the xdg-open and the sensible-browser commands however they seem to just display the desired webpage's contents within the terminal. So no actual web browser is launching in the raspberry pi (which is what I want). My default web browser is Midori. So am I using these terminal commands incorrectly, or am I misunderstanding what they are meant to do? To be clear, I want to actually launch the web browser in the dekstop environment using a terminal command. Thanks!

like image 902
user1893354 Avatar asked Dec 06 '13 17:12

user1893354


People also ask

How do I open chrome from terminal in Linux?

Type "chrome" without quotation marks to run Chrome from the terminal. Chrome is installed in your binary path, so no special directory is required.


1 Answers

graphic applications need an environment variable called $DISPLAY to start.

Start your browser in the terminal via ssh like this for exmaple:

user@host:~# DISPLAY=:0 firefox http://www.google.com

The browser will be started in the gui. In your case:

user@host:~# DISPLAY=:0 midori http://www.google.com
like image 199
chaos Avatar answered Sep 23 '22 06:09

chaos