xrandr hangs and can't start X app

I'm trying to run a Java GUI application and I'm getting:
awt.awterror:can't connect to x11 window server using ':0.0' as the value of the DISPLAY variable

I've already set "setenv DISPLAY :0.0".

The machine has xorg and kde5 installed and running.

How can I resolve this problem? Please help!
 
I tried "setenv DISPLAY 127.0.0.1:0.0", and then started the Java jar app. There was no error but nothing happened, which seems like the app opened, but probably opened on the wrong display output?
 
I have also tried some other non Java apps that uses the display and same thing happened. That is, the program seem to launch and running but nothing happens on the screen.

If I remove it by “setenv DISPLAY” (with nothing following), it reports “Can’t open display”.

please help….
 
Alright, from within Konsole in KDE, I set “setenv DISPLAY localhost:0.0”. Upon entering “xrandr”, the command just hang - no error message and I had to press Ctrl-C to end it. Please help :)
 

SirDice

Administrator
Staff member
Administrator
Moderator
No, it won't. Just don't try to start these things as root and use the same account you used to login on KDE.
 
Thanks! That worked. (I was starting as root). I realized I need to start as a user which is part of "video" group.
 
Thanks! That worked. (I was starting as root). I realized I need to start as a user which is part of "video" group.
The message that gets displayed when drm-kmod gets installed says:

Please ensure that all users requiring graphics are members of the
"video" group.

Of course it is easy to miss this especially during an install.
 

SirDice

Administrator
Staff member
Administrator
Moderator
Root is not allowed to open a window on a user's X session either. That's where the DISPLAY message comes from (environment is also cleaned when you su(1) or sudo(8)).
 
Top