Cairo-Dock / cairo-dock-core

Core part of Cairo-Dock project.
http://glx-dock.org
GNU General Public License v3.0
191 stars 47 forks source link

Launchers not being saved on restart. #41

Closed HighValueWarrior closed 1 month ago

HighValueWarrior commented 1 month ago

Hello, When adding launchers they are listed but upon restart they are not saved to .config/cairo-dock/current_theme/launchers/

Arch linux, KDE. Same behaviour mulitiple machines.

dkondor commented 1 month ago

Hi,

thank you for reporting! What can happen if Cairo-Dock cannot find a .desktop file of a launcher on startup, it will delete the launcher. However, this should not happen if you're able to create the launcher, since that usually requires identifying a valid .desktop file. So there seems to be some issue with either identifying the correct .desktop file or with saving or loading the launcher.

Would you be able to test the following?

Also, which version of Cairo-Dock are you using? (I had a bug with creating / reading launchers before, but that was in a development version) If it's the beta, do you know if this was this working before?

Does this happen for any app or only some specific type (e.g. installed from source, installed only for one user, installed with Flatpak or Snap, etc.)?

HighValueWarrior commented 1 month ago
When you create the launcher, is it added under .config/cairo-dock/current_theme/launchers/? (this should happen immediately)     

Yes

When you exit Cairo-Dock, is the launcher still there?

Only if the original desktop link is still on desktop - otherwise deleted on restart of cairo dock

Whenever the launcher is there, does it contain a line with Origin= and if yes, is the value correspond to a .desktop file that actually exists? Yes, however if you delete the desktop file, obviously that link will not be there.

Also, which version of Cairo-Dock are you using? (I had a bug with creating / reading launchers before, but that was in a development version) If it's the beta, do you know if this was this working before? Latest version

Does this happen for any app or only some specific type (e.g. installed from source, installed only for one user, installed with Flatpak or Snap, etc.)?
All my apps are from arch repos or aur.

Looking at the config file, it would appear that it is looking for the links on the desktop. I create the links and then drag them to the dock, as this is the only way I can add apps quickly. This seems counter intuitive. If I have a link on the desktop why would I need a dock ??

dkondor commented 1 month ago

Hi,

thanks for explaining, now I understand the problem. The main issue is that to have a launcher (unless you create it as a "custom launcher"), you need a .desktop file somewhere, so if you delete it, the launcher will typically not work (and is removed). Previously, if you deleted a .desktop file, but it was still present somewhere on the system, Cairo-Dock would often be able to find it, but this functionality was disabled in a recent refactor. I'll look into re-enabling this, which would solve your problem.

On the other hand, there are alternative ways for adding launchers which you might find even more comfortable :)

I hope these work while the original issue is resolved.

dkondor commented 1 month ago

I've created #43 that should fix this. It would be great if you could test. Also, let me know if you have any issues with the alternate methods for adding launchers.

HighValueWarrior commented 1 month ago

Daniel, unfortunatly the fix did not work. Desktop links once deleted still disappear from the dock.

I was always bummed about not being able to drag and drop as before in X11. Fortunately the applications menu method works great.

dkondor commented 1 month ago

Thank you for testing, that's weird -- I'll do more tests then to try to reproduce your issue again. I'm aware of issues with drag and drop, but this will probably take longer to fix (although I would like to do so before the next stable release)

dkondor commented 1 month ago

Hi, unfortunately, I still cannot reproduce this after applying my proposed fix (that I've now merged to the main branch). If you still experience this problem, it would be great if you could provide a bit more detailed test case (example of an app for which this happens, original location of its .desktop file, etc.). Thank you!

HighValueWarrior commented 1 month ago

Daniel after latest update, everything seems good. Followed my previous methodology and launchers did not dissappear. Thanks for the quick fixes !

dkondor commented 1 month ago

Great, thanks for testing!