You are not logged in.

#1 2015-12-20 17:03:46

UnfortunatelyPeanutbutter
Member
Registered: 2015-12-20
Posts: 11

[Solved] Firefox, Error: no display specified

Hello,

I've been trying to use arch Linux a few times now so I don't know that much yet.
Now I'm stuck with a problem that is probably relatively simple but confuses me a lot.

I want to add a ssh key to my GitHub account. So I installed Firefox.
The problem is that Firefox won't start up.

when I type:
Firefox

I get:
Error: no display specified

I installed Arch on a USB stick.
The error happens when logged in as a user and also when logged in as root.

I don't know what to do with this error. I've searched the internet but I couldn't find an explanation.

Can anyone help me further?

Last edited by UnfortunatelyPeanutbutter (2015-12-23 09:14:22)

Offline

#2 2015-12-20 17:11:54

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,739

Re: [Solved] Firefox, Error: no display specified

Are you running a Xorg and a Windows manager?  Who is logged on (a user or root)?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2015-12-20 17:12:07

tom.ty89
Member
Registered: 2012-11-15
Posts: 897

Re: [Solved] Firefox, Error: no display specified

Because the DISPLAY env var does not exist in your shell somehow.

[tom@localhost ~]$ unset DISPLAY
[tom@localhost ~]$ firefox
Error: no display specified
[tom@localhost ~]$ pgrep -a X
297 /usr/lib/xorg-server/Xorg -nolisten tcp :0 vt1 -auth /tmp/serverauth.Lfq9c2c0e0
[tom@localhost ~]$ DISPLAY=:0 firefox
[tom@localhost ~]$

Last edited by tom.ty89 (2015-12-20 17:12:29)

Offline

#4 2015-12-20 17:14:51

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [Solved] Firefox, Error: no display specified

Please edit your first post and use a title that actually reflects your issue: https://wiki.archlinux.org/index.php/Fo … ow_to_post

Then include details of your setup: how you login, what you login to, etc...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2015-12-20 19:43:35

UnfortunatelyPeanutbutter
Member
Registered: 2015-12-20
Posts: 11

Re: [Solved] Firefox, Error: no display specified

ewaller wrote:

Are you running a Xorg and a Windows manager?  Who is logged on (a user or root)?

I tried using a display manager(SDDM) in the hope it would get me a display.
However I can't login and now type: ctrl + alt + f2 to get the TUI and then log in.
The error also happened before I installed SDDM.

I installed Xorg but I don't know if it's running. How can I find out if I am?
Is running a display server necessary?

No I'm not using a Windows manager.
The error occurs when logged in as user and also for root.

How is the DISPLAY env var related to the actual display (the one I read the error message from)?

Last edited by UnfortunatelyPeanutbutter (2015-12-20 19:50:07)

Offline

#6 2015-12-20 20:39:03

tom.ty89
Member
Registered: 2012-11-15
Posts: 897

Re: [Solved] Firefox, Error: no display specified

From what I understand the DISPLAY env var is actually some way to tell programs where X is.

Are you saying you're trying to run firefox on a console directly? How can you not know whether X is running? Also in my example above: pgrep

Offline

#7 2015-12-20 20:51:10

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,679
Website

Re: [Solved] Firefox, Error: no display specified

UnfortunatelyPeanutbutter wrote:

I tried using a display manager(SDDM) in the hope it would get me a display.
However I can't login and now

Why not?

What happens when you try to log in?

Perhaps you need to disable kernel mode setting:
https://wiki.archlinux.org/index.php/KM … odesetting

UnfortunatelyPeanutbutter wrote:

Is running a display server necessary?

Not sure what you mean here, you need to run the X server but you don't need a display manager or a window manager or desktop environment to just run firefox.

See https://wiki.archlinux.org/index.php/St … ow_manager

Offline

#8 2015-12-20 21:48:15

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,739

Re: [Solved] Firefox, Error: no display specified

HoaS is right, you don't need a Windows Manger.  Nor do you need a Display Manager.
But, what are we trying to do here?   Most users want some sort of desktop environment or window manager to provide a traditional GUI environment.  Openbox, Gnome, Kde, i3wm, whatever.  Then you launch Firefox from that environment and off you go.
A display manager allows you to log in through a GUI screen giving a warm-and-fuzzy Windows feel.  They also cause much hardship and provide little in return; kind of like a tribble.
HoaS implied you can start an Xserver without a windows manager and just use Firefox full screen.  True, but I doubt that is what you want.  It is a rather specialized use case.
Yes. You do need an Xorg server.

My strong suggestion would be to get a simple graphical environment set up following this article: https://wiki.archlinux.org/index.php/Xorg
Don't use follow the instructions about how to use a display manager, follow the instructions on how to start it manually (In other words, follow the link to Xinitrc.  Once you have a working Xorg environment, firefox will "just work"

Edit: Fixed typo

