Patchwork [meta-browser] chromium 24.0.1312.52: add launch helper and .desktop file

login
register
mail settings
Submitter Koen Kooi
Date April 5, 2013, 8:31 a.m.
Message ID <1365150719-1428-1-git-send-email-koen@dominion.thruhere.net>
Download mbox | patch
Permalink /patch/47489/
State Not Applicable, archived
Headers show

Comments

Andreas Müller - April 5, 2013, 9:31 a.m.
On Fri, Apr 5, 2013 at 10:31 AM, Koen Kooi <koen@dominion.thruhere.net> wrote:
> The .desktop file is from the Fedora chrome RPM, the script is a custom one.
>
> The launch helper has a nasty work around for root users, I'm open for better ways to work around that.
>
> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Cool I was about to prepare something similar - thanks.

Andreas

Patch

diff --git a/recipes-browser/chromium/chromium/google-chrome b/recipes-browser/chromium/chromium/google-chrome
new file mode 100755
index 0000000..d5151ca
--- /dev/null
+++ b/recipes-browser/chromium/chromium/google-chrome
@@ -0,0 +1,7 @@ 
+#!/bin/sh
+
+if [ "${USER}" = "root" ] ; then 
+	su -c /usr/bin/chrome/chrome $@ - xuser
+else
+	/usr/bin/chrome/chrome $@
+fi
diff --git a/recipes-browser/chromium/chromium/google-chrome.desktop b/recipes-browser/chromium/chromium/google-chrome.desktop
new file mode 100644
index 0000000..d29fdb2
--- /dev/null
+++ b/recipes-browser/chromium/chromium/google-chrome.desktop
@@ -0,0 +1,222 @@ 
+[Desktop Entry]
+Version=1.0
+Name=Chromium
+# Only KDE 4 seems to use GenericName, so we reuse the KDE strings.
+# From Ubuntu's language-pack-kde-XX-base packages, version 9.04-20090413.
+GenericName=Web Browser
+GenericName[ar]=????? ??????
+GenericName[bg]=??? ???????
+GenericName[ca]=Navegador web
+GenericName[cs]=WWW prohlíže?
+GenericName[da]=Browser
+GenericName[de]=Web-Browser
+GenericName[el]=?????????? ?????
+GenericName[en_GB]=Web Browser
+GenericName[es]=Navegador web
+GenericName[et]=Veebibrauser
+GenericName[fi]=WWW-selain
+GenericName[fr]=Navigateur Web
+GenericName[gu]=??? ???????
+GenericName[he]=????? ???????
+GenericName[hi]=??? ????????
+GenericName[hu]=Webböngész?
+GenericName[it]=Browser Web
+GenericName[ja]=???????
+GenericName[kn]=??? ??????
+GenericName[ko]=? ????
+GenericName[lt]=Žiniatinklio naršykl?
+GenericName[lv]=T?mek?a p?rl?ks
+GenericName[ml]=???? ????????
+GenericName[mr]=??? ???????
+GenericName[nb]=Nettleser
+GenericName[nl]=Webbrowser
+GenericName[pl]=Przegl?darka WWW
+GenericName[pt]=Navegador Web
+GenericName[pt_BR]=Navegador da Internet
+GenericName[ro]=Navigator de Internet
+GenericName[ru]=???-???????
+GenericName[sl]=Spletni brskalnik
+GenericName[sv]=Webbläsare
+GenericName[ta]=???? ?????
+GenericName[th]=???????????????
+GenericName[tr]=Web Taray?c?
+GenericName[uk]=????????? ?????
+GenericName[zh_CN]=?????
+GenericName[zh_HK]=?????
+GenericName[zh_TW]=?????
+# Not translated in KDE, from Epiphany 2.26.1-0ubuntu1.
+GenericName[bn]=???? ????????
+GenericName[fil]=Web Browser
+GenericName[hr]=Web preglednik
+GenericName[id]=Browser Web
+GenericName[or]=????? ???????
+GenericName[sk]=WWW prehliada?
+GenericName[sr]=???????? ??????????
+GenericName[te]=????? ???????
+GenericName[vi]=B? duy?t Web
+# Gnome and KDE 3 uses Comment.
+Comment=Access the Internet
+Comment[ar]=?????? ??? ????????
+Comment[bg]=?????? ?? ????????
+Comment[bn]=??????????? ????????? ????
+Comment[ca]=Accedeix a Internet
+Comment[cs]=P?ístup k internetu
+Comment[da]=Få adgang til internettet
+Comment[de]=Internetzugriff
+Comment[el]=???????? ??? ?????????
+Comment[en_GB]=Access the Internet
+Comment[es]=Accede a Internet.
+Comment[et]=Pääs Internetti
+Comment[fi]=Käytä internetiä
+Comment[fil]=I-access ang Internet
+Comment[fr]=Accéder à Internet
+Comment[gu]=??????? ?????? ???
+Comment[he]=???? ?? ????????
+Comment[hi]=??????? ?? ????? ??????? ????
+Comment[hr]=Pristup Internetu
+Comment[hu]=Internetelérés
+Comment[id]=Akses Internet
+Comment[it]=Accesso a Internet
+Comment[ja]=????????????
+Comment[kn]=????????? ????? ?????????
+Comment[ko]=??? ??
+Comment[lt]=Interneto prieiga
+Comment[lv]=Piek??t internetam
+Comment[ml]=?????????????? ??????? ???????
+Comment[mr]=???????????? ?????? ???
+Comment[nb]=Gå til Internett
+Comment[nl]=Verbinding maken met internet
+Comment[or]=?????????? ?????? ??????
+Comment[pl]=Skorzystaj z internetu
+Comment[pt]=Aceder à Internet
+Comment[pt_BR]=Acessar a internet
+Comment[ro]=Accesa?i Internetul
+Comment[ru]=?????? ? ????????
+Comment[sk]=Prístup do siete Internet
+Comment[sl]=Dostop do interneta
+Comment[sr]=?????????? ?????????
+Comment[sv]=Gå ut på Internet
+Comment[ta]=???????? ????????
+Comment[te]=???????????? ??????? ????????
+Comment[th]=???????????????????
+Comment[tr]=?nternet'e eri?in
+Comment[uk]=?????? ?? ?????????
+Comment[vi]=Truy c?p Internet
+Comment[zh_CN]=?????
+Comment[zh_HK]=???????
+Comment[zh_TW]=???????
+Exec=/usr/bin/google-chrome %U
+Terminal=false
+Icon=google-chrome
+Type=Application
+Categories=Network;WebBrowser;
+MimeType=text/html;text/xml;application/xhtml_xml;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;
+X-Ayatana-Desktop-Shortcuts=NewWindow;NewIncognito
+
+[NewWindow Shortcut Group]
+Name=New Window
+Name[am]=??? ????
+Name[ar]=????? ?????
+Name[bg]=??? ????????
+Name[bn]=???? ??????
+Name[ca]=Finestra nova
+Name[cs]=Nové okno
+Name[da]=Nyt vindue
+Name[de]=Neues Fenster
+Name[el]=??? ????????
+Name[en_GB]=New Window
+Name[es]=Nueva ventana
+Name[et]=Uus aken
+Name[fa]=????? ????
+Name[fi]=Uusi ikkuna
+Name[fil]=New Window
+Name[fr]=Nouvelle fenêtre
+Name[gu]=??? ?????
+Name[hi]=?? ?????
+Name[hr]=Novi prozor
+Name[hu]=Új ablak
+Name[id]=Jendela Baru
+Name[it]=Nuova finestra
+Name[iw]=???? ???
+Name[ja]=???????
+Name[kn]=??? ?????
+Name[ko]=? ?
+Name[lt]=Naujas langas
+Name[lv]=Jauns logs
+Name[ml]=????? ???????
+Name[mr]=???? ?????
+Name[nl]=Nieuw venster
+Name[no]=Nytt vindu
+Name[pl]=Nowe okno
+Name[pt]=Nova janela
+Name[pt_BR]=Nova janela
+Name[ro]=Fereastr? nou?
+Name[ru]=????? ????
+Name[sk]=Nové okno
+Name[sl]=Novo okno
+Name[sr]=???? ??????
+Name[sv]=Nytt fönster
+Name[sw]=Dirisha Jipya
+Name[ta]=????? ??????
+Name[te]=??????? ?????
+Name[th]=????????????
+Name[tr]=Yeni Pencere
+Name[uk]=???? ?????
+Name[vi]=C?a s? M?i
+Name[zh_CN]=????
+Name[zh_TW]=????
+Exec=/usr/bin/google-chrome
+TargetEnvironment=Unity
+
+[NewIncognito Shortcut Group]
+Name=New Incognito Window
+Name[ar]=????? ????? ?????? ???????
+Name[bg]=??? ???????? „?????????“
+Name[bn]=???? ???????? ??????
+Name[ca]=Finestra d'incògnit nova
+Name[cs]=Nové anonymní okno
+Name[da]=Nyt inkognitovindue
+Name[de]=Neues Inkognito-Fenster
+Name[el]=??? ???????? ??? ??????? ?????????
+Name[en_GB]=New Incognito window
+Name[es]=Nueva ventana de incógnito
+Name[et]=Uus inkognito aken
+Name[fa]=????? ???? ???? ??????
+Name[fi]=Uusi incognito-ikkuna
+Name[fil]=Bagong Incognito window
+Name[fr]=Nouvelle fenêtre de navigation privée
+Name[gu]=??? ???? ?????
+Name[hi]=?? ????? ?????
+Name[hr]=Novi anoniman prozor
+Name[hu]=Új Inkognitóablak
+Name[id]=Jendela Penyamaran baru
+Name[it]=Nuova finestra di navigazione in incognito
+Name[iw]=???? ??? ?????? ????
+Name[ja]=????????? ?????
+Name[kn]=??? ?????? ?????
+Name[ko]=? ??? ?
+Name[lt]=Naujas inkognito langas
+Name[lv]=Jauns inkognito rež?ma logs
+Name[ml]=????? ??? ????????? ???????
+Name[mr]=???? ????? ?????
+Name[nl]=Nieuw incognitovenster
+Name[no]=Nytt inkognitovindu
+Name[pl]=Nowe okno incognito
+Name[pt]=Nova janela de navegação anónima
+Name[pt_BR]=Nova janela anônima
+Name[ro]=Fereastr? nou? incognito
+Name[ru]=????? ???? ? ?????? ?????????
+Name[sk]=Nové okno inkognito
+Name[sl]=Novo okno brez beleženja zgodovine
+Name[sr]=???? ?????? ?? ?????????? ??? ??????????
+Name[sv]=Nytt inkognitofönster
+Name[ta]=????? ????????? ??????
+Name[te]=??????? ?????? ?????
+Name[th]=???????????????????????????
+Name[tr]=Yeni Gizli pencere
+Name[uk]=???? ????? ? ?????? ?????????? ?????????
+Name[vi]=C?a s? ?n danh m?i
+Name[zh_CN]=??????
+Name[zh_TW]=???????
+Exec=/usr/bin/google-chrome --incognito
+TargetEnvironment=Unity
diff --git a/recipes-browser/chromium/chromium_24.0.1312.52.bb b/recipes-browser/chromium/chromium_24.0.1312.52.bb
index 3976a71..41e4eb5 100644
--- a/recipes-browser/chromium/chromium_24.0.1312.52.bb
+++ b/recipes-browser/chromium/chromium_24.0.1312.52.bb
@@ -9,6 +9,8 @@  SRC_URI = "http://commondatastorage.googleapis.com/chromium-browser-official/${P
         file://unistd-2.patch \
         file://glib-2.16-use-siginfo_t.patch \
         file://ui-gl-no-narrowing.patch \
+        file://google-chrome \
+        file://google-chrome.desktop \
 "
 
 # include.gypi exists only for armv6 and armv7a and there isn't something like COMPATIBLE_ARCH afaik
@@ -49,6 +51,11 @@  do_compile() {
 
 do_install() {
 	install -d ${D}${bindir}
+	install -m 0755 ${WORKDIR}/google-chrome ${D}${bindir}/
+
+	install -d ${D}${datadir}/applications
+	install -m 0644 ${WORKDIR}/google-chrome.desktop ${D}${datadir}/applications/
+
 	install -d ${D}${bindir}/chrome/
 	install -m 0755 ${S}/out/Release/chrome ${D}${bindir}/chrome/chrome
 	install -m 0644 ${S}/out/Release/chrome.pak ${D}${bindir}/chrome/