Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Pulseaudio creates .config in /
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
nictki
n00b
n00b


Joined: 10 Jan 2007
Posts: 63
Location: somewhere else...

PostPosted: Thu Oct 22, 2015 11:33 am    Post subject: [SOLVED] Pulseaudio creates .config in / Reply with quote

Hello everybody

Does anybody know why pulseaudio creates this directory in main filesystem tree ?
Code:
/.config/pulse/65c224b3646e8d986a1e1630554a48d1-runtime

which is symlink to
Code:
lrwxrwxrwx 1 root root 23 Oct 22 13:22 /.config/pulse/65c224b3646e8d986a1e1630554a48d1-runtime -> /tmp/pulse-2L9K88eMlGn7/


P.S.
Code:
media-sound/pulseaudio-7.0-r1

compiled with following flags:
Code:
X alsa alsa-plugin asyncns bluetooth caps dbus gdbm glib gtk ipv6 native-headset orc sox ssl tcpd udev webrtc-aec zeroconf -doc -equalizer -gnome -jack -libressl -libsamplerate -lirc -neon -ofono-headset -oss -qt4 -realtime -selinux -system-wide -systemd -test -xen

thx
_________________
github


Last edited by nictki on Thu Dec 03, 2015 12:29 am; edited 8 times in total
Back to top
View user's profile Send private message
kikko
Apprentice
Apprentice


Joined: 29 Apr 2014
Posts: 276
Location: Milan, IT

PostPosted: Thu Oct 22, 2015 9:39 pm    Post subject: Reply with quote

Hi nictki
do you have any user with $HOME set to / ?
Otherwise there is no reason for creating such a thing... That symlink is in the .config directory under a user's home:
Code:
 ~ $ ls -l .config/pulse/
totale 36
-rw-r--r-- 1 kikko kikko 5120 12 ott 20.22 6c75d30f50e8017209f7810855f215ab-card-database.x86_64-pc-linux-gnu.gdbm
-rw-r--r-- 1 kikko kikko   43 22 ott 21.05 6c75d30f50e8017209f7810855f215ab-default-sink
-rw-r--r-- 1 kikko kikko   42 22 ott 21.05 6c75d30f50e8017209f7810855f215ab-default-source
-rw-r--r-- 1 kikko kikko 4096 28 set 22.43 6c75d30f50e8017209f7810855f215ab-device-manager.x86_64-pc-linux-gnu.gdbm
-rw-r--r-- 1 kikko kikko 5120 21 ott 21.47 6c75d30f50e8017209f7810855f215ab-device-volumes.x86_64-pc-linux-gnu.gdbm
lrwxrwxrwx 1 kikko kikko   23 22 ott 21.05 6c75d30f50e8017209f7810855f215ab-runtime -> /tmp/pulse-PKdhtXMmr18n
-rw-r--r-- 1 kikko kikko 4096 11 ott 16.09 6c75d30f50e8017209f7810855f215ab-stream-volumes.x86_64-pc-linux-gnu.gdbm
-rw------- 1 kikko kikko  256 12 set 20.28 cookie


Regards
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Thu Oct 22, 2015 10:36 pm    Post subject: Reply with quote

kikko wrote:
do you have any user with $HOME set to / ? Otherwise there is no reason for creating such a thing...

kikko ... no matter, only root can write to / ... and in the above the ownership is 'root root', so whatever wrote it was running as root.

best ... khay
Back to top
View user's profile Send private message
kikko
Apprentice
Apprentice


Joined: 29 Apr 2014
Posts: 276
Location: Milan, IT

PostPosted: Fri Oct 23, 2015 6:14 am    Post subject: Reply with quote

khayyam wrote:
only root can write to /

This makes sense, of course; but if it was running as root it has failed to initialize root's $HOME, since it should be /root
Furthermore, in the /root dir, there is only the symlink set
Code:
~ # ls -l /root/.config/pulse/
totale 0
lrwxrwxrwx 1 root root 23  5 ott 14.46 6c75d30f50e8017209f7810855f215ab-runtime -> /tmp/pulse-PKdhtXMmr18n
~ #
Maybe there is something wrong in this sense

