You are not logged in.

#1 2017-06-24 14:26:59

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,911

[Solved] custom hook to make starting firefox with alsa support easy

Since firefox is build without alsa support I am now running firefox through apulse from aur.
I manually edited /usr/share/applications/firefox.desktop  , but this gets overwritten at every firefox update.

A custom hook could solve this, I would like some feedback.

Is this a valid use for  a custom hook ?
Should i put the sed command in a script instead of using Exec directly ?
Should firefox be listed as a Depends ?

# /etc/pacman.d/hooks/firefox-apulse.hook

[Trigger]
Type = File
Operation = Install
Operation = Upgrade
Target = usr/share/applications/firefox.desktop

[Action]
Description = adjust firefox.desktop to start firefox with apulse providing alsa support
When = PostTransaction
Exec = /usr/bin/sed -i -e "s|Exec=/usr/lib/firefox/firefox|Exec=/usr/bin/apulse /usr/lib/firefox/firefox|" /usr/share/applications/firefox.desktop
Depends=sed

Last edited by Lone_Wolf (2017-06-24 15:21:03)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#2 2017-06-24 14:29:21

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: [Solved] custom hook to make starting firefox with alsa support easy

Er ... no.  Just put the desktop file in the right place to start with:
https://wiki.archlinux.org/index.php/De … tion_entry


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2017-06-24 14:42:08

Alad
Wiki Admin/IRC Op
From: Bagelstan
Registered: 2014-05-04
Posts: 2,412
Website

Re: [Solved] custom hook to make starting firefox with alsa support easy


Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby

Offline

#4 2017-06-24 15:15:26

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,911

Re: [Solved] custom hook to make starting firefox with alsa support easy

@Trilby :

using a user provided *.desktop-file feels much cleaner, thanks .
(freedesktop *.desktop specification is very hard to interpret with all it's exceptions) .

@Alad:
Haven't encountered that issue yet, either AL doesn't enable the sandboxing or sandboxing relies on something not active on my system .
(like rootless X or some systemd service)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

Board footer

Powered by FluxBB