Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2020-05

Icon program cannot be set as favorite in Ubuntu 18.04

3 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

shoKwave
to Maurício Camargo

Hi,

I don't have a Ubuntu running currently, but I could imagine you run your binary directly. You should try to create a .desktop file and run your application that way.

A .desktop file is a simple textfile whitch contains some metainformation (like a .lnk on Windows) and looks like this.

[Desktop Entry]
Name=Lazarus Installation Manager
Comment=Manage different Lazarusinstallations
Exec=/home/ingo/dev/lim/lim %U
StartupNotify=true
Terminal=false
Type=Application
Icon=/home/ingo/dev/lim/icons/Logo100x100.png
Categories=Development;

On ElementaryOS storing the file in ~/.local/share/applications creates an entry in the menu and if I run my app that way I can fix it in the dock.

Hope this helps.

Ingo

Maurício Camargo wrote 7 lines
Hi. I note that in Ubuntu the icon program in the launcher does not have "Add to favorites". How can I fix my program in the bar? Thanks. Maurício

Reply by email

Bo Berglund
to Maurício Camargo: Hi. I note that in Ubuntu the icon program in the launcher does not have "Add to…
Maurício Camargo wrote 6 lines
Hi. I note that in Ubuntu the icon program in the launcher does not have "Add to favorites". How can I fix my program in the bar? Thanks. Maurício

Create a "desktop" text file:

~/.local/share/applications/lazarus_2.0.8.desktop
(change the version number to suit)

In this file put this (the example is what I have on an RPi4 with Raspbian Buster):

[Desktop Entry]
Comment=Lazarus IDE 2.0.8
Terminal=false
Name=Lazarus 2.0.8
Exec=/home/pi/dev/lazarus/2.0.8/startlazarus
--pcp=/home/pi/.lazarus_2.0.8 %f
Type=Application
Icon=/home/pi/dev/lazarus/2.0.8/images/ide_icon48x48.png Categories=Application;IDE;Development;GTK;GUIDesigner;Programming; NoDisplay=false
Keywords=editor;Pascal;IDE;FreePascal;fpc;Design;Designer;

All lines start with keyword= and if the view above does not show that then the line has been wrapped down.

Notice that the paths in my example refers to my installation inside the pi home, on yours you have to adapt it to your situation.

Also notice the use of the --pcp argument, it is needed if you run more than one version of Lazarus on your system (I have 4).

Bo Berglund Developer in Sweden

Reply by email