Backup and restore panel launchers [SOLVED]

Please post suggestions for improvement of Cinnamon on:
https://github.com/linuxmint/Cinnamon
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
n0body_special
Level 3
Level 3
Posts: 130
Joined: Sat May 16, 2009 3:00 pm

Backup and restore panel launchers [SOLVED]

Post by n0body_special »

-[TL;DR]
Where are cinnamon panel launchers saved? I want to back them up so I don't lose them again.

-----------------
Hi everyone
I use panel launchers A LOT. I'm on a productivity machine, I need repeated access to the same 20-25 programs, files and directories, time and time again during the day, and hate having to click so many times through menus or directories to get to them. So I usually create an auto-hiding second panel on top of the screen, and put my most-used applications and files there. Then I create another panel on my secondary screen, where I put the launchers that I use less frequently. I do that after every installation tediously, the hard way: by right-clicking on the panel laucher area -> creating the launchers -> filling in the command and the target file to be opened, selecting the appropriate icon -> dragging the launcher around until I find the best spot for it.

That's A LOT of work. Creating 20-25 launchers this way takes many hours, but then you are rewarded with incredible productivity. And it only has to be done once, right? Right, unless something goes wrong. And it did, when I upgraded from Mint 20.2 to Mint 21.1. The launchers were just gone. Needless to say, I was not happy to see that. I searched the mint forums and everywhere on the web for a simple answer on where these launchers are saved, but no simple answer whatsoever.

I found the launchers under ~/.cinnamon/panel-launchers. They are alive and well, but adding or removing launchers in this folders seem to have no effect at all on the panels. It seems that it's not used by cinammon (anymore?). So I did what was more time-effective: I just created everything from scratch.

So I have one simple question:

Where are these launchers saved? I want to back them up so I don't lose them again.
Last edited by LockBot on Sat Aug 05, 2023 10:00 pm, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Windows is the world's biggest virus.
UEFI is a Microsoft sponsored boot sector hijacker.
Android is the world's biggest spyware.
But most importantly: Google. Is. Skynet
User avatar
n0body_special
Level 3
Level 3
Posts: 130
Joined: Sat May 16, 2009 3:00 pm

Backup and restore panel launchers [SOLVED]

Post by n0body_special »

update: I found that I can quickly add the launchers to the panels from the start menu by just dragging them (custom launchers can be found in "other" submenu). So the problem will be solved if I can just restore my start menu items, instead those from the panel.

So an alternative question would be:
Where is ANY launcher in cinnamon menus or panel stored? And in what form?

It can't be that hard...
Last edited by n0body_special on Fri Feb 10, 2023 5:04 pm, edited 2 times in total.
Windows is the world's biggest virus.
UEFI is a Microsoft sponsored boot sector hijacker.
Android is the world's biggest spyware.
But most importantly: Google. Is. Skynet
vimes666
Level 6
Level 6
Posts: 1229
Joined: Tue Jan 19, 2016 6:08 pm

Re: Launchers in panels lost

Post by vimes666 »

You will find most of them in /usr/share.applications, ~/.local/share/applications and in ~/Desktop.
If you think the issue is solved, edit your original post and add the word solved to the title.
User avatar
n0body_special
Level 3
Level 3
Posts: 130
Joined: Sat May 16, 2009 3:00 pm

Backup and restore panel launchers [SOLVED]

Post by n0body_special »

Hi vimes666, thanks for answering.

I found the launchers are indeed saved in ~/.local/share/applications, and I can copy them anywhere on the system. However, changes to these launchers don't seem to affect the panels in any way. Adding or removing launchers from /.local/share/applications does not result in any change on the panels. So, in case I need to restore the launchers on the panel, copying the launchers in ~/.local/share/applications will have no effect; this directory is not useful for backup - restore purposes.

I found that exactly the same thing happens with /.cinnamon/panel-launchers directory.

Where is the actual information about the launchers position saved? Certainly not on the launcher files themselves (I opened a few with a text editor and found nothing).

Edit: I now understand that this info is saved in some sort of mystical database accessible only through the dconf command. However, all available instructions on the web are deprecated, seems like Cinnamon has undergone changes recently, rendering all advice on the web useless. I am no longer a fan of Cinnamon because of all this: open-source software should be simple, accessible, editable and serviceable.
Last edited by n0body_special on Fri Feb 10, 2023 5:18 pm, edited 1 time in total.
Windows is the world's biggest virus.
UEFI is a Microsoft sponsored boot sector hijacker.
Android is the world's biggest spyware.
But most importantly: Google. Is. Skynet
User avatar
n0body_special
Level 3
Level 3
Posts: 130
Joined: Sat May 16, 2009 3:00 pm

Backup and restore panel launchers [SOLVED]

Post by n0body_special »

After painstaking research, I figured out a solution to the problem and describing a solution for other people to find.

The cinnamon settings are saved in an internal database. You can see them with the command:
dconf dump / > your_file_name.txt
and then open the text file created.

There you can see all applications installed, all applets on the panels, cinnamon widgets etc. However, the buttons of the launchers themselves are NOT saved in this database. All that is saved is a reference that the applet "panel launcher" has been installed on the panel. The actual buttons themselves are an internal issue of the applet "panel launcher", Cinnamon has no idea what custom launchers you have created.

To save the launcher buttons for backup: right click on a button on the panel launcher -> applet preferences -> configure -> press the three lines button on the top right (more options) -> export to a file -> save the file. Note that this works ONLY for the panel launcher you initially right-clicked on. If you have more panel launchers, you have to repeat the process.

If you ever need to restore the buttons, right click on a button on the panel launcher -> applet preferences -> configure -> press the three lines button on the top right (more options) -> import from a file. Again, once for every panel launcher. I didn't actually try it (I don't want to mess with my buttons) but it should do the trick
Last edited by n0body_special on Fri Feb 10, 2023 5:14 pm, edited 1 time in total.
Windows is the world's biggest virus.
UEFI is a Microsoft sponsored boot sector hijacker.
Android is the world's biggest spyware.
But most importantly: Google. Is. Skynet
billyswong
Level 8
Level 8
Posts: 2185
Joined: Wed Aug 14, 2019 1:02 am

Re: Backup and restore panel launchers [SOLVED]

Post by billyswong »

Hi, those panel launchers you exporting are stored in ~/.config/cinnamon/spices/panel-launchers@cinnamon.org, each with its own .json file. If you open the .json file, you will see that the "default" value are using "firefox.desktop" and "nemo.desktop", with no need of custom launcher in ~/.cinnamon/panel-launchers. If you edit that launcher.json file manually, you can put launchers that are already in /usr/share/applications directly by referring to their names (ls /usr/share/applications), skipping creation of custom launchers from scratch.

ps. Cinnamon is storing the panel layout in dconf, but dumping the whole database just for the panel layout is overkill. Install dconf-editor, then navigate in it to /org/cinnamon/enabled-applets. Backing up that particular value is enough... if you only have one panel. Panel numbers and panel positioning are stored in /org/cinnamon/panels-enabled so backup that too if you created multiple panels.

ps2. There are also panel-zone-icon-sizes, panel-zone-symbolic-icon-sizes, panel-zone-text-sizes, panels-autohide, panels-height, panels-hide-delay, panel-show-delay that are modified together when I add a 2nd panel. So... yeah one may need to back them up too. Or if one can recreate panels through point&click by the "correct" order in the new computer installation, then one can reproduce their values without pasting them back in.
Locked

Return to “Cinnamon”