Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] qgit could not connect to any X display
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
equaeghe
Guru
Guru


Joined: 22 Feb 2005
Posts: 463

PostPosted: Fri Mar 22, 2019 12:29 pm    Post subject: [solved] qgit could not connect to any X display Reply with quote

Code:
$ qgit     
No protocol specified
qt.qpa.screen: QXcbConnection: Could not connect to display :0
Could not connect to any X display.

This started happening recently, I have no idea why and I have no idea what to do. I re-emerged, deleted the configuration, and looked in the logs, all without success or leads.


Last edited by equaeghe on Sun Mar 24, 2019 9:56 am; edited 1 time in total
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5591

PostPosted: Fri Mar 22, 2019 10:28 pm    Post subject: Reply with quote

Are you actually running X11?
Back to top
View user's profile Send private message
equaeghe
Guru
Guru


Joined: 22 Feb 2005
Posts: 463

PostPosted: Sat Mar 23, 2019 10:15 am    Post subject: Reply with quote

Ant P. wrote:
Are you actually running X11?

Yes:
Code:
$ ps -e | grep X
 3089 tty1     00:02:44 Xorg
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 13493

PostPosted: Sat Mar 23, 2019 4:28 pm    Post subject: Reply with quote

You can connect simple X applications to that X server? xmessage OK displays a pop-up?
Back to top
View user's profile Send private message
equaeghe
Guru
Guru


Joined: 22 Feb 2005
Posts: 463

PostPosted: Sat Mar 23, 2019 4:33 pm    Post subject: Reply with quote

Hu wrote:
You can connect simple X applications to that X server? xmessage OK displays a pop-up?

No, apparently not:
Code:
$ xmessage OK
No protocol specified
Error: Can't open display: :0

But:
Code:
$ echo $XDG_SESSION_TYPE
x11
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5591

PostPosted: Sat Mar 23, 2019 8:01 pm    Post subject: Reply with quote

Does the hostname in `xauth list` match the one in `sysctl kernel.hostname`?
Back to top
View user's profile Send private message
equaeghe
Guru
Guru


Joined: 22 Feb 2005
Posts: 463

PostPosted: Sat Mar 23, 2019 11:07 pm    Post subject: Reply with quote

Ant P. wrote:
Does the hostname in `xauth list` match the one in `sysctl kernel.hostname`?

Well, the former does not return anything, so I guess we (you) are on to something:
Code:
$ xauth list
xauth:  file /run/user/1000/Xauthority does not exist
$ sysctl kernel.hostname
kernel.hostname = sysoppad
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5591

PostPosted: Sun Mar 24, 2019 12:15 am    Post subject: Reply with quote

Looks like your desktop and terminal might have different ideas about what the $XAUTHORITY env var contains. Can you open new terminals normally? How about from within sh?

Try strings /proc/{window manager PID}/environ | grep XAUTH. If it shows a different path, creating a symlink to it in /run/user/1000/ should solve the problem for now. (the default location is ~/.Xauthority)
Back to top
View user's profile Send private message
equaeghe
Guru
Guru


Joined: 22 Feb 2005
Posts: 463

PostPosted: Sun Mar 24, 2019 9:55 am    Post subject: Reply with quote

Ant P. wrote:
Looks like your desktop and terminal might have different ideas about what the $XAUTHORITY env var contains.

You are right. I'm to blame (of course). I had
Code:
export XAUTHORITY="$RUNTIME"/Xauthority

in my bashrc. This was because of an XDGification of my dotfiles I did. Apparently this one I didn't test and only reared its head when I started an X application from a console, which doesn't happen that often.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum