Aller au contenu

Wullfk Blog

  • entries
    192
  • comments
    122
  • views
    827 371

Zebulon dans le lanceur Firefox d'Unity sur Ubuntu 14.04


Wullfk

2 530 vues

Bonjour,

 

Sur Ubuntu 14.04 avec l'interface Unity, il est possible d'ajouter des fonctionnalités à un lanceur de la barre Unity.

 

Ce que je vous propose ici, c'est de modifier le lanceur Firefox, afin d'y ajouter un accès direct vers le Forum Zebulon, + trois autres fonctions, vous allez voir c'est pas trop compliqué.

 

Dans un premier temps on va copier le fichier firefox.desktop dans notre "home" emplacement .local/share/application en ouvrant un terminal et en y entrant la commande suivante :

cp /usr/share/applications/firefox.desktop ~/.local/share/applications

note: le répertoire .local est un fichier caché dans "home" il faut pour cela pointer avec la souris sur la barre d'outils, puis dans "Affichage" cliquer sur Afficher les fichiers cachés.

 

Ensuite on l’ouvre avec Gedit afin d’y apporter les modifications de notre choix avec la commande ;

gedit ~/.local/share/applications/firefox.desktop

Voila comment ce présente le fichier firefox.desktop:

[Desktop Entry]Version=1.0Name=Firefox Web BrowserName[ar]=متصفح الويب فَيَرفُكْسName[ast]=Restolador web FirefoxName[bn]=ফায়ারফক্স ওয়েব ব্রাউজারName[ca]=Navegador web FirefoxName[cs]=Firefox Webový prohlížečName[da]=Firefox - internetbrowserName[el]=Περιηγητής FirefoxName[es]=Navegador web FirefoxName[et]=Firefoxi veebibrauserName[fa]=مرورگر اینترنتی FirefoxName[fi]=Firefox-selainName[fr]=Navigateur Web FirefoxName[gl]=Navegador web FirefoxName[he]=דפדפן האינטרנט FirefoxName[hr]=Firefox web preglednikName[hu]=Firefox webböngészőName[it]=Firefox Browser WebName[ja]=Firefox ウェブ・ブラウザName[ko]=Firefox 웹 브라우저Name[ku]=Geroka torê FirefoxName[lt]=Firefox interneto naršyklėName[nb]=Firefox NettleserName[nl]=Firefox webbrowserName[nn]=Firefox NettlesarName[no]=Firefox NettleserName[pl]=Przeglądarka WWW FirefoxName[pt]=Firefox Navegador WebName[pt_BR]=Navegador Web FirefoxName[ro]=Firefox – Navigator InternetName[ru]=Веб-браузер FirefoxName[sk]=Firefox - internetový prehliadačName[sl]=Firefox spletni brskalnikName[sv]=Firefox webbläsareName[tr]=Firefox Web TarayıcısıName[ug]=Firefox توركۆرگۈName[uk]=Веб-браузер FirefoxName[vi]=Trình duyệt web FirefoxName[zh_CN]=Firefox 网络浏览器Name[zh_TW]=Firefox 網路瀏覽器Comment=Browse the World Wide WebComment[ar]=تصفح الشبكة العنكبوتية العالميةComment[ast]=Restola pela RedeComment[bn]=ইন্টারনেট ব্রাউজ করুনComment[ca]=Navegueu per la webComment[cs]=Prohlížení stránek World Wide WebuComment[da]=Surf på internettetComment[de]=Im Internet surfenComment[el]=Μπορείτε να περιηγηθείτε στο διαδίκτυο (Web)Comment[es]=Navegue por la webComment[et]=Lehitse veebiComment[fa]=صفحات شبکه جهانی اینترنت را مرور نماییدComment[fi]=Selaa Internetin WWW-sivujaComment[fr]=Naviguer sur le WebComment[gl]=Navegar pola redeComment[he]=גלישה ברחבי האינטרנטComment[hr]=Pretražite webComment[hu]=A világháló böngészéseComment[it]=Esplora il webComment[ja]=ウェブを閲覧しますComment[ko]=웹을 돌아 다닙니다Comment[ku]=Li torê bigereComment[lt]=Naršykite interneteComment[nb]=Surf på nettetComment[nl]=Verken het internetComment[nn]=Surf på nettetComment[no]=Surf på nettetComment[pl]=Przeglądanie stron WWWComment[pt]=Navegue na InternetComment[pt_BR]=Navegue na InternetComment[ro]=Navigați pe InternetComment[ru]=Доступ в ИнтернетComment[sk]=Prehliadanie internetuComment[sl]=Brskajte po spletuComment[sv]=Surfa på webbenComment[tr]=İnternet'te GezininComment[ug]=دۇنيادىكى توربەتلەرنى كۆرگىلى بولىدۇComment[uk]=Перегляд сторінок ІнтернетуComment[vi]=Để duyệt các trang webComment[zh_CN]=浏览互联网Comment[zh_TW]=瀏覽網際網路GenericName=Web BrowserGenericName[ar]=متصفح ويبGenericName[ast]=Restolador WebGenericName[bn]=ওয়েব ব্রাউজারGenericName[ca]=Navegador webGenericName[cs]=Webový prohlížečGenericName[da]=WebbrowserGenericName[el]=Περιηγητής διαδικτύουGenericName[es]=Navegador webGenericName[et]=VeebibrauserGenericName[fa]=مرورگر اینترنتیGenericName[fi]=WWW-selainGenericName[fr]=Navigateur WebGenericName[gl]=Navegador WebGenericName[he]=דפדפן אינטרנטGenericName[hr]=Web preglednikGenericName[hu]=WebböngészőGenericName[it]=Browser webGenericName[ja]=ウェブ・ブラウザGenericName[ko]=웹 브라우저GenericName[ku]=Geroka torêGenericName[lt]=Interneto naršyklėGenericName[nb]=NettleserGenericName[nl]=WebbrowserGenericName[nn]=NettlesarGenericName[no]=NettleserGenericName[pl]=Przeglądarka WWWGenericName[pt]=Navegador WebGenericName[pt_BR]=Navegador WebGenericName[ro]=Navigator InternetGenericName[ru]=Веб-браузерGenericName[sk]=Internetový prehliadačGenericName[sl]=Spletni brskalnikGenericName[sv]=WebbläsareGenericName[tr]=Web TarayıcıGenericName[ug]=توركۆرگۈGenericName[uk]=Веб-браузерGenericName[vi]=Trình duyệt WebGenericName[zh_CN]=网络浏览器GenericName[zh_TW]=網路瀏覽器Keywords=Internet;WWW;Browser;Web;ExplorerKeywords[ar]=انترنت;إنترنت;متصفح;ويب;وبKeywords[ast]=Internet;WWW;Restolador;Web;EsploradorKeywords[ca]=Internet;WWW;Navegador;Web;Explorador;ExplorerKeywords[cs]=Internet;WWW;Prohlížeč;Web;ExplorerKeywords[da]=Internet;Internettet;WWW;Browser;Browse;Web;Surf;NettetKeywords[de]=Internet;WWW;Browser;Web;Explorer;Webseite;Site;surfen;online;browsenKeywords[el]=Internet;WWW;Browser;Web;Explorer;Διαδίκτυο;Περιηγητής;Firefox;Φιρεφοχ;ΙντερνετKeywords[es]=Explorador;Internet;WWWKeywords[fi]=Internet;WWW;Browser;Web;Explorer;selain;Internet-selain;internetselain;verkkoselain;netti;surffaaKeywords[fr]=Internet;WWW;Browser;Web;Explorer;Fureteur;Surfer;NavigateurKeywords[he]=דפדפן;אינטרנט;רשת;אתרים;אתר;פיירפוקס;מוזילה;Keywords[hr]=Internet;WWW;preglednik;WebKeywords[hu]=Internet;WWW;Böngésző;Web;Háló;Net;ExplorerKeywords[it]=Internet;WWW;Browser;Web;NavigatoreKeywords[is]=Internet;WWW;Vafri;Vefur;Netvafri;FlakkKeywords[ja]=Internet;WWW;Web;インターネット;ブラウザ;ウェブ;エクスプローラKeywords[nb]=Internett;WWW;Nettleser;Explorer;Web;Browser;NettsideKeywords[nl]=Internet;WWW;Browser;Web;Explorer;Verkenner;Website;Surfen;OnlineKeywords[pt]=Internet;WWW;Browser;Web;Explorador;NavegadorKeywords[pt_BR]=Internet;WWW;Browser;Web;Explorador;NavegadorKeywords[ru]=Internet;WWW;Browser;Web;Explorer;интернет;браузер;веб;файрфокс;огнелисKeywords[sk]=Internet;WWW;Prehliadač;Web;ExplorerKeywords[sl]=Internet;WWW;Browser;Web;Explorer;Brskalnik;SpletKeywords[tr]=İnternet;WWW;Tarayıcı;Web;Gezgin;Web sitesi;Site;sörf;çevrimiçi;taraKeywords[uk]=Internet;WWW;Browser;Web;Explorer;Інтернет;мережа;переглядач;оглядач;браузер;веб;файрфокс;вогнелис;переглядKeywords[vi]=Internet;WWW;Browser;Web;Explorer;Trình duyệt;Trang webKeywords[zh_CN]=Internet;WWW;Browser;Web;Explorer;网页;浏览;上网;火狐;Firefox;ff;互联网;网站;Keywords[zh_TW]=Internet;WWW;Browser;Web;Explorer;網際網路;網路;瀏覽器;上網;網頁;火狐Exec=firefox %uTerminal=falseX-MultipleArgs=falseType=ApplicationIcon=firefoxCategories=GNOME;GTK;Network;WebBrowser;MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;x-scheme-handler/chrome;video/webm;application/x-xpinstall;StartupNotify=trueActions=NewWindow;NewPrivateWindow;[Desktop Action NewWindow]Name=Open a New WindowName[ar]=افتح نافذة جديدةName[ast]=Abrir una ventana nuevaName[bn]=Abrir una ventana nuevaName[ca]=Obre una finestra novaName[cs]=Otevřít nové oknoName[da]=Åbn et nyt vindueName[de]=Ein neues Fenster öffnenName[el]=Άνοιγμα νέου παραθύρουName[es]=Abrir una ventana nuevaName[fi]=Avaa uusi ikkunaName[fr]=Ouvrir une nouvelle fenêtreName[gl]=Abrir unha nova xanelaName[he]=פתיחת חלון חדשName[hr]=Otvori novi prozorName[hu]=Új ablak nyitásaName[it]=Apri una nuova finestraName[ja]=新しいウィンドウを開くName[ko]=새 창 열기Name[ku]=Paceyeke nû vekeName[lt]=Atverti naują langąName[nb]=Åpne et nytt vinduName[nl]=Nieuw venster openenName[pt]=Abrir nova janelaName[pt_BR]=Abrir nova janelaName[ro]=Deschide o fereastră nouăName[ru]=Новое окноName[sk]=Otvoriť nové oknoName[sl]=Odpri novo oknoName[sv]=Öppna ett nytt fönsterName[tr]=Yeni pencere açName[ug]=يېڭى كۆزنەك ئېچىشName[uk]=Відкрити нове вікноName[vi]=Mở cửa sổ mớiName[zh_CN]=新建窗口Name[zh_TW]=開啟新視窗Exec=firefox -new-windowOnlyShowIn=Unity;[Desktop Action NewPrivateWindow]Name=Open a New Private WindowName[ar]=افتح نافذة جديدة للتصفح الخاصName[ca]=Obre una finestra nova en mode d'incògnitName[de]=Ein neues privates Fenster öffnenName[es]=Abrir una ventana privada nuevaName[fi]=Avaa uusi yksityinen ikkunaName[fr]=Ouvrir une nouvelle fenêtre de navigation privéeName[he]=פתיחת חלון גלישה פרטית חדשName[hu]=Új privát ablak nyitásaName[it]=Apri una nuova finestra anonimaName[nb]=Åpne et nytt privat vinduName[ru]=Новое приватное окноName[sl]=Odpri novo okno zasebnega brskanjaName[tr]=Yeni bir pencere açName[uk]=Відкрити нове вікно у потайливому режиміName[zh_TW]=開啟新隱私瀏覽視窗Exec=firefox -private-windowOnlyShowIn=Unity;

On va épurer le fichier en supprimant toutes les lignes correspondants à la prise en compte des langues autres que le Français, ça permet d'allégé la lecture.

 

On supprime les lignes suivantes:

[Desktop Action NewWindow]

Name=Open a New Window

Name[fr]=Ouvrir une nouvelle fenêtre

Exec=firefox -new-window

OnlyShowIn=Unity;

[Desktop Action NewPrivateWindow]

Name=Open a New Private Window

Name[fr]=Ouvrir une nouvelle fenêtre de navigation privée

Exec=firefox -private-window

OnlyShowIn=Unity;

 

Pourquoi supprimer c'est lignes?

tout simplement parce-qu’elles ne sont pour l'instant pas pris en compte dans le résultat final, alors autant supprimer ce qui est inutile.

 

On supprime aussi la ligne Actions=NewWindow;NewPrivateWindow;

que l'on remplace par la commande suivante:

 

X-Ayatana-Desktop-Shortcuts=Zebulon;NewOnglet;SafeMode;ProfileManager;

 

(Vous pouvez bien sûr remplacer "Zebulon" par la page de votre choix).

 

On ajoute maintenant à la fin du fichier les commandes choisies qui doivent être en corrélation avec la liste ci-dessus sous le format : nom du raccourci, commande, TargetEnvironnement, OnlyShowIn.

 