Regards
Back to top
View user's profile Send private message
nictki
n00b
n00b


Joined: 10 Jan 2007
Posts: 63
Location: somewhere else...

PostPosted: Fri Oct 23, 2015 8:05 am    Post subject: Reply with quote

Thx for responses !

kikko wrote:
do you have any user with $HOME set to / ? Otherwise there is no reason for creating such a thing...

No I don't.

khayyam wrote:

kikko ... no matter, only root can write to / ... and in the above the ownership is 'root root', so whatever wrote it was running as root.

Correct,

I think I found reason,
in my acpi script, which is launched as a root, I have few commands to play sounds,
after adding
Code:
su $USER -c <play sound command>
before command, pulseaudio config directory is not created any more
_________________
github


Last edited by nictki on Fri Oct 23, 2015 8:19 am; edited 1 time in total
Back to top
View user's profile Send private message
nictki
n00b
n00b


Joined: 10 Jan 2007
Posts: 63
Location: somewhere else...

PostPosted: Fri Oct 23, 2015 8:08 am    Post subject: Reply with quote

kikko wrote:

This makes sense, of course; but if it was running as root it has failed to initialize root's $HOME, since it should be /root
Furthermore, in the /root dir, there is only the symlink set
Code:
~ # ls -l /root/.config/pulse/
totale 0
lrwxrwxrwx 1 root root 23  5 ott 14.46 6c75d30f50e8017209f7810855f215ab-runtime -> /tmp/pulse-PKdhtXMmr18n
~ #
Maybe there is something wrong in this sense

Regards


Exactly,
shouldn't be created config file in this case in root dir ?
_________________
github
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Fri Oct 23, 2015 10:35 am    Post subject: Reply with quote

kikko wrote:
khayyam wrote:
only root can write to /

This makes sense, of course; but if it was running as root it has failed to initialize root's $HOME, since it should be /root

kikko ... no, because that value is only assigned when executing a login (and so querying /etc/passwd), or, as is the case with cron, if the variable is assigned in its config, or when initialised. So, though a daemon may be running as root, it doesn't acquire roots login env.

kikko wrote:
Furthermore, in the /root dir, there is only the symlink set

I can see absolutely no reason why root should have, or need, a soundserver ... the fact that its created is most likely the result of running processes as root which should never be run as root.

best ... khay
Back to top
View user's profile Send private message
nictki
n00b
n00b


Joined: 10 Jan 2007
Posts: 63
Location: somewhere else...

PostPosted: Fri Oct 23, 2015 2:32 pm    Post subject: Reply with quote

Quote:
I can see absolutely no reason why root should have, or need, a soundserver ... the fact that its created is most likely the result of running processes as root which should never be run as root.

Yes, but how can figure out what process causing that?

thx
_________________
github
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Fri Oct 23, 2015 3:38 pm    Post subject: Reply with quote

nictki wrote:
Quote:
I can see absolutely no reason why root should have, or need, a soundserver ... the fact that its created is most likely the result of running processes as root which should never be run as root.

Yes, but how can figure out what process causing that?

nictki ... sorry, I thought you had, so it wasn't the above entry in your "acpi script"? I wasn't expecting it would because '$USER' will translate to the user executing it, so, again, root (as acpid runs as root).

Anyhow, "how to figure out what process is causing [it]", hehe, forgive me for laughing but that is somewhat ironic, these things "improving the user experience" are designed so that the user isn't supposed to have any inkling as to *how* it works, it just does (or so the claim goes), so when it starts dumping its config files into / you either have to ask yourself what you *might* have done to cause this (ie, the entry in your "acpid script", or what-have-you) or how/why/when pulseaudio (or some part of the DE that calls it) is executed as root. I can't really answer either of those questions as I don't know what you've done, or care to know how pulseaudio "just works".

best ... khay
Back to top
View user's profile Send private message
kikko
Apprentice
Apprentice


