On Tue, May 06, 2014 at 06:36:47PM +0200, Kornel Benko wrote: > Am Dienstag, 6. Mai 2014 um 18:10:39, schrieb Enrico Forestieri > <[email protected]> > > On Tue, May 06, 2014 at 05:40:30PM +0200, Kornel Benko wrote: > > > > > > I have problems using lyx.desktop in the existing form. Changing all > > > paths to absolute cures it for me, but I am unsure about the effect it > > > may have on autoconf build. > > > > > > Also the .desktop here (on linux) has to have set the executable flag, > > > otherwise it is not usable. > > > > What? .desktop files are only useful for desktop environments and > > certainly they don't need to be executable. > > I can't help. On ubuntu, if I click on it under gnome-desktop, it simply did > not run. > All other .desktop files here _are_ 'executable'.
But you don't have to click those files. Rather, you should put them in ~/.local/share/applications, /usr/local/share/applications or /usr/share/applications (precedence is from left to right) and then maybe issue some commands. In Debian you should issue the command update-desktop-database, so it should be the same in Ubuntu. > > > I propose the appended changes. > > > > > > Kornel > > > > [...] > > > @@ -4,9 +4,9 @@ Type=Application > > > Name=LyX > > > GenericName=Document Processor > > > Comment=High level LaTeX frontend > > > -Exec=lyx@program_suffix@ %F > > > -TryExec=lyx@program_suffix@ > > > -Icon=lyx@program_suffix@ > > > +Exec=@install_prefix@lyx@program_suffix@ %F > > > +TryExec=@install_prefix@lyx@program_suffix@ > > > +Icon=@icon_prefix@lyx@program_suffix@ > > > StartupNotify=false > > > StartupWMClass=Lyx > > > Terminal=false > > > > This is the most wrong thing you could do. In this way you disallow > > having a script with same name early in the PATH for performing some > > customization or workaround bugs/deficiencies. > > > > Currently, without the full path in the .desktop file, when I click > > on a LyX document in the GUI, this is the command that is executed: > > > > --8<--------8<--------- > > $ cat ~/bin/lyx > > #!/bin/sh > > quoted="" > > while [ $# -ne 0 ]; do > > quoted="$quoted \"$1\"" > > shift > > done > > eval exec /usr/bin/lyx -geometry 910x870-4-7 $quoted > > --8<--------8<--------- > > > > Using a full path in the .desktop file would upset me ;) > > > > This worries me too. But even with the correct path, (which would make the > .desktop file working), the problem with the icon remains. > I simply don't know, where the icon should be installed in portable way. > (Copying e.g. to /usr/share/icons/hicolor/scalable/apps/ makes it working. > But is it portable?) I think there is no standard in the strict sense, but the directions here: http://freedesktop.org/wiki/Specifications/ seem to be followed. Same story for the icon. If you use an absolute path, you prevent customization. Maybe you should have a look at http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html -- Enrico
