File problem

Colin Law clanlaw at googlemail.com
Sun Feb 3 12:02:01 EST 2013


On 3 February 2013 14:05, David Carlson <carlson.dl at sbcglobal.net> wrote:
> ...
> I am new to Ubuntu and I want to learn how you did that. Do you need
> Unity or can it be other desktops?  My Unity Launcher has grown to
> become unwieldy and for GnuCash drilling down through the Home folder
> looking for the files mentioned in this thread would also become tiresome.
>
> My test using a link on the desktop was a disaster when those backups
> appeared all over the desktop instead of staying in the data folder.

Yes you are right, that doesn't seem to work very well.  Try this.
First remove gnucash from the launcher if it is there already.  Then
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 file>
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=<Project_1>;<Project_2>;<Project_3>

[<Project_1> Shortcut Group]
Name=<the name to appear in the list on the launcerh>
Exec=gnucash <full/path/to/project1/accounts.gnucash>
TargetEnvironment=Unity

[<Project_2> Shortcut Group]
Name=<the name to appear in the list on the launcerh>
Exec=gnucash <full/path/to/project2/accounts.gnucash>
TargetEnvironment=Unity

[<Project_3> Shortcut Group]
Name=<the name to appear in the list on the launcerh>
Exec=gnucash <full/path/to/project3/accounts.gnucash>
TargetEnvironment=Unity


and replace the stuff in <..> with appropriate text (without the <>),
so half way down where it says Exec= put the full path to the accounts
file that you want opened if you just left click the launcher,  Where
is says X-Ayatana-Desktop-Shortcuts= then put a list representing the
projects (these names don't appear to the user).  No spaces.  You can
have as many entries here as you like.  Then below then for each
shortcut group put the name in again as shown and for Name= put the
string you want to appear when right clicking the launcher and in Exec
put the full path to the appropriate accounts file.

Then 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 you will have to do it
from a terminal using gedit ~/.local/share/.,,, you won't be able to
open it from nautilus as nautilus will insist on just running it.

Double click the file in nautilus and it should open your default
accounts file and it should appear in the launcher.  Right
click it and select Lock to Launcher.  Now it should stay there when
you close gnucash and you should be able to right click it and see the
links that you put in the file.

Colin



More information about the gnucash-user mailing list