[fpc-pascal] programmatically creating desktop icons under Linux
This question is specific to a PC running Kubuntu 9.1 64-bit with a KDE 4.1 desktop. I have a large number of PDFs. Their filenames are not meaningful, but I do have a list of filename versus contents. I'd like to be able to read that list and create a bunch of desktop icons using the contents as the name of each icon, and where clicking on the icons invokes okular to read the PDF. I haven't been able to find anything about creating such an icon programmatically from Free Pascal. Can anyone point me in the right direction? Thanks, Brian. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] programmatically creating desktop icons under Linux
On Sun, 07 Feb 2010 13:31:15 -0500, brian wrote: > This question is specific to a PC running Kubuntu 9.1 64-bit with a > KDE 4.1 desktop. > > I have a large number of PDFs. Their filenames are not meaningful, but > I do have a list of filename versus contents. > > I'd like to be able to read that list and create a bunch of desktop > icons using the contents as the name of each icon, and where clicking > on the icons invokes okular to read the PDF. I haven't been able to > find anything about creating such an icon programmatically from Free > Pascal. > > Can anyone point me in the right direction? Just create a link to those files with the desired filename in $HOME/Desktop This works with GNOME too. If you want to create those links as Plasma-Widgets, you have to chnage the Plasma config files. Matthias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] programmatically creating desktop icons under Linux
On 7 February 2010 20:31, brian wrote: > > Can anyone point me in the right direction? Creating symbolic links (ls -s ) should suffice. But if you want to do it the "official" way by creating desktop shortcuts via the *.desktop files, then read the follow spec document. http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html For information on extending that idea and created menu entries in the Application menu, then following the next spec document. http://www.freedesktop.org/wiki/Specifications/menu-spec?action=show&redirect=Standards%2Fmenu-spec You can also install the xdg-utils (normally include with modern distros), which has helper scripts you can use to more easily setup mime-types, associated applications, menu and desktop icons. http://portland.freedesktop.org/wiki/XdgUtils With my current project, fpgInstall, which is a single file GUI setup/installer application build with fpGUI Toolkit, I am building in support to programmatically creating of desktop icons and menu entries. Unfortunately the project is not complete - thus I am not releasing the source code yet. -- Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] programmatically creating desktop icons under Linux
On 7 February 2010 23:42, Graeme Geldenhuys wrote: > > Creating symbolic links (ls -s ) should suffice. Typo, it should read: ln -s -- Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] programmatically creating desktop icons under Linux
On Sun, 7 Feb 2010 23:43:52 +0200, Graeme Geldenhuys wrote about Re: [fpc-pascal] programmatically creating desktop icons under Linux: > On 7 February 2010 23:42, Graeme Geldenhuys > wrote: > > > > Creating symbolic links (ls -s ) should suffice. > > Typo, it should read: ln -s Actually, there is a symlink() API that can be called without creating a separate address space for an external command. -- Regards, Dave [RLU #314465] === david.w.n...@ntlworld.com (David W Noon) === ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal