Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panel Icons change positions at boot even if locked #1456

Open
T-2 opened this issue Dec 2, 2024 · 20 comments
Open

Panel Icons change positions at boot even if locked #1456

T-2 opened this issue Dec 2, 2024 · 20 comments

Comments

@T-2
Copy link

T-2 commented Dec 2, 2024

Expected behaviour

When you add apps to the panel and move them around and then lock them I expect the next time you boot they would be where you put them.

Actual behaviour

They should stay where I put them

Steps to reproduce the behaviour

Brand new installations of Linux Mint MATE v22. Just add apps to the panel and move them around an lock them. Then reboot.

MATE general version

1.26.2

Package version

mate-panel 1.27.1-2build3 amd64

Linux Distribution

Linux Mint MATE 22

Link to bugreport of your Distribution (requirement)

linuxmint/linuxmint#736

New clean installs of Linux Mint MATE 22. Several machines not just one.
When 22 installs it puts the menu icon all the way to the left in the default bottom panel. Then it puts the show desktop app icon and then a separator. Then the other default app icons.
On most of the machines I move this around. First the Mint menu, then a separator, then the rest of the icons. I add other apps and arrange them the least used icons farthest left to the most used icons farthest right. The show desktop icon is usually the farthest right just left of the WindowsListApplet. When I get all the apps and the positions set I lock every one even the separators.
With all the machines that I do this to when I reboot the separator that was next to the mint menu moves right over an app or two. In addition some of the machines move the WindowsListApplet further left between other icons. So I diligently put everything back the way it was and lock them but the next time I reboot things move again. This goes on for about 6 or 8 reboots and then they stay where I put them. Like it heals itself.
To track this down I found out that I can output the mate-panel settings by doing dconf dump /org/mate/panel/ > ~/dconf-panel-settings in a terminal. You can look at that file and see each object settings including it's position. The order of the objects in that file are jumbled so it makes it difficult to see what is placed where.
So I enlisted Perplexity AI to write a python script to sort the objects first by panel, then by the relative-to-end setting, then by position left to right. When I looked at the resulting output of machines that were still dong this I can easily see what the problem is. There are identical duplicate objects and different objects with the same position setting.
So there is some bug in the mate-panel program having to do with either adding apps or moving them around that creates the problem objects. I can easily edit the settings in a text editor and re-import it back into mate-panel with dconf load /org/mate/panel/ < ~/dconf-panel-new. Once I do that everything says put.

@lukefromdc
Copy link
Member

This is a very old bug dating back to GNOME 2, some installs get this and some don't. Nobody has ever found the cause. Normally I'd suggest trying mate-panel --reset but you report getting this with a new install

@T-2
Copy link
Author

T-2 commented Dec 3, 2024

Well every machine I updated from Mint 21.3 to a fresh install of 22 did this if I modified the default panel. About a dozen machines. Previously I have never seen this in older versions of Mint. This is new.

The common apps I add to the default panel are Take Screenshot, xed, and Calculator. The default apps I leave there are Terminal, File Manager, and Show Desktop. Of coarse I leave the default Windows List, and all the way to the right the Notification Area, and Clock.Maybe you can set up a machine to see if you can duplicate this there?

Also it may be unrelated but the other thing that is new to Mint 22 is the nm-applet that displays the network icon disappears from time to time if you click on it to change something like activate a VPN. It still does what you want but the icon goes away on the panel. Not every time however. I created a desktop icon shortcut that starts nm-applet back up so I get it back. So i appears to be crashing.

We still get the intermittent duplication of the Network icon and the Volume icon that has been present for several versions of Mint.

I hope some of this can help you in tracking down what is happening.

@T-2
Copy link
Author

T-2 commented Dec 3, 2024

Are you interested in my python script to sort the objects from the dconf file? Makes finding the problem easier. It is only tested on panels that are at the bottom both on single and dual monitors.

@lukefromdc
Copy link
Member

lukefromdc commented Dec 3, 2024 via email

@T-2
Copy link
Author

T-2 commented Dec 3, 2024

OK, so how do you test your app for other disto's? Do you leave that to the distro's themselves?

@lukefromdc
Copy link
Member

lukefromdc commented Dec 3, 2024 via email

@T-2
Copy link
Author

T-2 commented Dec 3, 2024

OK. I did post this on the linuxmint Github forum but have not heard back yet.

@T-2
Copy link
Author

T-2 commented Dec 4, 2024

What distro do you use to test your code?

@lukefromdc
Copy link
Member

lukefromdc commented Dec 5, 2024 via email

@T-2
Copy link
Author

T-2 commented Dec 5, 2024

Can I send you a basic panel layout and you can test something for me on your distro? I discovered a way to repeatedly duplicate the problem.

@lukefromdc
Copy link
Member

lukefromdc commented Dec 6, 2024 via email

@T-2
Copy link
Author

T-2 commented Dec 9, 2024

I agree. When I started to play with this system, I first did a dconf dump /org/mate/panel/ > ?????? and saved all my custom settings to a back up file so I could restore what I had when I was done.

I have enclosed the default Linux Mint Mate 22 dconf dump file you could use as a template. I realize your applets will be different but what is important the position settings be spaced only 10 pixels apart. Mint has the main menu icon at position 0, the show desktop app at position 10 and a separator at position 20, then some more. In the gui when you just unlock the show desktop and the separator and then move the separator to the left of the show desktop and re-lock them is where it creates the error. On the default Mint desktop it assigns the separators new position to 32! It should either swap the positions for these or change the position number of the separator to 5. Interestingly the default panel height for Mint is 27. 27 + 5 is 32.

If you then do a mate-panel --replace or reboot your mate panel app dutifully places the icons in the position order. Which is not where you placed them with the gui.

@T-2
Copy link
Author

T-2 commented Dec 9, 2024

lm_orig.txt

@lukefromdc
Copy link
Member

lukefromdc commented Dec 9, 2024 via email

@T-2
Copy link
Author

T-2 commented Dec 9, 2024

You probably cannot use it directly as the apps are different on your distro. It's just an example.
In your test user can you create a bottom panel and set your standard menu app all the way to the left. Then if you have a show desktop app put that next. Then if you have a separator put that next. Then put a couple other apps.
Then do the dconf dump /org/mate/panel/ > ????? command to get what the settings did. Then edit that file and set the position of the default menu to 0. The show desktop to 10. The separator to 20. And the next one to 30 and so on. 10 pixels apart. Save that and do a dconf load /org/mate/panel/ < ????? to get your changes into the panel. Then open a terminal and do a mate-panel --replace. The panel layout should be unchanged. Then with the gui move the separator to the left of the show desktop icon. Then do mate-panel --replace again and see if they move or stay put.

@lukefromdc
Copy link
Member

lukefromdc commented Dec 11, 2024

I think what you are doing wrong is attempting to set icon positions closer together than the width of the icons. None of them are ever smaller than 16px, so when they come up overlapping they are pushed apart. Trying to set any panel items overlapping is thus not normally a valid test. When you drag them manually into contact with each other they should be exactly the allocated icon width apart. If ever this gets recorded incorrectly it would be expected to cause the icons to move at next panel start, just as having something like the tray or the netspeed applet expand pushes other applets/icons back to make room for itself. Thus you may have accidently found one cause of this, though it may not be the only one.

Another notorious problem dating back to GNOME 2 has been that launchers from menu items or especially the desktop dragged to the panel on some not all installs may appear and disappear. I've not seen it in recent times, but I learned long ago to make launchers only by dropping from /usr/share/applications, from the main menu, or by making custom launchers.

@T-2
Copy link
Author

T-2 commented Dec 12, 2024

That 10 pixel spacing is provided by the Linux Mint devs and is the default when you install the OS. I suppose the Mint guys don't know that.

@lukefromdc
Copy link
Member

lukefromdc commented Dec 12, 2024 via email

@T-2
Copy link
Author

T-2 commented Dec 12, 2024

Yes all my testing shows it's relative to the left edge on a bottom panel.
OK did some more testing with the default MATE panel. I edited the settings in a text editor and spaced them 16 then a second time to 27 pixels apart. In both cases when I loaded them back in and used the gui to move the separator just to the right of the menu button and did a mate-panel --replace the icons also swapped back to where they were before the move.
Both times it set the position for the separator to 32 just like it did when the icons are spaced 10 pixels apart.
So it looks like the spacing between icons does not matter. If you want a separator to be the second icon you have to make sure your other icon positions are greater than 32.

@T-2
Copy link
Author

T-2 commented Dec 12, 2024

OK did some more testing. There is nothing special about the separator. The gui will not set the position of any app icon less than 32 next to the menu icon.
This leads to a work around from the gui. In the gui move all the icons except for the one you want next to the menu icon to the right giving a two icon width blank space between your second icon and the rest. So starting from the left you would have your menu icon then your next icon right up against the menu icon then a 2 icon blank space then the rest of your icons.
Then do the mate-panel --replace deal then move your icons back left to get rid of that 2 icon width blank space. Your icons will now stay where you put them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants