I have Ubuntu 12.04 installed on my PC, recently I have edited /etc/passwd and changed
user1:x:00:00:user1,,,:/home/user1:/bin/bash
to give root permission to user1 and the system always need to login as root, for running some custom software.
Now it seems the sound is not working, the volume icon is disabled. I understand that the pulseaudio demon can't be run as root that's why the audio is not working. How can I resolve it, like set the permission of pulseaudio to run as root.
When I type the command
/usr/bin/pulseaudio --start
Giving me the output
W: [pulseaudio] main.c: This program is not intended to be run as root (unless --system is specified).
E: [autospawn] core-util.c: Home directory /home/user1 not ours.
W: [autospawn] lock-autospawn.c: Cannot access autospawn lock.
E: [pulseaudio] main.c: Failed to acquire autospawn lock
Edit
Solution for problem:
I have fixed the problem by disable root checking for pulseaudio equalizer
sed -i 's/exit 1/#exit1/g' /usr/bin/pulseaudio-equalizer
https://unix.stackexchange.com/questions/473769/sound-doesnt-work-properly-in-root-but-does-in-normal-user – Scorpion Oct 07 '18 at 17:05