You are not logged in.
Pages: 1
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
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 .
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
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
Pages: 1
[ Generated in 0.007 seconds, 7 queries executed - Memory usage: 524.16 KiB (Peak: 531.56 KiB) ]