Sound doesn't work properly in root but does in normal user

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











up vote
-1
down vote

favorite












I'm using debian 9 with gnome.

When i use the root the volume control doesn' t work and doesn' t have the megaphone symbol (that is also missing in the gnome panel). I can move the bar but doesn` t affect the volume.



enter image description here



In Settings/Sound there aren' t any output/input devices.

There aren't any system sounds like when you keep deleting in the terminal or when you using fn + the volume controls that aren' t working.

Fn keys are working for the others functions but not for the audio.

Except for the system sounds the audio is working and i can set the volume using alsa-mixer (that isn' t practical).



If i use a normal user everything is fine: the volume control (in the gnome panel) works and has the megaphone symbol, system sounds are working, fn keys for the audio are working and in Settings/Sound there are the output/input devices.



How can i have fix the audio for the root?



Don' t tell me that is dangerous and why i want log in as root.

I really wish to do so.

From the comments i can see that dirkt states:




Pulseaudio by default only works with a logged-in user, by design




Any idea to how fix pulseaudio?










share|improve this question



















  • 4




    Why are you using desktop/audio as root?
    – sebasth
    yesterday






  • 2




    Pulseaudio by default only works with a logged-in user, by design. Don't use a desktop as root, it's bad practice. Use sudo as normal user for system administration.
    – dirkt
    yesterday










  • @dirkt i want to use root, there is a solution for pulseaudio?
    – Scorpion
    yesterday










  • The part about how user aliases/renames root is not relevant. The duplicate similarly asks about audio not working for root desktop. For allowing regular users access /root you can post another question.
    – sebasth
    yesterday














up vote
-1
down vote

favorite












I'm using debian 9 with gnome.

When i use the root the volume control doesn' t work and doesn' t have the megaphone symbol (that is also missing in the gnome panel). I can move the bar but doesn` t affect the volume.



enter image description here



In Settings/Sound there aren' t any output/input devices.

There aren't any system sounds like when you keep deleting in the terminal or when you using fn + the volume controls that aren' t working.

Fn keys are working for the others functions but not for the audio.

