:: Re: [DNG] Firefox, sudo and apulse …
Página Principal
Delete this message
Reply to this message
Autor: g4sra
Data:  
Para: dng@lists.dyne.org
Assunto: Re: [DNG] Firefox, sudo and apulse (was Re: Steam, Mumble, Valheim, Alsa and shared audio)
On Tuesday, August 31st, 2021 at 7:41 PM, hal <vmlinux@???> wrote:
> On 8/31/21 11:02, g4sra via Dng wrote
> <snip,snip,snip>
>


> > > ctl.!default {
> > >


> > > type hw
> > >


> > > card 0
> > >


> > > }
> > >


> > > Check to make sure you do not have a ~/.asoundrc overriding /etc/asound.conf
>


> Good thought, and have checked this. Especially relevant with the multi-user situation. I will check on the other enlightening ALSA suggestions you have made.
>


> <snip>
>


> > get user_one's cookie:
> > user_one# xauth -n list localhost/unix:0
> > localhost/unix:0 MIT-MAGIC-COOKIE-1 83c12a394ac0c5afe1fee0a973b9e49g
> >


> > then give the cookie to user_two:
> > user_two# xauth add localhost/unix:0 MIT-MAGIC-COOKIE-1 83c12a394ac0c5afe1fee0a973b9e49g
> >


> > now 'user_two' can access the GUI (you may need to set DISPLAY):
> > user_two# DISPLAY=:0 /usr/bin/apulse /home/apps/firefox/firefox -ProfileManager
>


> Thank you for this! I have always used 'xhost +' and drop TCP 6000 (eth0) on the host firewall (on my "single-user" workstation anyway). I've tried to find more secure ways to share the X cookie but for one reason or another, they never worked out. I will try this!


To work remotely you use the FQDN appended with the DISPLAY number (as opposed to localhost/unix:0) to get the TCP connection cookie.
user_one# xauth -n list host.example.com:0
10.0.0.1 MIT-MAGIC-COOKIE-1 92b21b394ac0c5afe1fee0a973b9e49g

This will only work if Xorg is listening for non-local TCP connections though, which is NOT the default.
I almost always use XForward'ing over ssh.