0

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?

  • 4
    Why are you using desktop/audio as root? – sebasth Oct 7 '18 at 11:04
  • 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 Oct 7 '18 at 11:22
  • @dirkt i want to use root, there is a solution for pulseaudio? – Scorpion Oct 7 '18 at 12:07
  • 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 Oct 7 '18 at 13:49
1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.