View previous topic :: View next topic |
Author |
Message |
tenspd1370 Tux's lil' helper
Joined: 14 Dec 2017 Posts: 119
|
Posted: Tue Oct 23, 2018 3:50 pm Post subject: [solved]Firefox called with i3 dmenu willnot play pandora |
|
|
So this is interesting, but I can't figure out the difference. When I run firefox from dmenu in i3, it won't play any sound. Pandora just cycles and it claims it can' decode anything. When I run it from a zsh prompt, pandora plays without problems. My guess is it has something to do with pulse audio and consolekit, but I could use some help figuring this out. Any suggestions?
Thanks!
Last edited by tenspd1370 on Wed Oct 24, 2018 3:50 pm; edited 1 time in total |
|
Back to top |
|
|
tenspd1370 Tux's lil' helper
Joined: 14 Dec 2017 Posts: 119
|
Posted: Tue Oct 23, 2018 4:10 pm Post subject: |
|
|
and of course after I try doing some debugging and killing the server, etc - it works through dmenu. I have to get to work now, but if anyone has any suggestions on how to track what is happening, I would be appreciative. |
|
Back to top |
|
|
tenspd1370 Tux's lil' helper
Joined: 14 Dec 2017 Posts: 119
|
Posted: Tue Oct 23, 2018 8:18 pm Post subject: |
|
|
Okay - here is what I figured out. Both of the followiing scenarios start with ensuring all pulseaudio processes are killed (starting fresh)
If I open firefox from dmenu, and play pandora, I can open pavucontrol from dmenu and it works fine. If I try to open pavucontrol from a zsh prompt, it claims it can't connect.
If I open firefox from zsh and pavucontrol from zsh, everything works, put tehn anything run frfom dmenu can't connect to pulseaudio.
So - it looks like it sees dmenu as a different user or something - can anyone point me in the right direction for debugging / figuring out a way around this? In the short term I suppose I can run these apps either from dmenu or zsh, but not both.
Thanks!
Last edited by tenspd1370 on Tue Oct 23, 2018 8:53 pm; edited 1 time in total |
|
Back to top |
|
|
Muso Veteran
Joined: 22 Oct 2002 Posts: 1052 Location: The Holy city of Honolulu
|
Posted: Tue Oct 23, 2018 8:51 pm Post subject: |
|
|
Knowing that I will always have a browser open, I just set my config to launch firefox when i3 starts :
Code: | exec --no-startup-id compton -f
exec_always feh --bg-scale /usr/share/wallpapers/Personal/DARK.jpg
exec firefox |
Firefox is always on my 2nd workspace :
Code: | assign [class="Firefox"] $ws2 |
As for Pulseaudio, I use it in Kali (as Kali is a SystemD distro), but in Gentoo I just use Alsa.
Also, have you tried using rofi instead of dmenu? I prefer it, especially as I keep i3blocks on the top of the screen. _________________ "You can lead a horticulture but you can't make her think" ~ Dorothy Parker
2021 is the year of the Linux Desktop! |
|
Back to top |
|
|
tenspd1370 Tux's lil' helper
Joined: 14 Dec 2017 Posts: 119
|
Posted: Tue Oct 23, 2018 9:16 pm Post subject: |
|
|
Hmm - the thought of ditching pulseaudio all together never really occured to me.... that is something to look into, as I can't stand all the baggage that comes with ConsoleKit, etc. But, I will have to wait until I have some time to figure out how to untangle that from my current setup/
Also, I am not familiar with rolfi.
Just a curiosity - do you know why an app opened from say - dmenu is treated differently than from zsh? I mean, my understanding was that PA sat below all that, and that when I run dmenu or something from zsh, both are run as "me" and have access to all the same environment setup and variables. It just confounds me. |
|
Back to top |
|
|
Muso Veteran
Joined: 22 Oct 2002 Posts: 1052 Location: The Holy city of Honolulu
|
Posted: Tue Oct 23, 2018 9:36 pm Post subject: |
|
|
I really have no idea why it would launch differently.
As for rofi, just emerge it. I find it to be much more elegant than dmenu.
From ~/.config/i3/config
Code: | # start rofi (a program launcher)
bindsym $mod+d exec /root/.config/rofi.sh |
And here's the rofi.sh, just put it in ~/.config/
Code: | #!/bin/sh
bg_color=#2f343f
text_color=#f3f4f5
htext_color=#9575cd
rofi -show run -lines 3 -eh 2 -width 100 -padding 400 -opacity "85" -bw 0 -color-window "$bg_color, $bg_color, $bg_color" -color-normal "$bg_color, $text_color, $bg_color, $bg_color, $htext_color" -font "Hack 16" |
Colors are defined in ~/.config/i3/config
Code: | set $bg-color #2f343f
set $inactive-bg-color #2f343f
set $text-color #f3f4f5
set $inactive-text-color #676E7D
set $urgent-bg-color #E53935
# window colors
# border background text indicator
client.focused $bg-color $bg-color $text-color #00ff00
client.unfocused $inactive-bg-color $inactive-bg-color $inactive-text-color #00ff00
client.focused_inactive $inactive-bg-color $inactive-bg-color $inactive-text-color #00ff00
client.urgent $urgent-bg-color $urgent-bg-color $text-color #00ff00
|
_________________ "You can lead a horticulture but you can't make her think" ~ Dorothy Parker
2021 is the year of the Linux Desktop! |
|
Back to top |
|
|
tenspd1370 Tux's lil' helper
Joined: 14 Dec 2017 Posts: 119
|
Posted: Tue Oct 23, 2018 10:02 pm Post subject: |
|
|
Rofi is nice - great, another thing to spend my time customizing |
|
Back to top |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Wed Oct 24, 2018 12:11 am Post subject: |
|
|
tenspd1370 wrote: | Just a curiosity - do you know why an app opened from say - dmenu is treated differently than from zsh? I mean, my understanding was that PA sat below all that, and that when I run dmenu or something from zsh, both are run as "me" and have access to all the same environment setup and variables. It just confounds me. |
Probably dbus and/or consolekit. Make sure you start the entire desktop session under dbus-launch (and whatever the ck-* equivalent is) so all the env vars get set correctly.
Pulseaudio works fine without consolekit, btw. If that's the only reason you had it installed, get rid of it. |
|
Back to top |
|
|
tenspd1370 Tux's lil' helper
Joined: 14 Dec 2017 Posts: 119
|
Posted: Wed Oct 24, 2018 12:27 am Post subject: |
|
|
That is the only reason I have consolekit - I'll yank it then and give it a shot. Thanks! I just got a desktop upgrade at work. My old system had been running gentoo for like 4 or 5 years. I just don't remember all the stuff I did to get audio working on that, but when I reinstall, I usually just walk through all the wiki pages again. I should probably take notes this time.... |
|
Back to top |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Wed Oct 24, 2018 1:11 am Post subject: |
|
|
The only thing you need is to be in the "audio" group, and avoid using ALSA programs that want raw device access - ALSA comes preconfigured to use dmix nowadays, but there's still the odd exception.
What consolekit does is hide the device files behind ACLs to prevent users using sound "wrongly", from a ssh connection or cron or whatever. I consider that an antifeature. |
|
Back to top |
|
|
tenspd1370 Tux's lil' helper
Joined: 14 Dec 2017 Posts: 119
|
Posted: Wed Oct 24, 2018 3:49 pm Post subject: |
|
|
It was consolekit. |
|
Back to top |
|
|
|