Except for the system sounds the audio is working and i can set the volume using alsa-mixer (that isn' t practical).



If i use a normal user everything is fine: the volume control (in the gnome panel) works and has the megaphone symbol, system sounds are working, fn keys for the audio are working and in Settings/Sound there are the output/input devices.



How can i have fix the audio for the root?



Don' t tell me that is dangerous and why i want log in as root.

I really wish to do so.

From the comments i can see that dirkt states:




Pulseaudio by default only works with a logged-in user, by design




Any idea to how fix pulseaudio?










share|improve this question



















  • 4




    Why are you using desktop/audio as root?
    – sebasth
    yesterday






  • 2




    Pulseaudio by default only works with a logged-in user, by design. Don't use a desktop as root, it's bad practice. Use sudo as normal user for system administration.
    – dirkt
    yesterday










  • @dirkt i want to use root, there is a solution for pulseaudio?
    – Scorpion
    yesterday










  • The part about how user aliases/renames root is not relevant. The duplicate similarly asks about audio not working for root desktop. For allowing regular users access /root you can post another question.
    – sebasth
    yesterday












up vote
-1
down vote

favorite









up vote
-1
down vote

favorite











I'm using debian 9 with gnome.

When i use the root the volume control doesn' t work and doesn' t have the megaphone symbol (that is also missing in the gnome panel). I can move the bar but doesn` t affect the volume.



enter image description here



In Settings/Sound there aren' t any output/input devices.

There aren't any system sounds like when you keep deleting in the terminal or when you using fn + the volume controls that aren' t working.

Fn keys are working for the others functions but not for the audio.

Except for the system sounds the audio is working and i can set the volume using alsa-mixer (that isn' t practical).



If i use a normal user everything is fine: the volume control (in the gnome panel) works and has the megaphone symbol, system sounds are working, fn keys for the audio are working and in Settings/Sound there are the output/input devices.



How can i have fix the audio for the root?



Don' t tell me that is dangerous and why i want log in as root.

I really wish to do so.

From the comments i can see that dirkt states:




Pulseaudio by default only works with a logged-in user, by design




Any idea to how fix pulseaudio?










share|improve this question















I'm using debian 9 with gnome.

When i use the root the volume control doesn' t work and doesn' t have the megaphone symbol (that is also missing in the gnome panel). I can move the bar but doesn` t affect the volume.



enter image description here



In Settings/Sound there aren' t any output/input devices.

There aren't any system sounds like when you keep deleting in the terminal or when you using fn + the volume controls that aren' t working.

Fn keys are working for the others functions but not for the audio.

Except for the system sounds the audio is working and i can set the volume using alsa-mixer (that isn' t practical).



If i use a normal user everything is fine: the volume control (in the gnome panel) works and has the megaphone symbol, system sounds are working, fn keys for the audio are working and in Settings/Sound there are the output/input devices.



How can i have fix the audio for the root?



Don' t tell me that is dangerous and why i want log in as root.

I really wish to do so.

From the comments i can see that dirkt states:




Pulseaudio by default only works with a logged-in user, by design




Any idea to how fix pulseaudio?







debian audio root






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited yesterday

























asked yesterday









Scorpion

665




665







  • 4




    Why are you using desktop/audio as root?
    – sebasth
    yesterday






  • 2




    Pulseaudio by default only works with a logged-in user, by design. Don't use a desktop as root, it's bad practice. Use sudo as normal user for system administration.
    – dirkt
    yesterday










  • @dirkt i want to use root, there is a solution for pulseaudio?
    – Scorpion
    yesterday










  • The part about how user aliases/renames root is not relevant. The duplicate similarly asks about audio not working for root desktop. For allowing regular users access /root you can post another question.
    – sebasth
    yesterday












  • 4




    Why are you using desktop/audio as root?
    – sebasth
    yesterday






  • 2




    Pulseaudio by default only works with a logged-in user, by design. Don't use a desktop as root, it's bad practice. Use sudo as normal user for system administration.
    – dirkt
    yesterday










  • @dirkt i want to use root, there is a solution for pulseaudio?
    – Scorpion
    yesterday










  • The part about how user aliases/renames root is not relevant. The duplicate similarly asks about audio not working for root desktop. For allowing regular users access /root you can post another question.
    – sebasth
    yesterday







4




4




Why are you using desktop/audio as root?
– sebasth
yesterday




Why are you using desktop/audio as root?
– sebasth
yesterday




2




2




Pulseaudio by default only works with a logged-in user, by design. Don't use a desktop as root, it's bad practice. Use sudo as normal user for system administration.
– dirkt
yesterday




Pulseaudio by default only works with a logged-in user, by design. Don't use a desktop as root, it's bad practice. Use sudo as normal user for system administration.
– dirkt
yesterday












@dirkt i want to use root, there is a solution for pulseaudio?
– Scorpion
yesterday




@dirkt i want to use root, there is a solution for pulseaudio?
– Scorpion
yesterday












The part about how user aliases/renames root is not relevant. The duplicate similarly asks about audio not working for root desktop. For allowing regular users access /root you can post another question.
– sebasth
yesterday




The part about how user aliases/renames root is not relevant. The duplicate similarly asks about audio not working for root desktop. For allowing regular users access /root you can post another question.
– sebasth
yesterday










1 Answer
1






active

oldest

votes

















up vote
1
down vote













Too bad that you didn' t know that all those problems are caused by pulseaudio.

If you run in a terminal pulseaudio you will see something like this:



W: [pulseaudio] main.c: This program is not intended to be run as root (unless --system is specified).


If you run pulseaudio --system won' t work (at least on my system), i don' t know if there is any proper solution.

But there is a very simple and perfect workaround use only pulseaudio:



  1. Copy this folder /home/normal-user/.config/pulse into your home
    (/root/.config) from another "normal" user.


  2. In /root/.config/autostart (if the folder doesn't exist create it)
    make a file with this content:



    [Desktop Entry]
    Type=Application
    Terminal=false
    Exec=pulseaudio
    Name=pulseaudio
    Comment=gnome volume/audio controls



  3. And name it pulseaudio.desktop (the important thing is the
    .desktop).
    Double click and you are ok (trust and launch).



    Now every time that you log in (as root) your sound will be fine.







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%2f473769%2fsound-doesnt-work-properly-in-root-but-does-in-normal-user%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
    1
    down vote













    Too bad that you didn' t know that all those problems are caused by pulseaudio.

    If you run in a terminal pulseaudio you will see something like this:



    W: [pulseaudio] main.c: This program is not intended to be run as root (unless --system is specified).


    If you run pulseaudio --system won' t work (at least on my system), i don' t know if there is any proper solution.

    But there is a very simple and perfect workaround use only pulseaudio:



    1. Copy this folder /home/normal-user/.config/pulse into your home
      (/root/.config) from another "normal" user.


    2. In /root/.config/autostart (if the folder doesn't exist create it)
      make a file with this content:



      [Desktop Entry]
      Type=Application
      Terminal=false
      Exec=pulseaudio
      Name=pulseaudio
      Comment=gnome volume/audio controls



    3. And name it pulseaudio.desktop (the important thing is the
      .desktop).
      Double click and you are ok (trust and launch).



      Now every time that you log in (as root) your sound will be fine.







    share|improve this answer


























      up vote
      1
      down vote













      Too bad that you didn' t know that all those problems are caused by pulseaudio.

      If you run in a terminal pulseaudio you will see something like this:



      W: [pulseaudio] main.c: This program is not intended to be run as root (unless --system is specified).


      If you run pulseaudio --system won' t work (at least on my system), i don' t know if there is any proper solution.

      But there is a very simple and perfect workaround use only pulseaudio:



      1. Copy this folder /home/normal-user/.config/pulse into your home
        (/root/.config) from another "normal" user.


      2. In /root/.config/autostart (if the folder doesn't exist create it)
        make a file with this content:



        [Desktop Entry]
        Type=Application
        Terminal=false
        Exec=pulseaudio
        Name=pulseaudio
        Comment=gnome volume/audio controls



      3. And name it pulseaudio.desktop (the important thing is the
        .desktop).
        Double click and you are ok (trust and launch).



        Now every time that you log in (as root) your sound will be fine.







      share|improve this answer
























        up vote
        1
        down vote










        up vote
        1
        down vote









        Too bad that you didn' t know that all those problems are caused by pulseaudio.

        If you run in a terminal pulseaudio you will see something like this:



        W: [pulseaudio] main.c: This program is not intended to be run as root (unless --system is specified).


        If you run pulseaudio --system won' t work (at least on my system), i don' t know if there is any proper solution.

        But there is a very simple and perfect workaround use only pulseaudio:



        1. Copy this folder /home/normal-user/.config/pulse into your home
          (/root/.config) from another "normal" user.


        2. In /root/.config/autostart (if the folder doesn't exist create it)
          make a file with this content:



          [Desktop Entry]
          Type=Application
          Terminal=false
          Exec=pulseaudio
          Name=pulseaudio
          Comment=gnome volume/audio controls



        3. And name it pulseaudio.desktop (the important thing is the
          .desktop).
          Double click and you are ok (trust and launch).



          Now every time that you log in (as root) your sound will be fine.







        share|improve this answer














        Too bad that you didn' t know that all those problems are caused by pulseaudio.

        If you run in a terminal pulseaudio you will see something like this:



        W: [pulseaudio] main.c: This program is not intended to be run as root (unless --system is specified).


        If you run pulseaudio --system won' t work (at least on my system), i don' t know if there is any proper solution.

        But there is a very simple and perfect workaround use only pulseaudio:



        1. Copy this folder /home/normal-user/.config/pulse into your home
          (/root/.config) from another "normal" user.


        2. In /root/.config/autostart (if the folder doesn't exist create it)
          make a file with this content:



          [Desktop Entry]
          Type=Application
          Terminal=false
          Exec=pulseaudio
          Name=pulseaudio
          Comment=gnome volume/audio controls



        3. And name it pulseaudio.desktop (the important thing is the
          .desktop).
          Double click and you are ok (trust and launch).



          Now every time that you log in (as root) your sound will be fine.








        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited yesterday

























        answered yesterday









        Scorpion

        665




        665



























             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f473769%2fsound-doesnt-work-properly-in-root-but-does-in-normal-user%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Displaying single band from multi-band raster using QGIS

            How many registers does an x86_64 CPU actually have?