Difference between revisions of "User:Twt"

From GnuCash
Jump to: navigation, search
(How Do I Add GnuCash Shortcuts to Ubuntu's Unity Launcher?)
(How Do I Add GnuCash Shortcuts to Ubuntu's Unity Launcher?)
Line 91: Line 91:
 
<pre> gedit ~/.local/share/applications/gnucash_with_shortcuts.desktop </pre>
 
<pre> gedit ~/.local/share/applications/gnucash_with_shortcuts.desktop </pre>
  
* Double click the file in nautilus and it should open your default accounts file and the GnuCash icon should appear in the launcher.  Right click the icon and select Lock to Launcher.  Now it should remain in the launcher when
+
* Double click the file in nautilus and if you don't have any errors the file should take on the GnuCash icon and clicking it should cause the GnuCash icon to appear in the launcher and the application will open your default accounts file.  Right click the icon and notice below your new menu items you need to select the option "Lock to Launcher." With the icon locked it will remain in the launcher when you close GnuCash and you should be able to right click and choose the additional menu links that you added.
you close GnuCash and you should be able to right click the icon and choose the additional menu links that you put in the file.
 
  
 
==== Sources ====  
 
==== Sources ====  

Revision as of 04:40, 6 February 2013

on irc I'm usually TommyT


FAQ entry

How Do I Add GnuCash Shortcuts to Ubuntu's Unity Launcher?

Starting with Ubuntu 11.10, default Ubuntu installations include Unity, and its launcher, a row of icons for commonly-used applications. If you regularly open more than one set of GnuCash books you can add a useful right-click menu to the GnuCash icon on your launcher to open each of your sets of books independently. (Using this method you can have multiple sets of GnuCash books open simultaneously, which you cannot do using the menu within GnuCash.)

You will need to know the path to each of your GnuCash data files. If you compiled GnuCash yourself or installed it in a non-standard location you will also need to know the path to the GnuCash application.

  • First remove GnuCash from the launcher if it is there already.
  • Create a file ~/.local/share/applications/gnucash_with_shortcuts.desktop

and paste into it the following

[Desktop Entry]
Type=Application
MimeType=application/x-gnucash;
Version=0.9.4
Name=Gnucash with shortcuts
GenericName=Finance Management
GenericName[de]=Finanzmanagement
Comment=Manage your finances, accounts, and investments
Comment[bg]=Управлявайте финанси, сметки и инвестиции
Comment[ca]=Gestioneu les vostres finances, comptes i inversions
Comment[cs]=Spravovat vaše finance, účty a investice
Comment[de]=Verwaltung der Finanzen von Privatanwendern und Kleinbetrieben.
Comment[en_GB]=Manage your finances, accounts, and investments
Comment[es]=Gestione sus finanzas, cuentas e inversiones
Comment[eu]=Kudeatu zure finantzak, kontuak eta inbertsioak
Comment[fr]=Gérez vos finances, vos comptes et vos investissements
Comment[hu]=Igazgassa pénzügyeit, számláit és befektetéseit
Comment[it]=Gestisce le proprie finanze, i conti e gli investimenti
Comment[ja]=財務、口座および投資を管理します
Comment[ko]=재정, 계정 및 투자 관리
Comment[lv]=Pārvaldiet savas finanses, kontus un investīcijas
Comment[nb]=Forvalt dine finanser, kontoer og investeringer
Comment[ne]=तपाईँको वित्तहरू, खाताहरू, र लगानीहरू प्रबन्ध गर्नुहोस्
Comment[nl]=Om uw financiën, rekeningen en investeringen te beheren
Comment[pl]=Zarządzaj swoimi finansami, kontami i inwestycjami
Comment[pt_BR]=Gerencie suas finanças, contas e investimentos
Comment[ro]=Administrează-ţi finanţele, conturile şi investiţiile
Comment[ru]=Управляйте своими финансами, счетами и инвестициями
Comment[ta]=உங்க‌ளுடைய‌ நிதிக‌ள், க‌ண‌க்குக‌ள் ம‌ற்றும் முத‌லீடுக‌ளை நிர்வ‌கிக்க‌வும்
Comment[uk]=Керування вашими фінансами, рахунками та інвестиціями
Comment[vi]=Quản lý tài chính, các tài khoản và vốn cố định
Comment[zh_CN]=管理你的财务、账户和投资
Exec=gnucash /full/path/to/default/accounts.gnucash
Icon=gnucash-icon
StartupNotify=true
Terminal=false
Categories=Office;Finance;
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=GnuCash
X-GNOME-Bugzilla-Component=General
X-GNOME-Bugzilla-Version=2.4.10
X-GNOME-DocPath=gnucash/gnucash.xml
X-GNOME-FullName=GnuCash Finance Management

X-Ayatana-Desktop-Shortcuts=File_One;File_II;File_3

[File_One Shortcut Group]
Name=This Is The Text of the FIRST Menu
Exec=gnucash /full/path/to/project1/accounts.gnucash
TargetEnvironment=Unity

[File_II Shortcut Group]
Name=This Is the Text of Menu Two
Exec=gnucash /full/path/to/project2/accounts.gnucash
TargetEnvironment=Unity

[File_3 Shortcut Group]
Name=And This is the Text Yet Another Menu I Call Number Three
Exec=gnucash /full/path/to/project3/accounts.gnucash
TargetEnvironment=Unity

  • About half way down (just below the Comment lines) where it says Exec= put the full path to the accounts file that you want opened if you just left click the launcher. If you need to include a full path to run GnuCash on your system (such as if you compiled it yourself) then Exec= should start with /usr/bin/gnucash or /home/user/bin/gnucash or wherever you keep the compiled binary.
  • Edit the line that says X-Ayatana-Desktop-Shortcuts= to include an entry for each of your sets of GnuCash books. (These names will NOT appear to the user.) There should be no spaces, and the items are separated by semicolons. You can have as many entries here as you like.
  • Below the X-Ayatana-Desktop-Shortcuts= line, edit each shortcut groups. Each shortcut group should have the same name as in the Shortcuts list. The Name= line contains the menu text you want to see when right clicking the launcher. In Exec= put the full path to the appropriate accounts file (preceded by the path to the GnuCash binary if needed).
  • When you are through editing, in the file manager right click the file and select Properties > Permissions and select Allow Executing file as Program.

[Note that now if you want to edit this file again You won't be able to edit this it using the file manager as Nautilus will insist on just running it. You will have to open it from a terminal using:

 gedit ~/.local/share/applications/gnucash_with_shortcuts.desktop 
  • Double click the file in nautilus and if you don't have any errors the file should take on the GnuCash icon and clicking it should cause the GnuCash icon to appear in the launcher and the application will open your default accounts file. Right click the icon and notice below your new menu items you need to select the option "Lock to Launcher." With the icon locked it will remain in the launcher when you close GnuCash and you should be able to right click and choose the additional menu links that you added.

Sources

https://lists.gnucash.org/pipermail/gnucash-user/2013-February/047607.html

https://help.ubuntu.com/community/UnityLaunchersAndDesktopFiles