xauth: unable to open display “0”












0















I have installed /usr/local/stata/xstata-mp as root, permissions 755.



When I try to run this program from a non-root account via the terminal, I get:



user@host ~ % /usr/local/stata/xstata-mp
(xstata-mp:8030): Gtk-WARNING **: 10:09:24.384: cannot open display: 0


"That's odd," I think, I just know I set DISPLAY=0 in my .zshrc, "Well, maybe I need to explicitly do so when running this command?" So I try:



user@host ~ % DISPLAY=0 /usr/local/stata/stata-mp
(xstata-mp:8201): Gtk-WARNING **: 10:13:28.638: cannot open display: 0


Edit: per @steeldriver 's comment I have also tried DISPLAY=:0



I have a gander around, and find Why don't gksu/gksudo or launching a graphical application with sudo work with Wayland? which seems promising (although I am not using Wayland, I am on Ubuntu 18.10 and Wayland remains installed). I try the below command as user@host, and as su in an administrative account:



user@host ~ % xhost -si:localuser:root
xhost: unable to open display "0"


I get desperate, and try:



user@host ~ % DISPLAY=0 xhost -si:localuser:root
xhost: unable to open display "0"


I try other display numbers all to no avail. I think "I am a newb, maybe localhost really means [LOCAL USER] and try with the permutations mentioned above.



user@host ~ % xhost -si:user:root
xhost: unable to open display "0"


It turns out I am a newb, but that didn't help. :)



How can I make the xhost magic happen so that Gtk doesn't throw a fit and I can just launch my application (as user@host)?










share|improve this question

























  • The DISPLAY variable would usually have the form :0 rather than plain 0 - also you could check that the X server is running on display :0 (by pgrep -a Xorg for example)

    – steeldriver
    Jan 11 at 19:28


















0















I have installed /usr/local/stata/xstata-mp as root, permissions 755.



When I try to run this program from a non-root account via the terminal, I get:



user@host ~ % /usr/local/stata/xstata-mp
(xstata-mp:8030): Gtk-WARNING **: 10:09:24.384: cannot open display: 0


"That's odd," I think, I just know I set DISPLAY=0 in my .zshrc, "Well, maybe I need to explicitly do so when running this command?" So I try:



user@host ~ % DISPLAY=0 /usr/local/stata/stata-mp
(xstata-mp:8201): Gtk-WARNING **: 10:13:28.638: cannot open display: 0


Edit: per @steeldriver 's comment I have also tried DISPLAY=:0



I have a gander around, and find Why don't gksu/gksudo or launching a graphical application with sudo work with Wayland? which seems promising (although I am not using Wayland, I am on Ubuntu 18.10 and Wayland remains installed). I try the below command as user@host, and as su in an administrative account:



user@host ~ % xhost -si:localuser:root
xhost: unable to open display "0"


I get desperate, and try:



user@host ~ % DISPLAY=0 xhost -si:localuser:root
xhost: unable to open display "0"


I try other display numbers all to no avail. I think "I am a newb, maybe localhost really means [LOCAL USER] and try with the permutations mentioned above.



user@host ~ % xhost -si:user:root
xhost: unable to open display "0"


It turns out I am a newb, but that didn't help. :)



How can I make the xhost magic happen so that Gtk doesn't throw a fit and I can just launch my application (as user@host)?










share|improve this question

























  • The DISPLAY variable would usually have the form :0 rather than plain 0 - also you could check that the X server is running on display :0 (by pgrep -a Xorg for example)

    – steeldriver
    Jan 11 at 19:28
















0












0








0








I have installed /usr/local/stata/xstata-mp as root, permissions 755.



When I try to run this program from a non-root account via the terminal, I get:



user@host ~ % /usr/local/stata/xstata-mp
(xstata-mp:8030): Gtk-WARNING **: 10:09:24.384: cannot open display: 0


"That's odd," I think, I just know I set DISPLAY=0 in my .zshrc, "Well, maybe I need to explicitly do so when running this command?" So I try:



user@host ~ % DISPLAY=0 /usr/local/stata/stata-mp
(xstata-mp:8201): Gtk-WARNING **: 10:13:28.638: cannot open display: 0


Edit: per @steeldriver 's comment I have also tried DISPLAY=:0



I have a gander around, and find Why don't gksu/gksudo or launching a graphical application with sudo work with Wayland? which seems promising (although I am not using Wayland, I am on Ubuntu 18.10 and Wayland remains installed). I try the below command as user@host, and as su in an administrative account:



user@host ~ % xhost -si:localuser:root
xhost: unable to open display "0"


I get desperate, and try:



user@host ~ % DISPLAY=0 xhost -si:localuser:root
xhost: unable to open display "0"


I try other display numbers all to no avail. I think "I am a newb, maybe localhost really means [LOCAL USER] and try with the permutations mentioned above.



user@host ~ % xhost -si:user:root
xhost: unable to open display "0"


It turns out I am a newb, but that didn't help. :)



How can I make the xhost magic happen so that Gtk doesn't throw a fit and I can just launch my application (as user@host)?










share|improve this question
















I have installed /usr/local/stata/xstata-mp as root, permissions 755.



When I try to run this program from a non-root account via the terminal, I get:



user@host ~ % /usr/local/stata/xstata-mp
(xstata-mp:8030): Gtk-WARNING **: 10:09:24.384: cannot open display: 0


"That's odd," I think, I just know I set DISPLAY=0 in my .zshrc, "Well, maybe I need to explicitly do so when running this command?" So I try:



user@host ~ % DISPLAY=0 /usr/local/stata/stata-mp
(xstata-mp:8201): Gtk-WARNING **: 10:13:28.638: cannot open display: 0


Edit: per @steeldriver 's comment I have also tried DISPLAY=:0



I have a gander around, and find Why don't gksu/gksudo or launching a graphical application with sudo work with Wayland? which seems promising (although I am not using Wayland, I am on Ubuntu 18.10 and Wayland remains installed). I try the below command as user@host, and as su in an administrative account:



user@host ~ % xhost -si:localuser:root
xhost: unable to open display "0"


I get desperate, and try:



user@host ~ % DISPLAY=0 xhost -si:localuser:root
xhost: unable to open display "0"


I try other display numbers all to no avail. I think "I am a newb, maybe localhost really means [LOCAL USER] and try with the permutations mentioned above.



user@host ~ % xhost -si:user:root
xhost: unable to open display "0"


It turns out I am a newb, but that didn't help. :)



How can I make the xhost magic happen so that Gtk doesn't throw a fit and I can just launch my application (as user@host)?







xorg display






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 11 at 23:15







Lexible

















asked Jan 11 at 18:33









LexibleLexible

1288




1288













  • The DISPLAY variable would usually have the form :0 rather than plain 0 - also you could check that the X server is running on display :0 (by pgrep -a Xorg for example)

    – steeldriver
    Jan 11 at 19:28





















  • The DISPLAY variable would usually have the form :0 rather than plain 0 - also you could check that the X server is running on display :0 (by pgrep -a Xorg for example)

    – steeldriver
    Jan 11 at 19:28



















The DISPLAY variable would usually have the form :0 rather than plain 0 - also you could check that the X server is running on display :0 (by pgrep -a Xorg for example)

– steeldriver
Jan 11 at 19:28







The DISPLAY variable would usually have the form :0 rather than plain 0 - also you could check that the X server is running on display :0 (by pgrep -a Xorg for example)

– steeldriver
Jan 11 at 19:28












0






active

oldest

votes











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1108934%2fxauth-unable-to-open-display-0%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1108934%2fxauth-unable-to-open-display-0%23new-answer', 'question_page');
}
);

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







Popular posts from this blog

How did Captain America manage to do this?

迪纳利

南乌拉尔铁路局