[Zebulon Shortcut Group]

Name=Ouvrir Forum Zebulon

Exec=firefox http://forum.zebulon.fr/

TargetEnvironment=Unity

OnlyShowIn=Unity;

[NewOnglet Shortcut Group]

Name=Ouvrir un nouvel onglet

Exec=firefox -new-tab about:blank

TargetEnvironment=Unity

OnlyShowIn=Unity;

[safeMode Shortcut Group]

Name=Ouvrir Firefox en mode sans échec

Exec=firefox -safe-mode

TargetEnvironment=Unity

OnlyShowIn=Unity;

[ProfileManager Shortcut Group]

Name=Firefox Profile Manager

Exec=firefox -ProfileManager

TargetEnvironment=Unity

OnlyShowIn=Unity;

 

 

Résultat final, le nouveau fichier firefox.desktop se présente comme ça:

[Desktop Entry]Version=1.0Name=Firefox Web BrowserName[fr]=Navigateur Web FirefoxComment=Browse the World Wide WebComment[fr]=Naviguer sur le WebGenericName=Web BrowserGenericName[fr]=Navigateur WebKeywords=Internet;WWW;Browser;Web;ExplorerKeywords[fr]=Internet;WWW;Browser;Web;Explorer;Fureteur;Surfer;NavigateurExec=firefox %uTerminal=falseX-MultipleArgs=falseType=ApplicationIcon=firefoxCategories=GNOME;GTK;Network;WebBrowser;MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;x-scheme-handler/chrome;video/webm;application/x-xpinstall;StartupNotify=trueX-Ayatana-Desktop-Shortcuts=Zebulon;NewOnglet;SafeMode;ProfileManager;[Zebulon Shortcut Group]Name=Ouvrir Forums ZebulonExec=firefox http://forum.zebulon.fr/TargetEnvironment=UnityOnlyShowIn=Unity;[NewOnglet Shortcut Group]Name=Ouvrir un nouvel ongletExec=firefox -new-tab about:blankTargetEnvironment=UnityOnlyShowIn=Unity;[SafeMode Shortcut Group]Name=Ouvrir Firefox en mode sans échecExec=firefox -safe-modeTargetEnvironment=UnityOnlyShowIn=Unity;[ProfileManager Shortcut Group]Name=Firefox Profile ManagerExec=firefox -ProfileManagerTargetEnvironment=UnityOnlyShowIn=Unity;

