Make templatevm's appmenus to start programs as root

This commit is contained in:
Joanna Rutkowska 2010-10-04 17:54:45 +02:00
parent 82b78207a7
commit 2841ba4cc4
7 changed files with 211 additions and 4 deletions

View File

@ -0,0 +1,17 @@
#!/bin/sh
SRC=$1
DSTDIR=$2
DST=$DSTDIR/$(basename $SRC)
sed -e "s/^\(Name.*\)=\(.*\)/\1=%VMNAME%: \2/" \
-e "s/^\(GenericName.*\)=\(.*\)/\1=%VMNAME%: \2/" \
-e "s/^Exec=\(.*\)/Exec=qvm-run -q --tray -a --user=root %VMNAME% \"\1\"/" \
<$SRC | \
grep -v "^Mime" | \
grep -v "^TryExec" | \
grep -v "^Startup" >$DST
#echo "Categories=%VMNAME%" >> $DST
echo X-Qubes-VmName=%VMNAME% >> $DST
echo Icon=%VMDIR%/icon.png >> $DST

View File

@ -0,0 +1,14 @@
#!/bin/sh
APPSORIG=$1
APPSTMPL=$2
if [ $# != 2 ]; then
echo "usage $0 <apps_orig_dir> <apps_templ_dir>"
exit 0
fi
rm -f $APPSTMPL/*
mkdir -p $APPSTMPL
find $APPSORIG -name "*.desktop" -exec appmenus/convert_app2template_for_templatevm.sh {} $APPSTMPL \;
cp appmenus/qubes-vm.directory.template $APPSTMPL

View File

@ -1,6 +1,7 @@
[Desktop Entry] [Desktop Entry]
Type=Application Type=Application
Exec=qvm-run -q --tray -a %VMNAME% 'konsole' Exec=qvm-run -q --tray -a --user=root %VMNAME% "konsole"
Icon=utilities-terminal
X-DocPath=konsole/index.html X-DocPath=konsole/index.html
Terminal=false Terminal=false
X-KDE-StartupNotify=true X-KDE-StartupNotify=true

View File

@ -1,6 +1,7 @@
[Desktop Entry] [Desktop Entry]
Type=Application Type=Application
Exec=qvm-run -q --tray -a %VMNAME% 'kpackagekit -caption "%c" %i %F' Icon=applications-other
Exec=qvm-run -q --tray -a --user=root %VMNAME% "kpackagekit -caption "%c" %i %F"
X-DBUS-StartupType=Unique X-DBUS-StartupType=Unique
X-DBUS-ServiceName=org.kde.KPackageKit X-DBUS-ServiceName=org.kde.KPackageKit

View File

@ -130,7 +130,8 @@ Comment[vi]=Đổi ngày giờ hệ thống
Comment[zh_CN]= Comment[zh_CN]=
Comment[zh_TW]= Comment[zh_TW]=
Categories=System;Settings;X-Red-Hat-Base; Categories=System;Settings;X-Red-Hat-Base;
Exec=qvm-run -q --tray -a %VMNAME% '/usr/bin/system-config-date' Icon=system-config-date
Exec=qvm-run -q --tray -a --user=root %VMNAME% "/usr/bin/system-config-date"
Type=Application Type=Application
Terminal=false Terminal=false
X-Desktop-File-Install-Version=0.16 X-Desktop-File-Install-Version=0.16

View File

@ -114,9 +114,10 @@ Comment[uk]=Налаштовування принтерів
Comment[vi]=Cu hình máy in Comment[vi]=Cu hình máy in
Comment[zh_CN]= Comment[zh_CN]=
Comment[zh_TW]= Comment[zh_TW]=
Exec=qvm-run -q --tray -a %VMNAME% 'system-config-printer' Exec=qvm-run -q --tray -a --user=root %VMNAME% "system-config-printer"
Terminal=false Terminal=false
Type=Application Type=Application
Icon=printer
X-Desktop-File-Install-Version=0.16 X-Desktop-File-Install-Version=0.16
Categories=GTK;Printing;HardwareSettings;Settings;System; Categories=GTK;Printing;HardwareSettings;Settings;System;
X-Qubes-VmName=%VMNAME% X-Qubes-VmName=%VMNAME%

View File

@ -0,0 +1,172 @@
[Desktop Entry]
Exec=qvm-run -q --tray -a --user=root %VMNAME% "systemsettings -caption "%c" %i"
Icon=preferences-system
Type=Application
X-DocPath=systemsettings/index.html
X-KDE-StartupNotify=true
GenericName=%VMNAME%: System Settings
GenericName[ar]=%VMNAME%: إعدادات النظام
GenericName[be@latin]=%VMNAME%: Systemnyja nałady
GenericName[bg]=%VMNAME%: Системни настройки
GenericName[bn]=%VMNAME%: ি ি
GenericName[bn_IN]=%VMNAME%: ি ি
GenericName[ca]=%VMNAME%: Arranjament del sistema
GenericName[ca@valencia]=%VMNAME%: Arranjament del sistema
GenericName[cs]=%VMNAME%: Nastavení systému
GenericName[csb]=%VMNAME%: Systemòwé ùstôwë
GenericName[da]=%VMNAME%: Systemindstillinger
GenericName[de]=%VMNAME%: Systemeinstellungen
GenericName[el]=%VMNAME%: Ρυθμίσεις συστήματος
GenericName[en_GB]=%VMNAME%: System Settings
GenericName[eo]=%VMNAME%: Sistema agordo
GenericName[es]=%VMNAME%: Preferencias del sistema
GenericName[et]=%VMNAME%: Süsteemi seadistused
GenericName[eu]=%VMNAME%: Sistemaren ezarpenak
GenericName[fi]=%VMNAME%: Järjestelmän asetukset
GenericName[fr]=%VMNAME%: Configuration du système
GenericName[fy]=%VMNAME%: Systeemynstellings
GenericName[ga]=%VMNAME%: Socruithe an Chórais
GenericName[gl]=%VMNAME%: Configuración do sistema
GenericName[gu]=%VMNAME%: િ
GenericName[he]=%VMNAME%: הגדרות מערכת
GenericName[hi]=%VMNAME%: ि
GenericName[hne]=%VMNAME%: ि
GenericName[hr]=%VMNAME%: Postavke sustava
GenericName[hu]=%VMNAME%: Rendszerbeállítások
GenericName[id]=%VMNAME%: Pengaturan Sistem
GenericName[is]=%VMNAME%: Kerfisstillingar
GenericName[it]=%VMNAME%: Impostazioni di sistema
GenericName[ja]=%VMNAME%:
GenericName[kk]=%VMNAME%: Жүйе параметрлері
GenericName[km]=%VMNAME%:
GenericName[kn]=%VMNAME%:
GenericName[ko]=%VMNAME%:
GenericName[ku]=%VMNAME%: Mîhengên Pergalê
GenericName[lt]=%VMNAME%: Sistemos nustatymai
GenericName[lv]=%VMNAME%: Sistēmas iestatījumi
GenericName[mai]=%VMNAME%: ि
GenericName[mk]=%VMNAME%: Системски поставувања
GenericName[ml]=%VMNAME%: ി
GenericName[mr]=%VMNAME%:
GenericName[nb]=%VMNAME%: Systeminnstillinger
GenericName[nds]=%VMNAME%: Systeeminstellen
GenericName[nl]=%VMNAME%: Systeeminstellingen
GenericName[nn]=%VMNAME%: Systemoppsett
GenericName[oc]=%VMNAME%: Configuracion del sistèma
GenericName[or]=%VMNAME%: ି
GenericName[pa]=%VMNAME%: ਿ ਿ
GenericName[pl]=%VMNAME%: Ustawienia systemowe
GenericName[pt]=%VMNAME%: Configuração do Sistema
GenericName[pt_BR]=%VMNAME%: Configurações do sistema
GenericName[ro]=%VMNAME%: Configurări de sistem
GenericName[ru]=%VMNAME%: Параметры системы
GenericName[se]=%VMNAME%: Vuogádatheivehusat
GenericName[si]=%VMNAME%:
GenericName[sk]=%VMNAME%: Systémové nastavenia
GenericName[sl]=%VMNAME%: Sistemske nastavitve
GenericName[sr]=%VMNAME%: Системске поставке
GenericName[sr@ijekavian]=%VMNAME%: Системске поставке
GenericName[sr@ijekavianlatin]=%VMNAME%: Sistemske postavke
GenericName[sr@latin]=%VMNAME%: Sistemske postavke
GenericName[sv]=%VMNAME%: Systeminställningar
GenericName[ta]=%VMNAME%: System Settings
GenericName[te]=%VMNAME%: ి
GenericName[tg]=%VMNAME%: Танзимотҳои система
GenericName[th]=%VMNAME%:
GenericName[tr]=%VMNAME%: Sistem Ayarları
GenericName[uk]=%VMNAME%: Системні параметри
GenericName[uz]=%VMNAME%: Tizim moslamalari
GenericName[uz@cyrillic]=%VMNAME%: Тизим мосламалари
GenericName[wa]=%VMNAME%: Apontiaedjes do sistinme
GenericName[x-test]=%VMNAME%: xxSystem Settingsxx
GenericName[zh_CN]=%VMNAME%:
GenericName[zh_TW]=%VMNAME%:
Name=%VMNAME%: System Settings
Name[ar]=%VMNAME%: إعدادات النظام
Name[be]=%VMNAME%: Сістэмныя настаўленні
Name[be@latin]=%VMNAME%: Systemnyja nałady
Name[bg]=%VMNAME%: Системни настройки
Name[bn]=%VMNAME%: ি ি
Name[bn_IN]=%VMNAME%: ি ি
Name[br]=%VMNAME%: Dibarzhoù ar reizhiad
Name[ca]=%VMNAME%: Arranjament del sistema
Name[ca@valencia]=%VMNAME%: Arranjament del sistema
Name[cs]=%VMNAME%: Nastavení systému
Name[csb]=%VMNAME%: Systemòwé ùstôwë
Name[da]=%VMNAME%: Systemindstillinger
Name[de]=%VMNAME%: Systemeinstellungen
Name[el]=%VMNAME%: Ρυθμίσεις συστήματος
Name[en_GB]=%VMNAME%: System Settings
Name[eo]=%VMNAME%: Sistema agordo
Name[es]=%VMNAME%: Preferencias del sistema
Name[et]=%VMNAME%: Süsteemi seadistused
Name[eu]=%VMNAME%: Sistemaren ezarpenak
Name[fa]=%VMNAME%: تنظیمات سیستم
Name[fi]=%VMNAME%: Järjestelmän asetukset
Name[fr]=%VMNAME%: Configuration du système
Name[fy]=%VMNAME%: Systeemynstellings
Name[ga]=%VMNAME%: Socruithe an Chórais
Name[gl]=%VMNAME%: Configuración do sistema
Name[gu]=%VMNAME%: િ
Name[he]=%VMNAME%: הגדרות מערכת
Name[hi]=%VMNAME%: ि
Name[hne]=%VMNAME%: ि
Name[hr]=%VMNAME%: Postavke sustava
Name[hu]=%VMNAME%: Rendszerbeállítások
Name[id]=%VMNAME%: Pengaturan Sistem
Name[is]=%VMNAME%: Kerfisstillingar
Name[it]=%VMNAME%: Impostazioni di sistema
Name[ja]=%VMNAME%: KDE
Name[kk]=%VMNAME%: Жүйе параметрлері
Name[km]=%VMNAME%:
Name[kn]=%VMNAME%:
Name[ko]=%VMNAME%:
Name[ku]=%VMNAME%: Mîhengên Pergalê
Name[lt]=%VMNAME%: Sistemos nustatymai
Name[lv]=%VMNAME%: Sistēmas iestatījumi
Name[mai]=%VMNAME%: ि
Name[mk]=%VMNAME%: Системски поставувања
Name[ml]=%VMNAME%: ി
Name[mr]=%VMNAME%:
Name[nb]=%VMNAME%: Systemoppsett
Name[nds]=%VMNAME%: Systeeminstellen
Name[ne]=%VMNAME%: ि
Name[nl]=%VMNAME%: Systeeminstellingen
Name[nn]=%VMNAME%: Systemoppsett
Name[oc]=%VMNAME%: Configuracion del sistèma
Name[or]=%VMNAME%: ି
Name[pa]=%VMNAME%: ਿ ਿ
Name[pl]=%VMNAME%: Ustawienia systemowe
Name[pt]=%VMNAME%: Configuração do Sistema
Name[pt_BR]=%VMNAME%: Configurações do sistema
Name[ro]=%VMNAME%: Configurări de sistem
Name[ru]=%VMNAME%: Параметры системы
Name[se]=%VMNAME%: Vuogádatheivehusat
Name[si]=%VMNAME%:
Name[sk]=%VMNAME%: Systémové nastavenia
Name[sl]=%VMNAME%: Sistemske nastavitve
Name[sr]=%VMNAME%: Системске поставке
Name[sr@ijekavian]=%VMNAME%: Системске поставке
Name[sr@ijekavianlatin]=%VMNAME%: Sistemske postavke
Name[sr@latin]=%VMNAME%: Sistemske postavke
Name[sv]=%VMNAME%: Systeminställningar
Name[ta]=%VMNAME%: System Settings
Name[te]=%VMNAME%: ి
Name[tg]=%VMNAME%: Танзимотҳои система
Name[th]=%VMNAME%:
Name[tr]=%VMNAME%: Sistem Ayarları
Name[uk]=%VMNAME%: Системні параметри
Name[uz]=%VMNAME%: Tizim moslamalari
Name[uz@cyrillic]=%VMNAME%: Тизим мосламалари
Name[wa]=%VMNAME%: Apontiaedjes do sistinme
Name[x-test]=%VMNAME%: xxSystem Settingsxx
Name[zh_CN]=%VMNAME%:
Name[zh_TW]=%VMNAME%:
X-DBUS-StartupType=Unique
Categories=Qt;KDE;Settings;
OnlyShowIn=KDE;
X-Qubes-VmName=%VMNAME%
Icon=%VMDIR%/icon.png