Xfce Forum

Sub domains
 

You are not logged in.

#1 2019-02-15 00:06:01

spaz
Member
Registered: 2019-01-06
Posts: 2

Backup all XFCE config files ( Keyboard Shortcuts etc )

Hi all.
Excuse my ignorance of this topic.
I am just wondering if there is a way to backup / export all XFCE config settings (particularly all the window manager shortcuts I have created ).

If it is in the documentation, I don't seem to be able to find it easily.

As I am quite new to linux,
I am doing quite a few fresh OS installs + reinstalls, to find what works best on various systems / computers.
Thus, I it gets bothersome to have to keep spending 15 minutes punching in the same keyboard shortcuts and various other settings each time.

I am aware of "Panel switch", but this only seems to export the panel settings as far as I can tell?

Thank you, sorry if the answer is obvious.

=====================

EDIT :
After a bit more digging , it looks like this in the FAQ.

"Q: How can I see a list of all the shortcut keys?
Use the following command, which will produce a nicely formatted text list to standard output:

xfconf-query -c xfce4-keyboard-shortcuts -l -v | cut -d'/' -f4 | awk '{printf "%30s", $2; print "\t" $1}' | sort | uniq
If you want to put this list into a file, add > filename at the end of command.

"

Okay, so I can export that to a file.
Is there a way I can edit this as a text file, and import this ?

Thanks !

Last edited by spaz (2019-02-15 00:22:57)

Offline

#2 2019-02-15 00:22:09

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,950

Re: Backup all XFCE config files ( Keyboard Shortcuts etc )

Hello and welcome.

See if this post helps. Feel free to ask any follow-up questions.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2019-02-15 08:20:24

Skaperen
Member
From: right by Jesus, our Saviour
Registered: 2013-06-15
Posts: 812

Re: Backup all XFCE config files ( Keyboard Shortcuts etc )

i backup my whole system.  2 copies of daily incremental go to AWS S3 and 3 copies of monthly incremental go to external USB drives that can also boot up a system (if the OS lost files,i can boot this up to do the restore in.

if you need to do a smaller backup, you can backup ${HOME}/Desktop and ${HOME}/.config to get all the critical files.

cd;tar bcfz 1 - Desktop .config >backup-settings.tar.gz

Offline

#4 2019-02-16 00:46:49

spaz
Member
Registered: 2019-01-06
Posts: 2

Re: Backup all XFCE config files ( Keyboard Shortcuts etc )

Hi ToZ.
Thanks for your response.
The answer you linked to is excellent but extremely broad, covering XFCE at large -- which will be very useful to me in future (and I will refer to it later -- Thanks !!).

What would be extremely helpful to me right now is just to export my keyboard shortcuts !!

Unless in your linked answer you mean copying the root config folder you mentioned.
I might give this a go.
It's a bit of a roundabout / obtuse way to do perform this action though.
Is there really not text editable importable / exportable config files for keyboard shortcuts in a simpler location?

I don't think it's a great idea for me to do too much digging around with root or enabling root access at present as I am an inexperienced user.

That said, today I am hoping to downgrade an Ubuntu machine from Cosmic to Bionic.
So, since I am canning this machine as it is, it shouldn't hurt too much for me to enable root and to give it a go.

Cheers

Last edited by spaz (2019-02-16 00:49:57)

Offline

#5 2019-02-16 01:38:05

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,950

Re: Backup all XFCE config files ( Keyboard Shortcuts etc )

There are two ways to backup and restore the keyboard shortcuts.

1. Overwrite the ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml. For this to work, xfconfd should not be running (it stores settings in memory and writes to this file on exist - which would overwrite your changes). The best way to do this is when you are not logged in. Also double check to make sure that xfconfd isn't running:

ps -ef | grep xfconfd

...as depending on the distro, it may not properly stop on logout.

2. Doing it live. Similar to your edit above, save your configurations like this:

xfconf-query -c xfce4-keyboard-shortcuts -lv > backup.txt

...then to restore, use a script like this:

#!/bin/bash

while read line
do
	xfconf-query -c xfce4-keyboard-shortcuts -p "$(echo $line | awk '{print $1}')" -s "$(echo $line | awk '{print $2}')" -n
done < backup.txt

This will go through your backup file and use xfconf-query to update each of the settings. Note that there is one array in this tree and you will get a warning/error message like this:

A value type must be specified to change an array into a single value.

You can ignore this because in all likelihood you will never change that one key (/providers) and it should always stay the same.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#6 2019-02-16 01:38:06

alcornoqui
Member
Registered: 2014-07-28
Posts: 831

Re: Backup all XFCE config files ( Keyboard Shortcuts etc )

I see at least these.

For the user:

~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml
~/.config/Thunar/accels.scm
~/.config/xfce4/terminal/accels.scm

System wide:

/etc/skel/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml
/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml
/etc/skel/.config/Thunar/accels.scm

Offline

Board footer

Powered by FluxBB