Migrating hotkeys and panel items

I have read previous topics on exporting settings but the answers say that all the configs related to Xfce per se are stored in ~/.config/xfce4 and ~/.local/share/xfce4, and it seems that hotkeys and panel items are stored elsewhere.

The situation:Trying to migrate my configuration from one pc to another. Copying ~/.config/xfce4 (I do not save sessions and I have looked in ~/.local/share/xfce4, seems there's nothing that I need there).

Most setting get transferred, but the hotkeys and panel items do not. E.g. I reassigned hotkeys "Move window" and "Resize window", but on the new pc after trying to migrate the settings I still get default hotkeys for them (and other actions).

With panel items: I have them in the following order - Whisker menu, Workspace switcher, Window buttons, Xfce4 timer, the rest. After trying to migrate the settings I still have the panel items in the default order and in default composition, i.e. no Xfce4 timer.

So, could anyone tell where are these setting stored, or if they are stored in ~/.config/xfce4 why aren't they are applied on the new system?

I think I need to add that I have all the needed plugins installed on the new system. Also, I'm using Manjaro and Xfce 4.12.

Re: Migrating hotkeys and panel items

Hello and welcome.

When you copy the settings over from one account to another, are you currently logged out of both accounts? Xfce stores some stuff in memory and commits it to disk on logout. Also, are you checking ownership of the files once copied over to ensure that the new user owns them all?

I just created two users in an Arch vm, configured user1 as per your info about and logged out. From the command console, I copied over the ~/.config/xfce4 folder and ensured that user2 was the owner of all the files once copied over, logged in as user2 and the environments looked identical (including re-mapped shortcut keys and the included xfce4-timer with configured timers).

Re: Migrating hotkeys and panel items

Hm, maybe that's it - I logged out on the target machine before unarchiving the settings because I thought that the active session can mess up new settings, but I wasn't logged out on the source machine when I archived them. I'm gonna try it now and write about the results.

Re: Migrating hotkeys and panel items

It didn't help. I checked out permissions and I own the copied files on the target system. While I was at it this time I also opened the copied ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml (am I right that this is the file for shortcuts?) and my shortcuts were actually _there!_ But they didn't have any effect. The system was reacting only to the default shortcuts and when I opened xfwm4-settings, in the Keyboard tab were listed default settings, not mine. And at the same time the file is where it needs to be and the permissions are right. I can't get it.

Re: Migrating hotkeys and panel items

I have created a couple new users, experimented a little. With the first new user I by mistake logged in into Xfce session when I created him. Then logged out, logged into IceWM session and tried to copy the config. Logged out of IceWM, entered an Xfce session: the same result - no redefined shortcuts, no customized panel.

With the second user I logged into IceWM session right after creating him, and everything went fine. I started digging and found out what was the problem: as soon as ~/.config/xfce4 directory (or some file in it, I don't know) is created, xfconfd gets loaded even if you are not in Xfce but in some other session! When xfconfd is in memory it prevents the copied config files from taking effect. But you can replace your config even from inside Xfce session if you first kill xfconfd.

So the problem was that xfconfd was in memory even in other (not Xfce) sessions. I think I should report it as a bug. Of course, it is supposed to protect the Xfce config, but what is it doing outside Xfce session? As I said, even when I was logged into IceWM, xfconfd got loaded into memory just as soon as I copied ~/.config/xfce4 directory into place!

Could anyone please tell me if they observe this behaviour on their system? I would like to know whether it's a general Xfce problem or just my distro, so that I know where to report this bug.

Re: Migrating hotkeys and panel items

Ah yes, I remember this issue. There is a thread over in the Arch forums that talks about this and provides a couple of workarounds. When you log out, some processes are not killed (xfconfd being one of them). Looks like it's a systemd feature in case you need to run apps like screen or tmux.

One workaround is to set "KillUserProcesses=yes" in /etc/systemd/logind.conf to force systemd to kill all user processes when you log out.

A second involves terminating all user processes with "loginctl terminate-session ....." during log out. Since I don't use screen or tmux, I opted for option #1.