Last edited by ewaller (2015-12-21 14:57:46)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#9 2015-12-21 14:31:54

UnfortunatelyPeanutbutter
Member
Registered: 2015-12-20
Posts: 11

Re: [Solved] Firefox, Error: no display specified

Head_on_a_Stick wrote:
UnfortunatelyPeanutbutter wrote:

I tried using a display manager(SDDM) in the hope it would get me a display.
However I can't login and now

Why not?

I can't get past the greeter.
When I enter my password in the greeter and press enter or click everywhere like a madman, nothing happens.
journalctl says sddm fails to read from "/var/lib/sddm/.desktop"

I now disabled sddm and can use tty1 as normal again

Offline

#10 2015-12-21 15:03:18

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,739

Re: [Solved] Firefox, Error: no display specified

Okay.  I also presume you have Xorg server installed because you were using sddm.
Are you logged in as a normal user, or are you using root?  If you are using root, stop it.
Have you installed xorg-init, xorg-clock and xterm as indicated in the link I provided?
Do you have a ~/.xinitrc file?  Let's get things working first without one.
What happens when you run startx  ?

Last edited by ewaller (2015-12-21 15:03:43)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#11 2015-12-21 15:41:17

UnfortunatelyPeanutbutter
Member
Registered: 2015-12-20
Posts: 11

Re: [Solved] Firefox, Error: no display specified

tom.ty89 wrote:

From what I understand the DISPLAY env var is actually some way to tell programs where X is.

Are you saying you're trying to run firefox on a console directly?
How can you not know whether X is running?
Also in my example above: pgrep

I want to use Firefox to go to a website and enter some information.
I have no need for a traditional GUI environment I already got windows for that.
I'm now in console (Command-line interface).

Part of the current problem I guess is that all the information and all the definitions are confusing me.
This is what I know so far.

display =  1. a performance, show, or event staged for public entertainment.
                2. an electronic device for the visual presentation of data or images.
I guess in this context the second definition is the relevant one.

display manager  = login manager = log in through a GUI screen.
What does this have to do with the actual display?

window manager = controls the placement and appearance of windows within a windowing system in a graphical user interface.

windowing system = ????

server = a computer or computer program which manages access to a centralized resource or service in a network.

display server = window server = a program whose primary task is to coordinate the input and output of its clients to and from the rest of the operating system, the hardware, and each other.

X =? Xserver =? Xorg = the most popular display server among Linux users.

when looking at the definition of server, is the display the centralized resource of a display server? and the network is that the computer itself?
Does that make Firefox a display client?

edit:
I installed xorg-clock and xterm.
I installed xorg-xinit instead of xorg-init.

Now when i type startx three white textboxes appear and a clock in the upper right corner of my second display screen.

That's a start. big_smile

edit2: when I type Firefox into the white box it actually works. =O

Last edited by UnfortunatelyPeanutbutter (2015-12-21 16:29:19)

Offline

#12 2015-12-21 16:06:51

loqs
Member
Registered: 2014-03-06
Posts: 17,192

Re: [Solved] Firefox, Error: no display specified

UnfortunatelyPeanutbutter wrote:

I want to use Firefox to go to a website and enter some information.
I have no need for a traditional GUI environment I already got windows for that.
I'm now in console (Command-line interface).

Firefox will not work outside a GUI environment.
If you want to just add an ssh key to your github account you could copy the public key to a location accessible by windows then add it to github using a browser under windows.

Offline

#13 2015-12-21 16:36:15

tom.ty89
Member
Registered: 2012-11-15
Posts: 897

Re: [Solved] Firefox, Error: no display specified

ewaller wrote:

Have you installed xorg-init, xorg-clock and xterm as indicated in the link I provided?
Do you have a ~/.xinitrc file?

xorg-clock and xterm (and twm) are unnecessary if he wants to execute anything (DE/WM, maybe even firefox) different from what /etc/X11/xinit/xinitrc does. If he wants to execute the three then he doesn't need an .xinitrc.

xorg-xinit is needed for startx though.

Although it's not recommended, he can actually run `startx /usr/bin/firefox` (yes full path) for testing.

Last edited by tom.ty89 (2015-12-21 16:37:41)

Offline

#14 2015-12-21 16:39:42

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,739

Re: [Solved] Firefox, Error: no display specified

I'm trying to get him going with twm first.  That is more than enough to run Firefox without having to bring in an entire desktop environment.  twm, using the default xinitrc, requires those packages.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#15 2015-12-22 21:39:00

UnfortunatelyPeanutbutter
Member
Registered: 2015-12-20
Posts: 11

Re: [Solved] Firefox, Error: no display specified

I installed ratpoison as a window manager.
Thanks for the help.

Offline

#16 2015-12-22 21:42:34

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [Solved] Firefox, Error: no display specified

Please remember to mark your thread as [Solved] by editing your first post and prepending it to the title.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB