xhost setting at boot











up vote
6
down vote

favorite
2












I am able to set xhost at boot in Fedora by editing /etc/gdm/Init/Default and for example add:



/usr/bin/xhost +local:


How can similar be done in Ubuntu? I want that the



/usr/bin/xhost +local:


command is executed when the system is sitting at login prompt.










share|improve this question




























    up vote
    6
    down vote

    favorite
    2












    I am able to set xhost at boot in Fedora by editing /etc/gdm/Init/Default and for example add:



    /usr/bin/xhost +local:


    How can similar be done in Ubuntu? I want that the



    /usr/bin/xhost +local:


    command is executed when the system is sitting at login prompt.










    share|improve this question


























      up vote
      6
      down vote

      favorite
      2









      up vote
      6
      down vote

      favorite
      2






      2





      I am able to set xhost at boot in Fedora by editing /etc/gdm/Init/Default and for example add:



      /usr/bin/xhost +local:


      How can similar be done in Ubuntu? I want that the



      /usr/bin/xhost +local:


      command is executed when the system is sitting at login prompt.










      share|improve this question















      I am able to set xhost at boot in Fedora by editing /etc/gdm/Init/Default and for example add:



      /usr/bin/xhost +local:


      How can similar be done in Ubuntu? I want that the



      /usr/bin/xhost +local:


      command is executed when the system is sitting at login prompt.







      command-line lightdm






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 2 '12 at 6:43









      Peachy

      4,89172843




      4,89172843










      asked Mar 24 '12 at 17:46









      yurtesen

      2212414




      2212414






















          7 Answers
          7






          active

          oldest

          votes

















          up vote
          11
          down vote













          The xhost command needs an active X server to run, it can run at the login screen, for example when lightdm loads.
          You can enable it by editing /etc/lightdm/lightdm.conf and adding the line:



          display-setup-script=/home/user/bin/xhost.sh


          example /etc/lightdm/lightdm.conf file:



          [SeatDefaults]
          greeter-session=unity-greeter
          user-session=ubuntu
          display-setup-script=/home/user/bin/xhost.sh


          example /home/user/bin/xhost.sh file:



          #!/bin/bash
          xhost +


          It works on Ubuntu 12.04.1 LTS, and it was needed to enable a Java application that needed X and was run by Tomcat 6.






          share|improve this answer



















          • 1




            you might need to make the xhost.sh script executable with: chmod +x /home/user/bin/xhost.sh
            – George Litos
            Nov 2 '12 at 6:25












          • Works in Xubuntu 18.04, but make sure the script is executable as @George Litos mentioned, otherwise your system won't boot.
            – José Tomás Tocino
            Jun 12 at 10:21


















          up vote
          1
          down vote













          This worked for me:



          Edit ~/.xinitrc:



          export DISPLAY=":0.0"
          xhost +
          openbox


          Note: in my specific setup, I'm running only openbox. Normally that file is empty or missing in Ubuntu. My guess is that you could remove the "openbox" line and it would work, but I don't have a way to test it right now. If it doesn't work, replace the last line for your window manager command.






          share|improve this answer




























            up vote
            0
            down vote













            ~/.xinitrc did not work for me on Ubuntu 14.04 but the following in ~/.profile did. On each login, GUI/terminal/SSH/etc..., the script will run so I redirect stdout to silence the output.



            xhost +local: > /dev/null






            share|improve this answer




























              up vote
              0
              down vote













              I had the same issue with Ubuntu 17.10. It could be that my system was not properly configured. Anyway, in my case, I added



              xhost + SI:localuser:root > /dev/null



              at the bottom of my ~/.bashrc file and it worked. I don't know if this is a security risk. I share that in case someone else is in the same situation and trust that adding root to the list of previleged X server users should be OK.



              It is suggested here http://ubuntuhandbook.org/index.php/2017/10/ubuntu-17-10-tip-graphical-apps-doesnt-launch-via-root-sudo-gksu/



              You can test it directly on the terminal first:



              $ xhost + SI:localuser:root
              $ xhost -



              The second line makes sure that only those in the list have access to the X server. Then try "Edit as administrator", after right clicking on a file or directlty execute



              $ pkexec gedit



              If this does not work, then it is pointless to make the command permanent in ~/.bashrc.



              To be more precise, I first executed



              $ xhost



              to see which users had access to the X server. I saw that the format was SI:localuser:dominic where dominic is my login name. So, I used the same format SI:localuser:root to add the root user.






              share|improve this answer






























                up vote
                0
                down vote













                Here's a variant of @GeorgeLitos's answer, with these changes:




                • Don't directly modify /etc/lightdm/lightdm.conf, as this is a system-owned file that may be overwritten by system upgrades. Instead, use the extension directory /etc/lightdm/lightdm.conf.d/. This also means that other settings don't need to be duplicated in there.

                • No need for a separate shell script; the command can be directly placed into the configuration file.


                Just create a file (as user root) /etc/lightdm/lightdm.conf.d/xhost.conf with these contents:



                [SeatDefaults]
                display-setup-script=xhost +


                This works on Ubuntu 16.04.5 LTS.






                share|improve this answer




























                  up vote
                  -1
                  down vote













                  Edit the file /etc/rc.local (with sudo) and add the command before the last command (exit 0).






                  share|improve this answer



















                  • 1




                    This wont work(and I tried never the less and it doesnt work). Because that script will not have access rights to change that setting at first place. It has to be done as lightdm user?
                    – yurtesen
                    Mar 26 '12 at 9:24




















                  up vote
                  -1
                  down vote













                  Add the following line to /etc/xdg/lxsession/LXDE/autostart



                  xhost +local:





                  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',
                    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%2f115675%2fxhost-setting-at-boot%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown

























                    7 Answers
                    7






                    active

                    oldest

                    votes








                    7 Answers
                    7






                    active

                    oldest

                    votes









                    active

                    oldest

                    votes






                    active

                    oldest

                    votes








                    up vote
                    11
                    down vote













                    The xhost command needs an active X server to run, it can run at the login screen, for example when lightdm loads.
                    You can enable it by editing /etc/lightdm/lightdm.conf and adding the line:



                    display-setup-script=/home/user/bin/xhost.sh


                    example /etc/lightdm/lightdm.conf file:



                    [SeatDefaults]
                    greeter-session=unity-greeter
                    user-session=ubuntu
                    display-setup-script=/home/user/bin/xhost.sh


                    example /home/user/bin/xhost.sh file:



                    #!/bin/bash
                    xhost +


                    It works on Ubuntu 12.04.1 LTS, and it was needed to enable a Java application that needed X and was run by Tomcat 6.






                    share|improve this answer



















                    • 1




                      you might need to make the xhost.sh script executable with: chmod +x /home/user/bin/xhost.sh
                      – George Litos
                      Nov 2 '12 at 6:25












                    • Works in Xubuntu 18.04, but make sure the script is executable as @George Litos mentioned, otherwise your system won't boot.
                      – José Tomás Tocino
                      Jun 12 at 10:21















                    up vote
                    11
                    down vote













                    The xhost command needs an active X server to run, it can run at the login screen, for example when lightdm loads.
                    You can enable it by editing /etc/lightdm/lightdm.conf and adding the line:



                    display-setup-script=/home/user/bin/xhost.sh


                    example /etc/lightdm/lightdm.conf file:



                    [SeatDefaults]
                    greeter-session=unity-greeter
                    user-session=ubuntu
                    display-setup-script=/home/user/bin/xhost.sh


                    example /home/user/bin/xhost.sh file:



                    #!/bin/bash
                    xhost +


                    It works on Ubuntu 12.04.1 LTS, and it was needed to enable a Java application that needed X and was run by Tomcat 6.






                    share|improve this answer



















                    • 1




                      you might need to make the xhost.sh script executable with: chmod +x /home/user/bin/xhost.sh
                      – George Litos
                      Nov 2 '12 at 6:25












                    • Works in Xubuntu 18.04, but make sure the script is executable as @George Litos mentioned, otherwise your system won't boot.
                      – José Tomás Tocino
                      Jun 12 at 10:21













                    up vote
                    11
                    down vote










                    up vote
                    11
                    down vote









                    The xhost command needs an active X server to run, it can run at the login screen, for example when lightdm loads.
                    You can enable it by editing /etc/lightdm/lightdm.conf and adding the line:



                    display-setup-script=/home/user/bin/xhost.sh


                    example /etc/lightdm/lightdm.conf file:



                    [SeatDefaults]
                    greeter-session=unity-greeter
                    user-session=ubuntu
                    display-setup-script=/home/user/bin/xhost.sh


                    example /home/user/bin/xhost.sh file:



                    #!/bin/bash
                    xhost +


                    It works on Ubuntu 12.04.1 LTS, and it was needed to enable a Java application that needed X and was run by Tomcat 6.






                    share|improve this answer














                    The xhost command needs an active X server to run, it can run at the login screen, for example when lightdm loads.
                    You can enable it by editing /etc/lightdm/lightdm.conf and adding the line:



                    display-setup-script=/home/user/bin/xhost.sh


                    example /etc/lightdm/lightdm.conf file:



                    [SeatDefaults]
                    greeter-session=unity-greeter
                    user-session=ubuntu
                    display-setup-script=/home/user/bin/xhost.sh


                    example /home/user/bin/xhost.sh file:



                    #!/bin/bash
                    xhost +


                    It works on Ubuntu 12.04.1 LTS, and it was needed to enable a Java application that needed X and was run by Tomcat 6.







                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited May 11 '16 at 12:10









                    palacsint

                    1,207109




                    1,207109










                    answered Nov 2 '12 at 6:22









                    George Litos

                    11115




                    11115








                    • 1




                      you might need to make the xhost.sh script executable with: chmod +x /home/user/bin/xhost.sh
                      – George Litos
                      Nov 2 '12 at 6:25












                    • Works in Xubuntu 18.04, but make sure the script is executable as @George Litos mentioned, otherwise your system won't boot.
                      – José Tomás Tocino
                      Jun 12 at 10:21














                    • 1




                      you might need to make the xhost.sh script executable with: chmod +x /home/user/bin/xhost.sh
                      – George Litos
                      Nov 2 '12 at 6:25












                    • Works in Xubuntu 18.04, but make sure the script is executable as @George Litos mentioned, otherwise your system won't boot.
                      – José Tomás Tocino
                      Jun 12 at 10:21








                    1




                    1




                    you might need to make the xhost.sh script executable with: chmod +x /home/user/bin/xhost.sh
                    – George Litos
                    Nov 2 '12 at 6:25






                    you might need to make the xhost.sh script executable with: chmod +x /home/user/bin/xhost.sh
                    – George Litos
                    Nov 2 '12 at 6:25














                    Works in Xubuntu 18.04, but make sure the script is executable as @George Litos mentioned, otherwise your system won't boot.
                    – José Tomás Tocino
                    Jun 12 at 10:21




                    Works in Xubuntu 18.04, but make sure the script is executable as @George Litos mentioned, otherwise your system won't boot.
                    – José Tomás Tocino
                    Jun 12 at 10:21












                    up vote
                    1
                    down vote













                    This worked for me:



                    Edit ~/.xinitrc:



                    export DISPLAY=":0.0"
                    xhost +
                    openbox


                    Note: in my specific setup, I'm running only openbox. Normally that file is empty or missing in Ubuntu. My guess is that you could remove the "openbox" line and it would work, but I don't have a way to test it right now. If it doesn't work, replace the last line for your window manager command.






                    share|improve this answer

























                      up vote
                      1
                      down vote













                      This worked for me:



                      Edit ~/.xinitrc:



                      export DISPLAY=":0.0"
                      xhost +
                      openbox


                      Note: in my specific setup, I'm running only openbox. Normally that file is empty or missing in Ubuntu. My guess is that you could remove the "openbox" line and it would work, but I don't have a way to test it right now. If it doesn't work, replace the last line for your window manager command.






                      share|improve this answer























                        up vote
                        1
                        down vote










                        up vote
                        1
                        down vote









                        This worked for me:



                        Edit ~/.xinitrc:



                        export DISPLAY=":0.0"
                        xhost +
                        openbox


                        Note: in my specific setup, I'm running only openbox. Normally that file is empty or missing in Ubuntu. My guess is that you could remove the "openbox" line and it would work, but I don't have a way to test it right now. If it doesn't work, replace the last line for your window manager command.






                        share|improve this answer












                        This worked for me:



                        Edit ~/.xinitrc:



                        export DISPLAY=":0.0"
                        xhost +
                        openbox


                        Note: in my specific setup, I'm running only openbox. Normally that file is empty or missing in Ubuntu. My guess is that you could remove the "openbox" line and it would work, but I don't have a way to test it right now. If it doesn't work, replace the last line for your window manager command.







                        share|improve this answer












                        share|improve this answer



                        share|improve this answer










                        answered Jan 12 '16 at 8:21









                        lepe

                        80321429




                        80321429






















                            up vote
                            0
                            down vote













                            ~/.xinitrc did not work for me on Ubuntu 14.04 but the following in ~/.profile did. On each login, GUI/terminal/SSH/etc..., the script will run so I redirect stdout to silence the output.



                            xhost +local: > /dev/null






                            share|improve this answer

























                              up vote
                              0
                              down vote













                              ~/.xinitrc did not work for me on Ubuntu 14.04 but the following in ~/.profile did. On each login, GUI/terminal/SSH/etc..., the script will run so I redirect stdout to silence the output.



                              xhost +local: > /dev/null






                              share|improve this answer























                                up vote
                                0
                                down vote










                                up vote
                                0
                                down vote









                                ~/.xinitrc did not work for me on Ubuntu 14.04 but the following in ~/.profile did. On each login, GUI/terminal/SSH/etc..., the script will run so I redirect stdout to silence the output.



                                xhost +local: > /dev/null






                                share|improve this answer












                                ~/.xinitrc did not work for me on Ubuntu 14.04 but the following in ~/.profile did. On each login, GUI/terminal/SSH/etc..., the script will run so I redirect stdout to silence the output.



                                xhost +local: > /dev/null







                                share|improve this answer












                                share|improve this answer



                                share|improve this answer










                                answered Apr 13 '16 at 17:33









                                Lucas

                                502514




                                502514






















                                    up vote
                                    0
                                    down vote













                                    I had the same issue with Ubuntu 17.10. It could be that my system was not properly configured. Anyway, in my case, I added



                                    xhost + SI:localuser:root > /dev/null



                                    at the bottom of my ~/.bashrc file and it worked. I don't know if this is a security risk. I share that in case someone else is in the same situation and trust that adding root to the list of previleged X server users should be OK.



                                    It is suggested here http://ubuntuhandbook.org/index.php/2017/10/ubuntu-17-10-tip-graphical-apps-doesnt-launch-via-root-sudo-gksu/



                                    You can test it directly on the terminal first:



                                    $ xhost + SI:localuser:root
                                    $ xhost -



                                    The second line makes sure that only those in the list have access to the X server. Then try "Edit as administrator", after right clicking on a file or directlty execute



                                    $ pkexec gedit



                                    If this does not work, then it is pointless to make the command permanent in ~/.bashrc.



                                    To be more precise, I first executed



                                    $ xhost



                                    to see which users had access to the X server. I saw that the format was SI:localuser:dominic where dominic is my login name. So, I used the same format SI:localuser:root to add the root user.






                                    share|improve this answer



























                                      up vote
                                      0
                                      down vote













                                      I had the same issue with Ubuntu 17.10. It could be that my system was not properly configured. Anyway, in my case, I added



                                      xhost + SI:localuser:root > /dev/null



                                      at the bottom of my ~/.bashrc file and it worked. I don't know if this is a security risk. I share that in case someone else is in the same situation and trust that adding root to the list of previleged X server users should be OK.



                                      It is suggested here http://ubuntuhandbook.org/index.php/2017/10/ubuntu-17-10-tip-graphical-apps-doesnt-launch-via-root-sudo-gksu/



                                      You can test it directly on the terminal first:



                                      $ xhost + SI:localuser:root
                                      $ xhost -



                                      The second line makes sure that only those in the list have access to the X server. Then try "Edit as administrator", after right clicking on a file or directlty execute



                                      $ pkexec gedit



                                      If this does not work, then it is pointless to make the command permanent in ~/.bashrc.



                                      To be more precise, I first executed



                                      $ xhost



                                      to see which users had access to the X server. I saw that the format was SI:localuser:dominic where dominic is my login name. So, I used the same format SI:localuser:root to add the root user.






                                      share|improve this answer

























                                        up vote
                                        0
                                        down vote










                                        up vote
                                        0
                                        down vote









                                        I had the same issue with Ubuntu 17.10. It could be that my system was not properly configured. Anyway, in my case, I added



                                        xhost + SI:localuser:root > /dev/null



                                        at the bottom of my ~/.bashrc file and it worked. I don't know if this is a security risk. I share that in case someone else is in the same situation and trust that adding root to the list of previleged X server users should be OK.



                                        It is suggested here http://ubuntuhandbook.org/index.php/2017/10/ubuntu-17-10-tip-graphical-apps-doesnt-launch-via-root-sudo-gksu/



                                        You can test it directly on the terminal first:



                                        $ xhost + SI:localuser:root
                                        $ xhost -



                                        The second line makes sure that only those in the list have access to the X server. Then try "Edit as administrator", after right clicking on a file or directlty execute



                                        $ pkexec gedit



                                        If this does not work, then it is pointless to make the command permanent in ~/.bashrc.



                                        To be more precise, I first executed



                                        $ xhost



                                        to see which users had access to the X server. I saw that the format was SI:localuser:dominic where dominic is my login name. So, I used the same format SI:localuser:root to add the root user.






                                        share|improve this answer














                                        I had the same issue with Ubuntu 17.10. It could be that my system was not properly configured. Anyway, in my case, I added



                                        xhost + SI:localuser:root > /dev/null



                                        at the bottom of my ~/.bashrc file and it worked. I don't know if this is a security risk. I share that in case someone else is in the same situation and trust that adding root to the list of previleged X server users should be OK.



                                        It is suggested here http://ubuntuhandbook.org/index.php/2017/10/ubuntu-17-10-tip-graphical-apps-doesnt-launch-via-root-sudo-gksu/



                                        You can test it directly on the terminal first:



                                        $ xhost + SI:localuser:root
                                        $ xhost -



                                        The second line makes sure that only those in the list have access to the X server. Then try "Edit as administrator", after right clicking on a file or directlty execute



                                        $ pkexec gedit



                                        If this does not work, then it is pointless to make the command permanent in ~/.bashrc.



                                        To be more precise, I first executed



                                        $ xhost



                                        to see which users had access to the X server. I saw that the format was SI:localuser:dominic where dominic is my login name. So, I used the same format SI:localuser:root to add the root user.







                                        share|improve this answer














                                        share|improve this answer



                                        share|improve this answer








                                        edited Apr 4 at 17:56

























                                        answered Apr 4 at 17:28









                                        Dominic108

                                        1,11955




                                        1,11955






















                                            up vote
                                            0
                                            down vote













                                            Here's a variant of @GeorgeLitos's answer, with these changes:




                                            • Don't directly modify /etc/lightdm/lightdm.conf, as this is a system-owned file that may be overwritten by system upgrades. Instead, use the extension directory /etc/lightdm/lightdm.conf.d/. This also means that other settings don't need to be duplicated in there.

                                            • No need for a separate shell script; the command can be directly placed into the configuration file.


                                            Just create a file (as user root) /etc/lightdm/lightdm.conf.d/xhost.conf with these contents:



                                            [SeatDefaults]
                                            display-setup-script=xhost +


                                            This works on Ubuntu 16.04.5 LTS.






                                            share|improve this answer

























                                              up vote
                                              0
                                              down vote













                                              Here's a variant of @GeorgeLitos's answer, with these changes:




                                              • Don't directly modify /etc/lightdm/lightdm.conf, as this is a system-owned file that may be overwritten by system upgrades. Instead, use the extension directory /etc/lightdm/lightdm.conf.d/. This also means that other settings don't need to be duplicated in there.

                                              • No need for a separate shell script; the command can be directly placed into the configuration file.


                                              Just create a file (as user root) /etc/lightdm/lightdm.conf.d/xhost.conf with these contents:



                                              [SeatDefaults]
                                              display-setup-script=xhost +


                                              This works on Ubuntu 16.04.5 LTS.






                                              share|improve this answer























                                                up vote
                                                0
                                                down vote










                                                up vote
                                                0
                                                down vote









                                                Here's a variant of @GeorgeLitos's answer, with these changes:




                                                • Don't directly modify /etc/lightdm/lightdm.conf, as this is a system-owned file that may be overwritten by system upgrades. Instead, use the extension directory /etc/lightdm/lightdm.conf.d/. This also means that other settings don't need to be duplicated in there.

                                                • No need for a separate shell script; the command can be directly placed into the configuration file.


                                                Just create a file (as user root) /etc/lightdm/lightdm.conf.d/xhost.conf with these contents:



                                                [SeatDefaults]
                                                display-setup-script=xhost +


                                                This works on Ubuntu 16.04.5 LTS.






                                                share|improve this answer












                                                Here's a variant of @GeorgeLitos's answer, with these changes:




                                                • Don't directly modify /etc/lightdm/lightdm.conf, as this is a system-owned file that may be overwritten by system upgrades. Instead, use the extension directory /etc/lightdm/lightdm.conf.d/. This also means that other settings don't need to be duplicated in there.

                                                • No need for a separate shell script; the command can be directly placed into the configuration file.


                                                Just create a file (as user root) /etc/lightdm/lightdm.conf.d/xhost.conf with these contents:



                                                [SeatDefaults]
                                                display-setup-script=xhost +


                                                This works on Ubuntu 16.04.5 LTS.







                                                share|improve this answer












                                                share|improve this answer



                                                share|improve this answer










                                                answered Dec 1 at 21:12









                                                Ingo Karkat

                                                319617




                                                319617






















                                                    up vote
                                                    -1
                                                    down vote













                                                    Edit the file /etc/rc.local (with sudo) and add the command before the last command (exit 0).






                                                    share|improve this answer



















                                                    • 1




                                                      This wont work(and I tried never the less and it doesnt work). Because that script will not have access rights to change that setting at first place. It has to be done as lightdm user?
                                                      – yurtesen
                                                      Mar 26 '12 at 9:24

















                                                    up vote
                                                    -1
                                                    down vote













                                                    Edit the file /etc/rc.local (with sudo) and add the command before the last command (exit 0).






                                                    share|improve this answer



















                                                    • 1




                                                      This wont work(and I tried never the less and it doesnt work). Because that script will not have access rights to change that setting at first place. It has to be done as lightdm user?
                                                      – yurtesen
                                                      Mar 26 '12 at 9:24















                                                    up vote
                                                    -1
                                                    down vote










                                                    up vote
                                                    -1
                                                    down vote









                                                    Edit the file /etc/rc.local (with sudo) and add the command before the last command (exit 0).






                                                    share|improve this answer














                                                    Edit the file /etc/rc.local (with sudo) and add the command before the last command (exit 0).







                                                    share|improve this answer














                                                    share|improve this answer



                                                    share|improve this answer








                                                    edited Jul 7 '12 at 15:17









                                                    Eliah Kagan

                                                    81.1k20227364




                                                    81.1k20227364










                                                    answered Mar 24 '12 at 18:45









                                                    yossile

                                                    4,36122440




                                                    4,36122440








                                                    • 1




                                                      This wont work(and I tried never the less and it doesnt work). Because that script will not have access rights to change that setting at first place. It has to be done as lightdm user?
                                                      – yurtesen
                                                      Mar 26 '12 at 9:24
















                                                    • 1




                                                      This wont work(and I tried never the less and it doesnt work). Because that script will not have access rights to change that setting at first place. It has to be done as lightdm user?
                                                      – yurtesen
                                                      Mar 26 '12 at 9:24










                                                    1




                                                    1




                                                    This wont work(and I tried never the less and it doesnt work). Because that script will not have access rights to change that setting at first place. It has to be done as lightdm user?
                                                    – yurtesen
                                                    Mar 26 '12 at 9:24






                                                    This wont work(and I tried never the less and it doesnt work). Because that script will not have access rights to change that setting at first place. It has to be done as lightdm user?
                                                    – yurtesen
                                                    Mar 26 '12 at 9:24












                                                    up vote
                                                    -1
                                                    down vote













                                                    Add the following line to /etc/xdg/lxsession/LXDE/autostart



                                                    xhost +local:





                                                    share|improve this answer

























                                                      up vote
                                                      -1
                                                      down vote













                                                      Add the following line to /etc/xdg/lxsession/LXDE/autostart



                                                      xhost +local:





                                                      share|improve this answer























                                                        up vote
                                                        -1
                                                        down vote










                                                        up vote
                                                        -1
                                                        down vote









                                                        Add the following line to /etc/xdg/lxsession/LXDE/autostart



                                                        xhost +local:





                                                        share|improve this answer












                                                        Add the following line to /etc/xdg/lxsession/LXDE/autostart



                                                        xhost +local:






                                                        share|improve this answer












                                                        share|improve this answer



                                                        share|improve this answer










                                                        answered Apr 11 '14 at 12:37









                                                        8dost

                                                        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.





                                                            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                                                            Please pay close attention to the following guidance:


                                                            • 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%2f115675%2fxhost-setting-at-boot%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

                                                            Ellipse (mathématiques)

                                                            Quarter-circle Tiles

                                                            Mont Emei