You are not logged in.

#1 2009-06-02 16:45:50

milasch
Member
From: Toronto, ON
Registered: 2009-05-21
Posts: 100

Gnome-session cannot open display

Following Arch Linux wiki alone to install gnome won't work.

I installed xorg and all the packages described on the wiki pages http://wiki.archlinux.org/index.php/Xorg and http://wiki.archlinux.org/index.php/Gnome then I can't start gnome through gnome-session. I can start X though.

It will only work if I install gdm and start gnome through it.

The question is: am I likely to be doing something wrong or the wiki page does need to be updated? What if I didn't want to use GDM, could I somehow set something up to start gnome through gnome-session?

Offline

#2 2009-06-02 20:18:52

Peanut
Member
From: Norway
Registered: 2009-05-24
Posts: 99

Re: Gnome-session cannot open display

milasch wrote:

I can't start gnome through gnome-session. I can start X though.

How exactly did you proceed to "start gnome through gnome-session"? Did you add exec gnome-session to your ~/.xinitrc, and then start X with the command startx?
In that case, what error did you get at the console when X refused to start?

Offline

#3 2009-06-03 11:35:53

milasch
Member
From: Toronto, ON
Registered: 2009-05-21
Posts: 100

Re: Gnome-session cannot open display

First I followed the wiki, installing everything until I got to:

Running the GNOME Desktop

To start GNOME from the console, run:
$ gnome-session

I tried that and this is what I get:

** (gnome-session:2563) WARNING **: Cannot open display:

Then I added exec gnome-session to the end of the file /etc/X11/xinit/xinitrc and tried startx as described on the wiki (to make it global).

Well, startx still opens X window.

gnome-session will still give me the same error.

And finally only if I add exec gnome-session to my ~/.xinitrc gnome will open through startx. gnome-session will lead to the same error.

The wiki might be outdated. I mean, I can get to start gnome but I have to make a few extra steps as I use only 1 user.

Offline

#4 2009-06-03 12:00:34

Peanut
Member
From: Norway
Registered: 2009-05-24
Posts: 99

Re: Gnome-session cannot open display

milasch wrote:

And finally only if I add exec gnome-session to my ~/.xinitrc gnome will open through startx. gnome-session will lead to the same error.

Does this mean that gnome actually starts when you run startx, but that you tried to run the command gnome-session directly from the commandline and this doesn't start X? In that case, everything is exactly as it's supposed to be...

Gnome requires the X Window System in order to run. The command gnome-session is used to start gnome, but it won't start X - so if you try running gnome-session without a running X-server, it will fail. You are therefore supposed to configure ~/.xinitrc to run the windowmanger of your choice (in this case gnome-session), and use the command startx when you want to launch X and gnome.

Offline

#5 2009-06-03 12:10:23

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: Gnome-session cannot open display

export DISPLAY=:0.0

Offline

#6 2009-06-03 12:46:54

milasch
Member
From: Toronto, ON
Registered: 2009-05-21
Posts: 100

Re: Gnome-session cannot open display

perbh wrote:

export DISPLAY=:0.0

Nope, still same error.

Offline

#7 2009-06-03 13:20:07

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: Gnome-session cannot open display

never mind - I'm being stupid.

Look at Peanut above - that's how to do it!!

Last edited by perbh (2009-06-03 13:22:42)

Offline

#8 2009-06-03 13:23:53

milasch
Member
From: Toronto, ON
Registered: 2009-05-21
Posts: 100

Re: Gnome-session cannot open display

perbh wrote:

Hmmm - something might be grabbing your display, try:

export DISPLAY=:0.0; xhost +
$ export DISPLAY=:0.0; xhost +
xhost:  unable to open display ":0.0"

hmm

Offline

#9 2009-06-03 14:52:29

benmorgan
Member
From: Germany
Registered: 2006-07-28
Posts: 67

Re: Gnome-session cannot open display

Just like Peanut said -- running gnome-session alone won't work, because X isn't started.
Try putting "exec gnome-session" in ~/.xinitrc and then always start up X with "startx",
and it will load the gnome-session automatically.

You normally don't have to worry about exporting the display, that's usually already done for you.

Offline

#10 2009-06-03 14:56:13

benmorgan
Member
From: Germany
Registered: 2006-07-28
Posts: 67

Re: Gnome-session cannot open display

(In case you want it to automatically start up gnome-session for you, you can have gdm log you in automatically; then you don't have to do any work)

Offline

#11 2009-06-03 15:03:37

milasch
Member
From: Toronto, ON
Registered: 2009-05-21
Posts: 100

Re: Gnome-session cannot open display

benmorgan wrote:

(In case you want it to automatically start up gnome-session for you, you can have gdm log you in automatically; then you don't have to do any work)

Ye ye, I mean... The only thing I'm worried about is that the wiki is incomplete for newbies like me. I could get my way around easily, installing gdm. Its the second time I'm installing arch linux (not on a VM at work) and I found out following the wiki alone make me question if either I was missing something or the wiki itself was not 100% (99.9% though) complete.

Thanks all, I'll notify the contributor.

Offline

#12 2009-07-13 01:45:15

beatbreaker
Member
Registered: 2009-07-13
Posts: 46

Re: Gnome-session cannot open display

I'll second that, the Wiki is out of date, i've been trying to get into Gnome with the command "gnome-session" and i get the same "cannot open display" message.

also the Arch beginners guide gnome section is inconsistant with what's written in the Arch gnome guide in the wikis. I'm a complete noob so i had no idea what was going on until i read these posts. I'll try later to get it working and report back

Offline

#13 2009-11-01 18:01:01

herzen
Member
From: Pennsylvania, US
Registered: 2009-10-28
Posts: 38

Re: Gnome-session cannot open display

benmorgan wrote:

running gnome-session alone won't work, because X isn't started.
Try putting "exec gnome-session" in ~/.xinitrc and then always start up X with "startx",
and it will load the gnome-session automatically.

I ran into this problem too, following the Arch Gnome guide.

But editing .xinitrc is a bit of a pain, if you're just experimenting with different window managers.

$ startx /usr/bin/gnome-session

works, too.

Offline

Board footer

Powered by FluxBB