You are not logged in.

#1 2018-04-03 05:19:42

poopship21
Member
Registered: 2009-05-13
Posts: 177

[SOLVED] startlxde causes Gtk-Warning: cannot open display:0.0

Hi, I have installed the lxde group and xinit.
When I issue the command "startlxde" I get the following error:

'(lxsession:730): Gtk-Warning **: 22:08:41.185: cannot open display'

X seems to be working, since running startx opens a GUI with xterm.

Can someone shed some light on this?  Thanks!

Last edited by poopship21 (2018-04-05 07:19:07)

Offline

#2 2018-04-03 06:55:07

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,104

Re: [SOLVED] startlxde causes Gtk-Warning: cannot open display:0.0

startlxde doesn't start X on it's own https://wiki.archlinux.org/index.php/LXDE#Console

Offline

#3 2018-04-03 15:38:20

poopship21
Member
Registered: 2009-05-13
Posts: 177

Re: [SOLVED] startlxde causes Gtk-Warning: cannot open display:0.0

Hi @V1del, I already set the .xinit to call startlxde, but my understanding is that calling startlxde directly bypassed startx completely, so it's not necessary to do this.  Can you explain?  Thanks.

Offline

#4 2018-04-03 15:46:46

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,104

Re: [SOLVED] startlxde causes Gtk-Warning: cannot open display:0.0

I only know what the wiki tells me in that regard, and since you evidently seem not to be able to run startlxde without a running X server (it is searching for an X server and erroring out) I'm quite sure that you are misinformed and indeed have to run startx/xinit in some form.

In contrast, startxfce4 from the XFCE desktop will launch an X server if it isn't running already.

Last edited by V1del (2018-04-03 15:58:43)

Offline

#5 2018-04-03 16:03:18

poopship21
Member
Registered: 2009-05-13
Posts: 177

Re: [SOLVED] startlxde causes Gtk-Warning: cannot open display:0.0

What I'm saying is that there must be something else going on, since I had already changed my .xinit according to the wiki code you referenced!

Last edited by poopship21 (2018-04-03 16:04:01)

Offline

#6 2018-04-03 16:11:05

Chazza
Wiki Maintainer
Registered: 2013-06-02
Posts: 506

Re: [SOLVED] startlxde causes Gtk-Warning: cannot open display:0.0

poopship21 wrote:

What I'm saying is that there must be something else going on, since I had already changed my .xinit according to the wiki code you referenced!

Right, but startlxde doesn't care about ~/.xinitrc. It sets a few variables, starts dbus and calls lxsession. You can see for yourself: startlxde

Note that it doesn't call xinit, thus the expectation is that X.org is already started.

Offline

#7 2018-04-03 16:13:38

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,104

Re: [SOLVED] startlxde causes Gtk-Warning: cannot open display:0.0

Ah that makes more sense. Post your .xinitrc (in [ code ] tags), educated guess you left some other commands before the exec starlxde that also start with exec. A exec call will replace the running shell (that is parsing your script) with the specified command and hence if you added that directive later in the file and still have the default twm in there, your lxde line is never reached

Edit: Or maybe not, refer to Chazza's answer as to why calling startlxde is insufficient, refer to mine if you actually have an issue with startx

Last edited by V1del (2018-04-03 16:15:45)

Offline

#8 2018-04-05 04:20:53

poopship21
Member
Registered: 2009-05-13
Posts: 177

Re: [SOLVED] startlxde causes Gtk-Warning: cannot open display:0.0

V1del wrote:

Ah that makes more sense. Post your .xinitrc (in [ code ] tags), educated guess you left some other commands before the exec starlxde that also start with exec. A exec call will replace the running shell (that is parsing your script) with the specified command and hence if you added that directive later in the file and still have the default twm in there, your lxde line is never reached

Edit: Or maybe not, refer to Chazza's answer as to why calling startlxde is insufficient, refer to mine if you actually have an issue with startx

Thanks v1del.  It turned out that uninstalling xinit and installing the sddm display manager worked out of the box.  Thanks for the helpful comments, it's always nice to know a little more about whats happening under the hood.

Offline

#9 2018-04-05 07:16:45

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,104

Re: [SOLVED] startlxde causes Gtk-Warning: cannot open display:0.0

Well yeah now you are using SDDM to start your Xorg and SDDM will in turn launch startlxde. I'm not entirely sure what your remaining issue with startx was, however if this is a solution you can live with, please mark the thread as [SOLVED] by editing the title in your first post.

Offline

Board footer

Powered by FluxBB