Change default systemd user target

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











up vote
0
down vote

favorite












I'd like to change the default target launched by systemd --user.



From ArchLinux wiki:




When systemd user instance starts, it brings up the target default.target




From man 7 systemd.special:




When systemd runs as a user instance, the following special units are available, which have similar definitions as their system counterparts: exit.target, default.target, shutdown.target, sockets.target, timers.target, paths.target, bluetooth.target, printer.target, smartcard.target, sound.target.




To change the system-wide default target, you can run systemctl set-default name. To change the default user target, you call systemctl --user set-default name.



The problem is, on what target should my custom target depend so that no other user-defined targets are broken? Obviously, depending on default.target doesn't help :)







share|improve this question
























    up vote
    0
    down vote

    favorite












    I'd like to change the default target launched by systemd --user.



    From ArchLinux wiki:




    When systemd user instance starts, it brings up the target default.target




    From man 7 systemd.special:




    When systemd runs as a user instance, the following special units are available, which have similar definitions as their system counterparts: exit.target, default.target, shutdown.target, sockets.target, timers.target, paths.target, bluetooth.target, printer.target, smartcard.target, sound.target.




    To change the system-wide default target, you can run systemctl set-default name. To change the default user target, you call systemctl --user set-default name.



    The problem is, on what target should my custom target depend so that no other user-defined targets are broken? Obviously, depending on default.target doesn't help :)







    share|improve this question






















      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I'd like to change the default target launched by systemd --user.



      From ArchLinux wiki:




      When systemd user instance starts, it brings up the target default.target




      From man 7 systemd.special:




      When systemd runs as a user instance, the following special units are available, which have similar definitions as their system counterparts: exit.target, default.target, shutdown.target, sockets.target, timers.target, paths.target, bluetooth.target, printer.target, smartcard.target, sound.target.




      To change the system-wide default target, you can run systemctl set-default name. To change the default user target, you call systemctl --user set-default name.



      The problem is, on what target should my custom target depend so that no other user-defined targets are broken? Obviously, depending on default.target doesn't help :)







      share|improve this question












      I'd like to change the default target launched by systemd --user.



      From ArchLinux wiki:




      When systemd user instance starts, it brings up the target default.target




      From man 7 systemd.special:




      When systemd runs as a user instance, the following special units are available, which have similar definitions as their system counterparts: exit.target, default.target, shutdown.target, sockets.target, timers.target, paths.target, bluetooth.target, printer.target, smartcard.target, sound.target.




      To change the system-wide default target, you can run systemctl set-default name. To change the default user target, you call systemctl --user set-default name.



      The problem is, on what target should my custom target depend so that no other user-defined targets are broken? Obviously, depending on default.target doesn't help :)









      share|improve this question











      share|improve this question




      share|improve this question










      asked Dec 25 '17 at 18:19









      Martin Pecka

      18511




      18511




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          $ cat /usr/lib/systemd/user/default.target
          # ...
          [Unit]
          Description=Default
          Documentation=man:systemd.special(7)
          Requires=basic.target
          After=basic.target
          AllowIsolate=yes


          So it seems depending on the basic.target should work. I did it and everything seems to work as it should. However, if you have any more insights, please, share them here :)






          share|improve this answer




















            Your Answer







            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "106"
            ;
            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: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            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%2funix.stackexchange.com%2fquestions%2f412999%2fchange-default-systemd-user-target%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            0
            down vote













            $ cat /usr/lib/systemd/user/default.target
            # ...
            [Unit]
            Description=Default
            Documentation=man:systemd.special(7)
            Requires=basic.target
            After=basic.target
            AllowIsolate=yes


            So it seems depending on the basic.target should work. I did it and everything seems to work as it should. However, if you have any more insights, please, share them here :)






            share|improve this answer
























              up vote
              0
              down vote













              $ cat /usr/lib/systemd/user/default.target
              # ...
              [Unit]
              Description=Default
              Documentation=man:systemd.special(7)
              Requires=basic.target
              After=basic.target
              AllowIsolate=yes


              So it seems depending on the basic.target should work. I did it and everything seems to work as it should. However, if you have any more insights, please, share them here :)






              share|improve this answer






















                up vote
                0
                down vote










                up vote
                0
                down vote









                $ cat /usr/lib/systemd/user/default.target
                # ...
                [Unit]
                Description=Default
                Documentation=man:systemd.special(7)
                Requires=basic.target
                After=basic.target
                AllowIsolate=yes


                So it seems depending on the basic.target should work. I did it and everything seems to work as it should. However, if you have any more insights, please, share them here :)






                share|improve this answer












                $ cat /usr/lib/systemd/user/default.target
                # ...
                [Unit]
                Description=Default
                Documentation=man:systemd.special(7)
                Requires=basic.target
                After=basic.target
                AllowIsolate=yes


                So it seems depending on the basic.target should work. I did it and everything seems to work as it should. However, if you have any more insights, please, share them here :)







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Dec 25 '17 at 18:19









                Martin Pecka

                18511




                18511






















                     

                    draft saved


                    draft discarded


























                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f412999%2fchange-default-systemd-user-target%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    Peggy Mitchell

                    Palaiologos

                    The Forum (Inglewood, California)