root needed to launch X11 application
up vote
1
down vote
favorite
I'm building a Qt application using QML technologie. QML use OpenGL.
The computer running the build is a CentOS 6.7, with intel GPU.
I'm using it only on SSH, and I use XMing (or VcxSrv sometimes) to open graphical applications.
I had multiple trouble to make it works but by googling my problems and playing with xauth I can now remotly open my QML application.
BUT
When running my application with a normal user I get :
KiTTY X11 proxy: Unsupported authorisation protocol
QXcbConnection: Could not connect to display localhost:10.0
I noticed that the error message say Unsupported (a lot of SO question are about Wrong protocol)
AND
I can only open it in root (sudo
does't work here, I need to su
), and I got multiple errors :
failed to get the current screen resources
WARNING: Application /home/user/QMLapp/app calling GLX 1.3 function "glXCreatePbuffer" when GLX 1.3 is not supported! This is an application bug!
QXcbConnection: XCB error: 170 (Unknown), sequence: 163, resource id: 90, major code: 146 (Unknown), minor code: 20
Note :
glxinfo seems fine and direct rendering is activated.
glxgeers works fine too and don't need to be root to work
First question : Can I easily upgrade my GLX ?
Second question : Why it only works in root ?
linux centos x11 qt xming
bumped to the homepage by Community♦ 2 days ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
up vote
1
down vote
favorite
I'm building a Qt application using QML technologie. QML use OpenGL.
The computer running the build is a CentOS 6.7, with intel GPU.
I'm using it only on SSH, and I use XMing (or VcxSrv sometimes) to open graphical applications.
I had multiple trouble to make it works but by googling my problems and playing with xauth I can now remotly open my QML application.
BUT
When running my application with a normal user I get :
KiTTY X11 proxy: Unsupported authorisation protocol
QXcbConnection: Could not connect to display localhost:10.0
I noticed that the error message say Unsupported (a lot of SO question are about Wrong protocol)
AND
I can only open it in root (sudo
does't work here, I need to su
), and I got multiple errors :
failed to get the current screen resources
WARNING: Application /home/user/QMLapp/app calling GLX 1.3 function "glXCreatePbuffer" when GLX 1.3 is not supported! This is an application bug!
QXcbConnection: XCB error: 170 (Unknown), sequence: 163, resource id: 90, major code: 146 (Unknown), minor code: 20
Note :
glxinfo seems fine and direct rendering is activated.
glxgeers works fine too and don't need to be root to work
First question : Can I easily upgrade my GLX ?
Second question : Why it only works in root ?
linux centos x11 qt xming
bumped to the homepage by Community♦ 2 days ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I'm building a Qt application using QML technologie. QML use OpenGL.
The computer running the build is a CentOS 6.7, with intel GPU.
I'm using it only on SSH, and I use XMing (or VcxSrv sometimes) to open graphical applications.
I had multiple trouble to make it works but by googling my problems and playing with xauth I can now remotly open my QML application.
BUT
When running my application with a normal user I get :
KiTTY X11 proxy: Unsupported authorisation protocol
QXcbConnection: Could not connect to display localhost:10.0
I noticed that the error message say Unsupported (a lot of SO question are about Wrong protocol)
AND
I can only open it in root (sudo
does't work here, I need to su
), and I got multiple errors :
failed to get the current screen resources
WARNING: Application /home/user/QMLapp/app calling GLX 1.3 function "glXCreatePbuffer" when GLX 1.3 is not supported! This is an application bug!
QXcbConnection: XCB error: 170 (Unknown), sequence: 163, resource id: 90, major code: 146 (Unknown), minor code: 20
Note :
glxinfo seems fine and direct rendering is activated.
glxgeers works fine too and don't need to be root to work
First question : Can I easily upgrade my GLX ?
Second question : Why it only works in root ?
linux centos x11 qt xming
I'm building a Qt application using QML technologie. QML use OpenGL.
The computer running the build is a CentOS 6.7, with intel GPU.
I'm using it only on SSH, and I use XMing (or VcxSrv sometimes) to open graphical applications.
I had multiple trouble to make it works but by googling my problems and playing with xauth I can now remotly open my QML application.
BUT
When running my application with a normal user I get :
KiTTY X11 proxy: Unsupported authorisation protocol
QXcbConnection: Could not connect to display localhost:10.0
I noticed that the error message say Unsupported (a lot of SO question are about Wrong protocol)
AND
I can only open it in root (sudo
does't work here, I need to su
), and I got multiple errors :
failed to get the current screen resources
WARNING: Application /home/user/QMLapp/app calling GLX 1.3 function "glXCreatePbuffer" when GLX 1.3 is not supported! This is an application bug!
QXcbConnection: XCB error: 170 (Unknown), sequence: 163, resource id: 90, major code: 146 (Unknown), minor code: 20
Note :
glxinfo seems fine and direct rendering is activated.
glxgeers works fine too and don't need to be root to work
First question : Can I easily upgrade my GLX ?
Second question : Why it only works in root ?
linux centos x11 qt xming
linux centos x11 qt xming
edited Oct 1 '15 at 8:13
asked Sep 30 '15 at 15:00
MokaT
11817
11817
bumped to the homepage by Community♦ 2 days ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 2 days ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
up vote
0
down vote
QXcbConnection: Could not connect to display localhost:10.0
The error above may contain some clues. It means that, for this user, the variable $DISPLAY
is set to localhost:10.0
After you su to root, you can check the variable again with echo $DISPLAY
. then change the value of the variable for the normal user accordingly.
Correct value is probably localhost:0.0
Nop, the DISPLAY var is 10.0 on root too.# echo $DISPLAY localhost:10.0
. I've tried to change it, it's no longer working on root with 0.0
– MokaT
Oct 1 '15 at 9:37
add a comment |
up vote
0
down vote
The DISPLAY
value of localhost:10.0
indicates you're on a SSH-forwarded X11 connection, as you stated in the question. If you change the DISPLAY
to :0.0
, then you're saying you want the program to present its windows on the screen that is directly attached to the remote computer... and if you're not physically near it, that isn't going to be very useful.
Direct rendering would require that the GUI application have direct access to the actual GPU that draws to your screen... which is of course impossible when the screen and the application are not in the same host.
It looks like this application might be designed to be used only locally. If it cannot gracefully fall back to indirect rendering, it cannot be used over a remote X11 connection: direct rendering requires that the GPU that will actually do the drawing should be in the same computer as the application, and not separated from it by a network connection.
If you're using a remote X11 connection with Xming
or VcXsrv
, then your OpenGL support levels depends primarily on what OpenGL levels your Xming
or VcXsrv
will support. Of course the remote computer also needs the appropriate OpenGL libraries present, but usually the package manager or the application installer takes care of that.
When you're running it as a regular user, are you running as the user you logged in your X11-forwarding SSH connection, or have you switched to another user account on the remote host after logging in?
Switching user accounts while preserving X11 forwarding requires a bit of extra effort: not only must you ensure that the value of the DISPLAY
variable is preserved, you must also make sure the target user has access to the contents of the ~/.Xauthority file of the source user. You can copy the ~/.Xauthority file to some other location (e.g. into /tmp) and then use the XAUTHORITY
environment variable to point to it.
For example:
<logged in to remote host as user1, with X11 forwarding>
user1$ echo $DISPLAY
localhost:10.0
user1$ cp ~/.Xauthority /tmp/user1.Xauthority
user1$ chgrp user2 /tmp/user1.Xauthority
user1$ chmod 640 /tmp/user1.Xauthority
user1$ sudo -u user2 -i
user2$ export DISPLAY=localhost:10.0
user2$ export XAUTHORITY=/tmp/user1.Xauthority
<now running a X11 GUI application should be possible>
This can be often avoided when you're switching from regular user to root, since root can read everyone's files... including the ~/.Xauthority file. So when switching from user1
to root the only things that need to be done is to maintain the DISPLAY
value and point XAUTHORITY
to /home/user1/.Xauthority
. Some Linux distributions include scripts or PAM modules that do this for you automatically when switching from a regular user to root.
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
QXcbConnection: Could not connect to display localhost:10.0
The error above may contain some clues. It means that, for this user, the variable $DISPLAY
is set to localhost:10.0
After you su to root, you can check the variable again with echo $DISPLAY
. then change the value of the variable for the normal user accordingly.
Correct value is probably localhost:0.0
Nop, the DISPLAY var is 10.0 on root too.# echo $DISPLAY localhost:10.0
. I've tried to change it, it's no longer working on root with 0.0
– MokaT
Oct 1 '15 at 9:37
add a comment |
up vote
0
down vote
QXcbConnection: Could not connect to display localhost:10.0
The error above may contain some clues. It means that, for this user, the variable $DISPLAY
is set to localhost:10.0
After you su to root, you can check the variable again with echo $DISPLAY
. then change the value of the variable for the normal user accordingly.
Correct value is probably localhost:0.0
Nop, the DISPLAY var is 10.0 on root too.# echo $DISPLAY localhost:10.0
. I've tried to change it, it's no longer working on root with 0.0
– MokaT
Oct 1 '15 at 9:37
add a comment |
up vote
0
down vote
up vote
0
down vote
QXcbConnection: Could not connect to display localhost:10.0
The error above may contain some clues. It means that, for this user, the variable $DISPLAY
is set to localhost:10.0
After you su to root, you can check the variable again with echo $DISPLAY
. then change the value of the variable for the normal user accordingly.
Correct value is probably localhost:0.0
QXcbConnection: Could not connect to display localhost:10.0
The error above may contain some clues. It means that, for this user, the variable $DISPLAY
is set to localhost:10.0
After you su to root, you can check the variable again with echo $DISPLAY
. then change the value of the variable for the normal user accordingly.
Correct value is probably localhost:0.0
answered Oct 1 '15 at 9:06
David Dai
1,61221126
1,61221126
Nop, the DISPLAY var is 10.0 on root too.# echo $DISPLAY localhost:10.0
. I've tried to change it, it's no longer working on root with 0.0
– MokaT
Oct 1 '15 at 9:37
add a comment |
Nop, the DISPLAY var is 10.0 on root too.# echo $DISPLAY localhost:10.0
. I've tried to change it, it's no longer working on root with 0.0
– MokaT
Oct 1 '15 at 9:37
Nop, the DISPLAY var is 10.0 on root too.
# echo $DISPLAY localhost:10.0
. I've tried to change it, it's no longer working on root with 0.0– MokaT
Oct 1 '15 at 9:37
Nop, the DISPLAY var is 10.0 on root too.
# echo $DISPLAY localhost:10.0
. I've tried to change it, it's no longer working on root with 0.0– MokaT
Oct 1 '15 at 9:37
add a comment |
up vote
0
down vote
The DISPLAY
value of localhost:10.0
indicates you're on a SSH-forwarded X11 connection, as you stated in the question. If you change the DISPLAY
to :0.0
, then you're saying you want the program to present its windows on the screen that is directly attached to the remote computer... and if you're not physically near it, that isn't going to be very useful.
Direct rendering would require that the GUI application have direct access to the actual GPU that draws to your screen... which is of course impossible when the screen and the application are not in the same host.
It looks like this application might be designed to be used only locally. If it cannot gracefully fall back to indirect rendering, it cannot be used over a remote X11 connection: direct rendering requires that the GPU that will actually do the drawing should be in the same computer as the application, and not separated from it by a network connection.
If you're using a remote X11 connection with Xming
or VcXsrv
, then your OpenGL support levels depends primarily on what OpenGL levels your Xming
or VcXsrv
will support. Of course the remote computer also needs the appropriate OpenGL libraries present, but usually the package manager or the application installer takes care of that.
When you're running it as a regular user, are you running as the user you logged in your X11-forwarding SSH connection, or have you switched to another user account on the remote host after logging in?
Switching user accounts while preserving X11 forwarding requires a bit of extra effort: not only must you ensure that the value of the DISPLAY
variable is preserved, you must also make sure the target user has access to the contents of the ~/.Xauthority file of the source user. You can copy the ~/.Xauthority file to some other location (e.g. into /tmp) and then use the XAUTHORITY
environment variable to point to it.
For example:
<logged in to remote host as user1, with X11 forwarding>
user1$ echo $DISPLAY
localhost:10.0
user1$ cp ~/.Xauthority /tmp/user1.Xauthority
user1$ chgrp user2 /tmp/user1.Xauthority
user1$ chmod 640 /tmp/user1.Xauthority
user1$ sudo -u user2 -i
user2$ export DISPLAY=localhost:10.0
user2$ export XAUTHORITY=/tmp/user1.Xauthority
<now running a X11 GUI application should be possible>
This can be often avoided when you're switching from regular user to root, since root can read everyone's files... including the ~/.Xauthority file. So when switching from user1
to root the only things that need to be done is to maintain the DISPLAY
value and point XAUTHORITY
to /home/user1/.Xauthority
. Some Linux distributions include scripts or PAM modules that do this for you automatically when switching from a regular user to root.
add a comment |
up vote
0
down vote
The DISPLAY
value of localhost:10.0
indicates you're on a SSH-forwarded X11 connection, as you stated in the question. If you change the DISPLAY
to :0.0
, then you're saying you want the program to present its windows on the screen that is directly attached to the remote computer... and if you're not physically near it, that isn't going to be very useful.
Direct rendering would require that the GUI application have direct access to the actual GPU that draws to your screen... which is of course impossible when the screen and the application are not in the same host.
It looks like this application might be designed to be used only locally. If it cannot gracefully fall back to indirect rendering, it cannot be used over a remote X11 connection: direct rendering requires that the GPU that will actually do the drawing should be in the same computer as the application, and not separated from it by a network connection.
If you're using a remote X11 connection with Xming
or VcXsrv
, then your OpenGL support levels depends primarily on what OpenGL levels your Xming
or VcXsrv
will support. Of course the remote computer also needs the appropriate OpenGL libraries present, but usually the package manager or the application installer takes care of that.
When you're running it as a regular user, are you running as the user you logged in your X11-forwarding SSH connection, or have you switched to another user account on the remote host after logging in?
Switching user accounts while preserving X11 forwarding requires a bit of extra effort: not only must you ensure that the value of the DISPLAY
variable is preserved, you must also make sure the target user has access to the contents of the ~/.Xauthority file of the source user. You can copy the ~/.Xauthority file to some other location (e.g. into /tmp) and then use the XAUTHORITY
environment variable to point to it.
For example:
<logged in to remote host as user1, with X11 forwarding>
user1$ echo $DISPLAY
localhost:10.0
user1$ cp ~/.Xauthority /tmp/user1.Xauthority
user1$ chgrp user2 /tmp/user1.Xauthority
user1$ chmod 640 /tmp/user1.Xauthority
user1$ sudo -u user2 -i
user2$ export DISPLAY=localhost:10.0
user2$ export XAUTHORITY=/tmp/user1.Xauthority
<now running a X11 GUI application should be possible>
This can be often avoided when you're switching from regular user to root, since root can read everyone's files... including the ~/.Xauthority file. So when switching from user1
to root the only things that need to be done is to maintain the DISPLAY
value and point XAUTHORITY
to /home/user1/.Xauthority
. Some Linux distributions include scripts or PAM modules that do this for you automatically when switching from a regular user to root.
add a comment |
up vote
0
down vote
up vote
0
down vote
The DISPLAY
value of localhost:10.0
indicates you're on a SSH-forwarded X11 connection, as you stated in the question. If you change the DISPLAY
to :0.0
, then you're saying you want the program to present its windows on the screen that is directly attached to the remote computer... and if you're not physically near it, that isn't going to be very useful.
Direct rendering would require that the GUI application have direct access to the actual GPU that draws to your screen... which is of course impossible when the screen and the application are not in the same host.
It looks like this application might be designed to be used only locally. If it cannot gracefully fall back to indirect rendering, it cannot be used over a remote X11 connection: direct rendering requires that the GPU that will actually do the drawing should be in the same computer as the application, and not separated from it by a network connection.
If you're using a remote X11 connection with Xming
or VcXsrv
, then your OpenGL support levels depends primarily on what OpenGL levels your Xming
or VcXsrv
will support. Of course the remote computer also needs the appropriate OpenGL libraries present, but usually the package manager or the application installer takes care of that.
When you're running it as a regular user, are you running as the user you logged in your X11-forwarding SSH connection, or have you switched to another user account on the remote host after logging in?
Switching user accounts while preserving X11 forwarding requires a bit of extra effort: not only must you ensure that the value of the DISPLAY
variable is preserved, you must also make sure the target user has access to the contents of the ~/.Xauthority file of the source user. You can copy the ~/.Xauthority file to some other location (e.g. into /tmp) and then use the XAUTHORITY
environment variable to point to it.
For example:
<logged in to remote host as user1, with X11 forwarding>
user1$ echo $DISPLAY
localhost:10.0
user1$ cp ~/.Xauthority /tmp/user1.Xauthority
user1$ chgrp user2 /tmp/user1.Xauthority
user1$ chmod 640 /tmp/user1.Xauthority
user1$ sudo -u user2 -i
user2$ export DISPLAY=localhost:10.0
user2$ export XAUTHORITY=/tmp/user1.Xauthority
<now running a X11 GUI application should be possible>
This can be often avoided when you're switching from regular user to root, since root can read everyone's files... including the ~/.Xauthority file. So when switching from user1
to root the only things that need to be done is to maintain the DISPLAY
value and point XAUTHORITY
to /home/user1/.Xauthority
. Some Linux distributions include scripts or PAM modules that do this for you automatically when switching from a regular user to root.
The DISPLAY
value of localhost:10.0
indicates you're on a SSH-forwarded X11 connection, as you stated in the question. If you change the DISPLAY
to :0.0
, then you're saying you want the program to present its windows on the screen that is directly attached to the remote computer... and if you're not physically near it, that isn't going to be very useful.
Direct rendering would require that the GUI application have direct access to the actual GPU that draws to your screen... which is of course impossible when the screen and the application are not in the same host.
It looks like this application might be designed to be used only locally. If it cannot gracefully fall back to indirect rendering, it cannot be used over a remote X11 connection: direct rendering requires that the GPU that will actually do the drawing should be in the same computer as the application, and not separated from it by a network connection.
If you're using a remote X11 connection with Xming
or VcXsrv
, then your OpenGL support levels depends primarily on what OpenGL levels your Xming
or VcXsrv
will support. Of course the remote computer also needs the appropriate OpenGL libraries present, but usually the package manager or the application installer takes care of that.
When you're running it as a regular user, are you running as the user you logged in your X11-forwarding SSH connection, or have you switched to another user account on the remote host after logging in?
Switching user accounts while preserving X11 forwarding requires a bit of extra effort: not only must you ensure that the value of the DISPLAY
variable is preserved, you must also make sure the target user has access to the contents of the ~/.Xauthority file of the source user. You can copy the ~/.Xauthority file to some other location (e.g. into /tmp) and then use the XAUTHORITY
environment variable to point to it.
For example:
<logged in to remote host as user1, with X11 forwarding>
user1$ echo $DISPLAY
localhost:10.0
user1$ cp ~/.Xauthority /tmp/user1.Xauthority
user1$ chgrp user2 /tmp/user1.Xauthority
user1$ chmod 640 /tmp/user1.Xauthority
user1$ sudo -u user2 -i
user2$ export DISPLAY=localhost:10.0
user2$ export XAUTHORITY=/tmp/user1.Xauthority
<now running a X11 GUI application should be possible>
This can be often avoided when you're switching from regular user to root, since root can read everyone's files... including the ~/.Xauthority file. So when switching from user1
to root the only things that need to be done is to maintain the DISPLAY
value and point XAUTHORITY
to /home/user1/.Xauthority
. Some Linux distributions include scripts or PAM modules that do this for you automatically when switching from a regular user to root.
answered Feb 24 at 10:39
telcoM
14.1k11842
14.1k11842
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f233031%2froot-needed-to-launch-x11-application%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown