Apps won't start without sudo first

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
2
down vote

favorite












So, I've got Ubuntu Server 17.10 running with xorg and openbox and I've got this strange problem that I didnt have with my previous build using bspwm.



The problem is that I can't launch any app inside openbox except XTerm which opens normally.
But when I start any app with sudo, e.g. sudo gedit, it launches normally and any subsequent app will launch normally, even without sudo. So I only need to start one app with sudo and the rest will work just fine.



I get no output when I run them without sudo, no errors or anything so I dont know where to start looking...



Thanks for the help!



P.S. Its running in VirtualBox if it makes any difference...










share|improve this question



















  • 3




    Please remember to avoid plain sudo with GUI application programs. Use sudo -H instead, for example sudo -H gedit -- Otherwise the ownership of the configuration files might be modified (to root instead of the normal user ID), and it will make it difficult or impossible to use the program with the normal user ID. See for example this link, Why don't gksu/gksudo or launching a graphical application with sudo work with Wayland?
    – sudodus
    Feb 28 at 9:29











  • Thanks for the tip, I usually run them with gksudo but I did this for a quick example.
    – xCode
    Feb 28 at 13:43






  • 1




    You can change the ownership, of the whole content in your home directory, back to your user by the command: sudo chown -R $USER:$USER $HOME. Where $USER and $HOME are environment variables and you can check their values by the command: echo $USER $HOME.
    – pa4080
    Feb 28 at 13:48















up vote
2
down vote

favorite












So, I've got Ubuntu Server 17.10 running with xorg and openbox and I've got this strange problem that I didnt have with my previous build using bspwm.



The problem is that I can't launch any app inside openbox except XTerm which opens normally.
But when I start any app with sudo, e.g. sudo gedit, it launches normally and any subsequent app will launch normally, even without sudo. So I only need to start one app with sudo and the rest will work just fine.



I get no output when I run them without sudo, no errors or anything so I dont know where to start looking...



Thanks for the help!



P.S. Its running in VirtualBox if it makes any difference...










share|improve this question



















  • 3




    Please remember to avoid plain sudo with GUI application programs. Use sudo -H instead, for example sudo -H gedit -- Otherwise the ownership of the configuration files might be modified (to root instead of the normal user ID), and it will make it difficult or impossible to use the program with the normal user ID. See for example this link, Why don't gksu/gksudo or launching a graphical application with sudo work with Wayland?
    – sudodus
    Feb 28 at 9:29











  • Thanks for the tip, I usually run them with gksudo but I did this for a quick example.
    – xCode
    Feb 28 at 13:43






  • 1




    You can change the ownership, of the whole content in your home directory, back to your user by the command: sudo chown -R $USER:$USER $HOME. Where $USER and $HOME are environment variables and you can check their values by the command: echo $USER $HOME.
    – pa4080
    Feb 28 at 13:48













up vote
2
down vote

favorite









up vote
2
down vote

favorite











So, I've got Ubuntu Server 17.10 running with xorg and openbox and I've got this strange problem that I didnt have with my previous build using bspwm.



The problem is that I can't launch any app inside openbox except XTerm which opens normally.
But when I start any app with sudo, e.g. sudo gedit, it launches normally and any subsequent app will launch normally, even without sudo. So I only need to start one app with sudo and the rest will work just fine.



I get no output when I run them without sudo, no errors or anything so I dont know where to start looking...



Thanks for the help!



P.S. Its running in VirtualBox if it makes any difference...










share|improve this question















So, I've got Ubuntu Server 17.10 running with xorg and openbox and I've got this strange problem that I didnt have with my previous build using bspwm.



The problem is that I can't launch any app inside openbox except XTerm which opens normally.
But when I start any app with sudo, e.g. sudo gedit, it launches normally and any subsequent app will launch normally, even without sudo. So I only need to start one app with sudo and the rest will work just fine.



I get no output when I run them without sudo, no errors or anything so I dont know where to start looking...



Thanks for the help!



P.S. Its running in VirtualBox if it makes any difference...







server gui openbox






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 28 at 13:44

























asked Feb 28 at 9:19









xCode

112




112







  • 3




    Please remember to avoid plain sudo with GUI application programs. Use sudo -H instead, for example sudo -H gedit -- Otherwise the ownership of the configuration files might be modified (to root instead of the normal user ID), and it will make it difficult or impossible to use the program with the normal user ID. See for example this link, Why don't gksu/gksudo or launching a graphical application with sudo work with Wayland?
    – sudodus
    Feb 28 at 9:29











  • Thanks for the tip, I usually run them with gksudo but I did this for a quick example.
    – xCode
    Feb 28 at 13:43






  • 1




    You can change the ownership, of the whole content in your home directory, back to your user by the command: sudo chown -R $USER:$USER $HOME. Where $USER and $HOME are environment variables and you can check their values by the command: echo $USER $HOME.
    – pa4080
    Feb 28 at 13:48













  • 3




    Please remember to avoid plain sudo with GUI application programs. Use sudo -H instead, for example sudo -H gedit -- Otherwise the ownership of the configuration files might be modified (to root instead of the normal user ID), and it will make it difficult or impossible to use the program with the normal user ID. See for example this link, Why don't gksu/gksudo or launching a graphical application with sudo work with Wayland?
    – sudodus
    Feb 28 at 9:29











  • Thanks for the tip, I usually run them with gksudo but I did this for a quick example.
    – xCode
    Feb 28 at 13:43






  • 1




    You can change the ownership, of the whole content in your home directory, back to your user by the command: sudo chown -R $USER:$USER $HOME. Where $USER and $HOME are environment variables and you can check their values by the command: echo $USER $HOME.
    – pa4080
    Feb 28 at 13:48








3




3




Please remember to avoid plain sudo with GUI application programs. Use sudo -H instead, for example sudo -H gedit -- Otherwise the ownership of the configuration files might be modified (to root instead of the normal user ID), and it will make it difficult or impossible to use the program with the normal user ID. See for example this link, Why don't gksu/gksudo or launching a graphical application with sudo work with Wayland?
– sudodus
Feb 28 at 9:29





Please remember to avoid plain sudo with GUI application programs. Use sudo -H instead, for example sudo -H gedit -- Otherwise the ownership of the configuration files might be modified (to root instead of the normal user ID), and it will make it difficult or impossible to use the program with the normal user ID. See for example this link, Why don't gksu/gksudo or launching a graphical application with sudo work with Wayland?
– sudodus
Feb 28 at 9:29













Thanks for the tip, I usually run them with gksudo but I did this for a quick example.
– xCode
Feb 28 at 13:43




Thanks for the tip, I usually run them with gksudo but I did this for a quick example.
– xCode
Feb 28 at 13:43




1




1




You can change the ownership, of the whole content in your home directory, back to your user by the command: sudo chown -R $USER:$USER $HOME. Where $USER and $HOME are environment variables and you can check their values by the command: echo $USER $HOME.
– pa4080
Feb 28 at 13:48





You can change the ownership, of the whole content in your home directory, back to your user by the command: sudo chown -R $USER:$USER $HOME. Where $USER and $HOME are environment variables and you can check their values by the command: echo $USER $HOME.
– pa4080
Feb 28 at 13:48
















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',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
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%2f1010570%2fapps-wont-start-without-sudo-first%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1010570%2fapps-wont-start-without-sudo-first%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

pylint3 and pip3 broken

Missing snmpget and snmpwalk

How to enroll fingerprints to Ubuntu 17.10 with VFS491