Xfce Forum

Sub domains
 

You are not logged in.

#1 2017-05-10 06:53:17

wuwei
Member
From: Italy
Registered: 2017-01-29
Posts: 38

[SOLVED] Keyboard Shortcuts

Hi, I'm working on a useful script collection for Debian Stretch, there is one that restores keyboard shortcuts from previous backup ($HOME/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml).

The script essentially do this:

COOL_DEBIAN_PATH="$PWD/personale"
BACKUPDATE=`date "+%d%m%y-%H%M"`

mv $HOME/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml $HOME/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts-$BACKUPDATE.xml
cp $COOL_DEBIAN_PATH/impostazioni/scorciatoie-tastiera/xfce4-keyboard-shortcuts.xml $HOME/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml

Is it possible with any command to reload configuration inside the script without reboot the system?

Thanks.

Last edited by wuwei (2017-05-10 15:58:49)

Offline

#2 2017-05-10 13:13:04

ToZ
Moderator
From: Toronto, Canada
Registered: 2011-06-02
Posts: 3,559

Re: [SOLVED] Keyboard Shortcuts

To get this to work, you need to kill both xfconf and xfsettingsd, replace the file, then start them back up again. They will retain the old settings in memory which is why you need to reboot/logout. Try this addition to your script:

COOL_DEBIAN_PATH="$PWD/personale"
BACKUPDATE=`date "+%d%m%y-%H%M"`

mv $HOME/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml $HOME/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts-$BACKUPDATE.xml 

kill -9 $(pidof xfconfd)
kill -9 $(pidof xfsettingsd)

cp $COOL_DEBIAN_PATH/impostazioni/scorciatoie-tastiera/xfce4-keyboard-shortcuts.xml $HOME/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml

xfsettingsd &
/usr/lib/xfce4/xfconf/xfconfd &

Note: double check the location of the xfconfd file on your computer .


How To Ask For Help           Xfce FAQ                            Xfce Release Information
The Xfce Community          Xfce Tips and Tricks

Offline

#3 2017-05-10 15:47:44

wuwei
Member
From: Italy
Registered: 2017-01-29
Posts: 38

Re: [SOLVED] Keyboard Shortcuts

In fact, for the Debian Stretch the path for xfconfd is:

/usr/lib/x86_64-linux-gnu/xfce4/xfconf/xfconfd

Anyway all is working like expected...
Thanks a lot!

Offline

Board footer

Powered by FluxBB