summaryrefslogtreecommitdiffstats
path: root/config/chroot_local-hooks/09-torsocks-apps
blob: de625212f240f616b9ce171254eeffbb7a139b2e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh

set -e

echo "Wrapping some applications with torsocks"

APPS="gobby-0.5 liferea seahorse"
DBUS_SERVICES="org.gnome.seahorse.Application"

for app in $APPS; do
   sed -i'' --regexp-extended 's,^Exec=(.*),Exec=torsocks \1,' \
       "/usr/share/applications/${app}.desktop"
done

for dbus_service in $DBUS_SERVICES; do
   sed -i'' --regexp-extended 's,^Exec=(.*),Exec=torsocks \1,' \
       "/usr/share/dbus-1/services/${dbus_service}.service"
done

# Redirect to existing wrapper
sed -i'' --regexp-extended 's,^Exec=/usr/bin/totem$,Exec=/usr/local/bin/totem,' \
    "/usr/share/dbus-1/services/org.gnome.Totem.service"