Il ne reste plus qu’ à relancer Unity afin que cette modification soit prise en compte en ouvrant un terminal et en entrant la commande:

unity --replace

961784Capturedu20140823133027.png

 

 

Vous voila maintenant avec deux lanceurs Firefox je sais c'est pas très logique, l'idéale aurait été d'avoir un seul lanceur Firefox qui regrouperait toutes les fonctions, seulement là pour l'instant je sais pas faire.

De plus Il faut savoir qu'un des lanceurs dispose de la fonction fort pratique, qui consiste à réduire en un clic sur l'icône Firefox dans la barre Unity, c'est la raison pour laquelle je conserve pour l'instant les deux lanceurs.

 

J'étudie la question pour pouvoir réunir toutes les fonctionnalités en un seul lanceur.

 

@+ icon_wink.gif

 

note: après redémarrage du PC, j'ai finalement qu'un seul lanceur Firefox avec toutes les fonctions citées précédemment.

Correctif apporté:

ajout dans firfox.desktop sous [NewOnglet Shortcut Group]:

 

[NewWindow Shortcut Group]

Name=Ouvrir une nouvelle fenêtre

Exec=firefox -new-window

TargetEnvironment=Unity

OnlyShowIn=Unity;

[NewPrivateWindow Shortcut Group]

Name=Ouvrir une nouvelle fenêtre de navigation privée

Exec=firefox -private-window

TargetEnvironment=Unity

OnlyShowIn=Unity;

 

modification de la ligne:

 

X-Ayatana-Desktop-Shortcuts=Zebulon;NewOnglet;SafeMode;ProfileManager;

 

par:

 

X-Ayatana-Desktop-Shortcuts=Zebulon;NewOnglet;NewWindow;NewPrivateWindow;SafeMode;ProfileManager;

 

Résultat final:

 

767489Capturedu20140824171028.png

 

 

 

0 Commentaire


Commentaires recommandés

Il n’y a aucun commentaire à afficher.

Rejoindre la conversation

Vous publiez en tant qu’invité. Si vous avez un compte, connectez-vous maintenant pour publier avec votre compte.
Remarque : votre message nécessitera l’approbation d’un modérateur avant de pouvoir être visible.

Invité
Add a comment...

×   Collé en tant que texte enrichi.   Coller en tant que texte brut à la place

  Seulement 75 émoticônes maximum sont autorisées.

×   Votre lien a été automatiquement intégré.   Afficher plutôt comme un lien

×   Votre contenu précédent a été rétabli.   Vider l’éditeur

×   Vous ne pouvez pas directement coller des images. Envoyez-les depuis votre ordinateur ou insérez-les depuis une URL.

×
×
  • Créer...