Forum > General
Adding a Laz-built program to Ubuntu Favorites?
QEnnay:
Hi, I am leaving Mint (Upgrade crashed -- again) and installed Ubuntu 20.04.xx.
I have five programs I wrote with Lazarus and want to install them into the Ubuntu "Favorites" list on the Left side of the screen.
I installed Alacarte (menu manager) and added them in as new Items and they showed up in the "All" page. I click them and they launch fine, but there is no option to lock to the Favorites on the Left.
I did some searching and it was suggested to try making .desktop files and put them in the /usr/share/applications Folder and I did so. They too then showed up in the main "All" page, but none of them offered an "Add to favorites" option.
Currently back with Mint. Not sure if it is a Lazarus-build issue or a Ubuntu quirk, but thought I'd start here as the Alacarte install shows up with a "Add to favorites," option.
dbannon:
You don't mention which desktop you are using, you question is really a "Desktop Question".
If using the default Gnome (yek !) desktop and you want it to appear in the dock, typically down the left side, open the app in question, its icon appears in the dock, right click the icon and choose add to favourite.
If using one of the other desktops such as Mate, open the menu, right click the entry for the app in question and choose "pin to favourite".
If these don't work, you need to ask the Desktop people, its not a Lazarus issue I am afraid.
Davo
MarkMLl:
--- Quote from: dbannon on June 20, 2021, 02:34:14 am ---If these don't work, you need to ask the Desktop people, its not a Lazarus issue I am afraid.
--- End quote ---
Agreed. I think OP's "covered the bases" from the POV of anything that can be considered normal app installation: create a .desktop file, put it in the right place, check it appears in the menu system and works, the "missing link" being how to get it into the favourites list.
I'm not entirely surprised that whatever desktop environment OP's using has forgotten this, since several of them don't even have a program to create/edit .desktop files. However since these are standardised it might be that the location and behaviour of the favourites list is also standardised... not easy to grep for since I think names aren't saved as strict ASCII, some variant of one of the xdg-XXX programs might do it.
(Later) https://averagelinuxuser.com/ubuntu_custom_launcher_dock/ looks relevant:
"The application launcher will stay there after you close the app. That’s is the way to get a quick launcher for any app. However, this approach doesn’t work if you install an application not from the Ubuntu repository."
If that's the case and if the fix given works, then even if it's not a Lazarus problem it's something we need to be aware of.
MarkMLl
dbannon:
>> However, this approach doesn’t work if you install an application not from the Ubuntu repository.
> If that's the case and if the fix given works, then even if it's not a Lazarus problem it's something we need to be aware of.
I don't have time to fire up one of my Ubuntu Gnome VMs right now but I am absolutely sure that method does work for an app with a desktop file, in fact, I have in the past recommend that process for Gnome users as part of a workaround for Gnome's reluctance to show a SysTray icon, something I have a better solution for now. But I frequently tested the process using a Lazarus app.
There is nothing in a standard binary that is necessary for doing something like adding to favourites, thats a process a lot closer to the user than what goes on in a binary. So desktops do require an assigned icon to display as a menu at all and most "add to favorites" is a "manipulate the menu" process. Except, of course Gnome, the dock is not a menu but does use some menu infrastructure.
Some time ago I added a section about making a desktop file in the "Installing Lazarus on Linux" wiki page, its generally applicable. And, as Mark noted, quite easy.
Davo
MarkMLl:
--- Quote from: dbannon on June 21, 2021, 03:20:33 pm ---There is nothing in a standard binary that is necessary for doing something like adding to favourites, thats a process a lot closer to the user than what goes on in a binary. So desktops do require an assigned icon to display as a menu at all and most "add to favorites" is a "manipulate the menu" process. Except, of course Gnome, the dock is not a menu but does use some menu infrastructure.
--- End quote ---
There's nothing /in/ /the/ /binary/. However in the general case there might be POSIX capabilities stored in the associated inode, or there might be something in an SE-Linux configuration file. Or perhaps elsewhere: Linux is getting so fragmented and messy that nothing would surprise me.
--- Quote ---Some time ago I added a section about making a desktop file in the "Installing Lazarus on Linux" wiki page, its generally applicable. And, as Mark noted, quite easy.
--- End quote ---
Provided that ones distro-of-choice supplies an appropriate editor, which some don't. I've considered knocking one together using Lazarus in the past, but was discouraged by the amount of i18n involved.
MarkMLl
Navigation
[0] Message Index
[#] Next page