I cannot start graphical apps as root












1















I used to be able to do so, but something as simple as this fails now:



gksudo gedit


and this also fails:



sudo gedit


I receive the error:



Cannot open display.


I haved checked this:




  • .Xauthority and .ICEauthority have my user as owner and also read/write permissions

  • As both files are binary, I cannot understand them and check if they are corrupted


Probably, I have some misconfiguration.
I have read this before and many other guides before asking.



I'm using Ubuntu Precise 12.04 64-bit.










share|improve this question
















bumped to the homepage by Community yesterday


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • Hey, did you manage to solve this? If so, how?

    – Shrinath
    Oct 26 '12 at 5:45
















1















I used to be able to do so, but something as simple as this fails now:



gksudo gedit


and this also fails:



sudo gedit


I receive the error:



Cannot open display.


I haved checked this:




  • .Xauthority and .ICEauthority have my user as owner and also read/write permissions

  • As both files are binary, I cannot understand them and check if they are corrupted


Probably, I have some misconfiguration.
I have read this before and many other guides before asking.



I'm using Ubuntu Precise 12.04 64-bit.










share|improve this question
















bumped to the homepage by Community yesterday


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • Hey, did you manage to solve this? If so, how?

    – Shrinath
    Oct 26 '12 at 5:45














1












1








1


1






I used to be able to do so, but something as simple as this fails now:



gksudo gedit


and this also fails:



sudo gedit


I receive the error:



Cannot open display.


I haved checked this:




  • .Xauthority and .ICEauthority have my user as owner and also read/write permissions

  • As both files are binary, I cannot understand them and check if they are corrupted


Probably, I have some misconfiguration.
I have read this before and many other guides before asking.



I'm using Ubuntu Precise 12.04 64-bit.










share|improve this question
















I used to be able to do so, but something as simple as this fails now:



gksudo gedit


and this also fails:



sudo gedit


I receive the error:



Cannot open display.


I haved checked this:




  • .Xauthority and .ICEauthority have my user as owner and also read/write permissions

  • As both files are binary, I cannot understand them and check if they are corrupted


Probably, I have some misconfiguration.
I have read this before and many other guides before asking.



I'm using Ubuntu Precise 12.04 64-bit.







gui sudo root gksu






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jul 14 '12 at 18:44









Eliah Kagan

82.1k21227366




82.1k21227366










asked Jul 14 '12 at 5:54









SaneteSanete

29135




29135





bumped to the homepage by Community yesterday


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 yesterday


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • Hey, did you manage to solve this? If so, how?

    – Shrinath
    Oct 26 '12 at 5:45



















  • Hey, did you manage to solve this? If so, how?

    – Shrinath
    Oct 26 '12 at 5:45

















Hey, did you manage to solve this? If so, how?

– Shrinath
Oct 26 '12 at 5:45





Hey, did you manage to solve this? If so, how?

– Shrinath
Oct 26 '12 at 5:45










3 Answers
3






active

oldest

votes


















0














You can try executing export DISPLAY=:0 before the command as a workaround.



Or, alternatively, use DISPLAY=:0 gksudo gedit.






share|improve this answer
























  • Thanks for the answer, but it doesn't solve my problem.

    – Sanete
    Jul 26 '12 at 10:16



















0














the answers you are locking for are




  • here

  • and an alternative one here






share|improve this answer


























  • Thanks Boris, I've discovered new tricks. But in my case it doesn't work. Muy user has permissions to sudo.

    – Sanete
    Jul 26 '12 at 10:22



















-1














Try this in a terminal:



su -


this will ask root password and give a root terminal session, this worked for me, I could run gedit without problems, for example.






share|improve this answer























    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%2f163384%2fi-cannot-start-graphical-apps-as-root%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    3 Answers
    3






    active

    oldest

    votes








    3 Answers
    3






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    You can try executing export DISPLAY=:0 before the command as a workaround.



    Or, alternatively, use DISPLAY=:0 gksudo gedit.






    share|improve this answer
























    • Thanks for the answer, but it doesn't solve my problem.

      – Sanete
      Jul 26 '12 at 10:16
















    0














    You can try executing export DISPLAY=:0 before the command as a workaround.



    Or, alternatively, use DISPLAY=:0 gksudo gedit.






    share|improve this answer
























    • Thanks for the answer, but it doesn't solve my problem.

      – Sanete
      Jul 26 '12 at 10:16














    0












    0








    0







    You can try executing export DISPLAY=:0 before the command as a workaround.



    Or, alternatively, use DISPLAY=:0 gksudo gedit.






    share|improve this answer













    You can try executing export DISPLAY=:0 before the command as a workaround.



    Or, alternatively, use DISPLAY=:0 gksudo gedit.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Jul 14 '12 at 6:01









    int_uaint_ua

    4,246751111




    4,246751111













    • Thanks for the answer, but it doesn't solve my problem.

      – Sanete
      Jul 26 '12 at 10:16



















    • Thanks for the answer, but it doesn't solve my problem.

      – Sanete
      Jul 26 '12 at 10:16

















    Thanks for the answer, but it doesn't solve my problem.

    – Sanete
    Jul 26 '12 at 10:16





    Thanks for the answer, but it doesn't solve my problem.

    – Sanete
    Jul 26 '12 at 10:16













    0














    the answers you are locking for are




    • here

    • and an alternative one here






    share|improve this answer


























    • Thanks Boris, I've discovered new tricks. But in my case it doesn't work. Muy user has permissions to sudo.

      – Sanete
      Jul 26 '12 at 10:22
















    0














    the answers you are locking for are




    • here

    • and an alternative one here






    share|improve this answer


























    • Thanks Boris, I've discovered new tricks. But in my case it doesn't work. Muy user has permissions to sudo.

      – Sanete
      Jul 26 '12 at 10:22














    0












    0








    0







    the answers you are locking for are




    • here

    • and an alternative one here






    share|improve this answer















    the answers you are locking for are




    • here

    • and an alternative one here







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Apr 13 '17 at 12:24









    Community

    1




    1










    answered Jul 17 '12 at 21:26









    BorisBoris

    3,28773356




    3,28773356













    • Thanks Boris, I've discovered new tricks. But in my case it doesn't work. Muy user has permissions to sudo.

      – Sanete
      Jul 26 '12 at 10:22



















    • Thanks Boris, I've discovered new tricks. But in my case it doesn't work. Muy user has permissions to sudo.

      – Sanete
      Jul 26 '12 at 10:22

















    Thanks Boris, I've discovered new tricks. But in my case it doesn't work. Muy user has permissions to sudo.

    – Sanete
    Jul 26 '12 at 10:22





    Thanks Boris, I've discovered new tricks. But in my case it doesn't work. Muy user has permissions to sudo.

    – Sanete
    Jul 26 '12 at 10:22











    -1














    Try this in a terminal:



    su -


    this will ask root password and give a root terminal session, this worked for me, I could run gedit without problems, for example.






    share|improve this answer




























      -1














      Try this in a terminal:



      su -


      this will ask root password and give a root terminal session, this worked for me, I could run gedit without problems, for example.






      share|improve this answer


























        -1












        -1








        -1







        Try this in a terminal:



        su -


        this will ask root password and give a root terminal session, this worked for me, I could run gedit without problems, for example.






        share|improve this answer













        Try this in a terminal:



        su -


        this will ask root password and give a root terminal session, this worked for me, I could run gedit without problems, for example.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 2 '13 at 20:43









        EliasElias

        1




        1






























            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%2f163384%2fi-cannot-start-graphical-apps-as-root%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?

            迪纳利

            南乌拉尔铁路局