Joined: 29 Apr 2014
Posts: 276
Location: Milan, IT

PostPosted: Fri Oct 23, 2015 5:08 pm    Post subject: Reply with quote

khayyam wrote:
I can see absolutely no reason why root should have, or need, a soundserver ... the fact that its created is most likely the result of running processes as root which should never be run as root.
Me too btw, thus how do you explain why I have that symlink in my environment?
nictki wrote:
Code:
su $USER -c <play sound command>
This is exactly the kind of command which does not sets a $HOME variable... why use $USER btw??? it's the same user running that command! 8O
Code:
seireitei ~ # su kikko -c 'echo $USER'
kikko
seireitei ~ # su $USER -c 'echo $USER'
root

:?
Regards
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Fri Oct 23, 2015 6:31 pm    Post subject: Reply with quote

kikko wrote:
khayyam wrote:
I can see absolutely no reason why root should have, or need, a soundserver ... the fact that its created is most likely the result of running processes as root which should never be run as root.

Me too btw, thus how do you explain why I have that symlink in my environment?

kikko ... I can only guess ... perhaps that by starting the login manager pulseaudio is activated with the expectation that a 'bell', or 'chime', is played on some event, but as the login manager is run as root (again, I speculate as I don't run one) the config is created.

best ... khay
Back to top
View user's profile Send private message
nictki
n00b
n00b


Joined: 10 Jan 2007
Posts: 63
Location: somewhere else...

PostPosted: Mon Oct 26, 2015 1:20 am    Post subject: Reply with quote

Thx

Tried some ways... from removing services from levels, 'clearing' configs, till exporting funny things like
Code:
XDG_RUNTIME_DIR

to get figured out WTF is going on with PA...

Well, I think, that PA is kind of magic for it self, I don't get it... Really :?

I've installed (only to test) Debian 7.9 (PA-6, no systemd) on my old laptop, no funny configs etc, really "stock"
Code:
drwxr-xr-x   2 root root  4096 Oct 22 12:38 bin
drwxr-xr-x   4 root root  1024 Oct 22 17:54 boot
drwxr-xr-x  14 root root  3380 Oct 26 01:50 dev
drwxr-xr-x 131 root root 12288 Oct 26 01:38 etc
drwxr-xr-x   4 root root  4096 Oct 22 12:48 home
lrwxrwxrwx   1 root root    28 Oct 22 12:07 initrd.img -> /boot/initrd.img-3.2.0-4-486
drwxr-xr-x  16 root root  4096 Oct 22 12:41 lib
drwx------   2 root root 16384 Oct 22 12:03 lost+found
drwxr-xr-x   4 root root  4096 Oct 22 12:03 media
drwxr-xr-x   2 root root  4096 Aug 30 23:44 mnt
drwxr-xr-x   2 root root  4096 Oct 22 12:03 opt
dr-xr-xr-x 114 root root     0 Oct 26 01:49 proc
drwx------  20 root root  4096 Oct 26 01:52 root
drwxr-xr-x  19 root root   780 Oct 26 01:49 run
drwxr-xr-x   2 root root  4096 Oct 22 13:09 sbin
drwxr-xr-x   2 root root  4096 Jun 10  2012 selinux
drwxr-xr-x   2 root root  4096 Oct 22 12:03 srv
drwxr-xr-x  12 root root     0 Oct 26 01:49 sys
drwxrwxrwt   6 root root  4096 Oct 26 01:52 tmp
drwxr-xr-x  10 root root  4096 Oct 22 12:03 usr
drwxr-xr-x  13 root root  4096 Oct 22 12:44 var
lrwxrwxrwx   1 root root    24 Oct 22 12:07 vmlinuz -> boot/vmlinuz-3.2.0-4-486

Logged as normal user, launched from terminal
Code:
play /foo/bar/someting

and after that
Code:
drwxr-xr-x   2 root root  4096 Oct 22 12:38 bin
drwxr-xr-x   4 root root  1024 Oct 22 17:54 boot
drwxr-xr-x  14 root root  3380 Oct 26 01:50 dev
drwxr-xr-x 131 root root 12288 Oct 26 01:38 etc
drwxr-xr-x   4 root root  4096 Oct 22 12:48 home
lrwxrwxrwx   1 root root    28 Oct 22 12:07 initrd.img -> /boot/initrd.img-3.2.0-4-486
drwxr-xr-x  16 root root  4096 Oct 22 12:41 lib
drwx------   2 root root 16384 Oct 22 12:03 lost+found
drwxr-xr-x   4 root root  4096 Oct 22 12:03 media
drwxr-xr-x   2 root root  4096 Aug 30 23:44 mnt
drwxr-xr-x   2 root root  4096 Oct 22 12:03 opt
dr-xr-xr-x 114 root root     0 Oct 26 01:49 proc
drwx------   2 root root  4096 Oct 26 01:49 .pulse
-rw-------   1 root root   256 Oct 22 12:56 .pulse-cookie
drwx------  20 root root  4096 Oct 26 01:51 root
drwxr-xr-x  19 root root   780 Oct 26 01:49 run
drwxr-xr-x   2 root root  4096 Oct 22 13:09 sbin
drwxr-xr-x   2 root root  4096 Jun 10  2012 selinux
drwxr-xr-x   2 root root  4096 Oct 22 12:03 srv
drwxr-xr-x  12 root root     0 Oct 26 01:49 sys
drwxrwxrwt   6 root root  4096 Oct 26 01:51 tmp
drwxr-xr-x  10 root root  4096 Oct 22 12:03 usr
drwxr-xr-x  13 root root  4096 Oct 22 12:44 var
lrwxrwxrwx   1 root root    24 Oct 22 12:07 vmlinuz -> boot/vmlinuz-3.2.0-4-486


Really funny rabbit howl, really...

...I'm slowly tired with this blackbox*KIT things

best :?
_________________
github
Back to top
View user's profile Send private message
nictki
n00b
n00b


Joined: 10 Jan 2007
Posts: 63
Location: somewhere else...

PostPosted: Tue Oct 27, 2015 8:27 pm    Post subject: Reply with quote

Hi,

I think I've solved it, well
when launching scripts (e.g. like checking if mic is muted on system start, which was my case) before PA is stared as a regular user, that drives PA to crate
Code:
/.config/pulse

(my theory), but anyway, adding simple checking cases, that proofing if PA is running or is installed solved this for me.

Thx everyone for suggestions!

EDIT:

After running:
Code:
fatrace > trace

and doing some things, like hearing music, connecting usb speakers, suspending etc
I found something like this:
Code:
cat trace | grep -e pulse
...
amixer(11390): RO /usr/share/alsa/alsa.conf.d/50-pulseaudio.conf
amixer(11390): C /usr/share/alsa/alsa.conf.d/50-pulseaudio.conf
amixer(11390): O /usr/share/alsa/alsa.conf.d/51-pulseaudio-probe.conf
amixer(11390): R /usr/share/alsa/alsa.conf.d/51-pulseaudio-probe.conf
amixer(11390): C /usr/share/alsa/alsa.conf.d/51-pulseaudio-probe.conf
amixer(11390): RO /usr/lib64/alsa-lib/libasound_module_conf_pulse.so
amixer(11390): RO /usr/lib64/libpulse.so.0.18.2
amixer(11390): RO /usr/lib64/pulseaudio/libpulsecommon-7.1.so
amixer(11390): O /etc/pulse/client.conf
amixer(11390): R /etc/pulse/client.conf
amixer(11390): C /etc/pulse/client.conf
amixer(11390): O /.config/pulse
amixer(11390): C /.config/pulse
...

then I thought that problem is not PA but alsa (alsa-plugins)
and I've reemerged alsa-plugins without pulseaudio flag and PA without alsa-plugin
after that problem with "automagicly" creating .config directory in / is away.

So, I think topic is really SOLVED!!!

Thx
_________________
github
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum