From aff4753ade2862443b941dc3bb8b1544c72dd58b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A5=D0=B8=D1=80=D0=B5=D1=86=D0=BA=D0=B8=D0=B9=20=D0=9C?= =?UTF-8?q?=D0=B8=D1=85=D0=B0=D0=B8=D0=BB?= Date: Tue, 10 Nov 2015 14:51:09 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D0=B4=D0=B4=D1=80=D0=B5=D0=B6?= =?UTF-8?q?=D0=BA=D0=B0=20=D0=B0=D0=B2=D0=B0=D1=82=D0=B0=D1=80=D0=BE=D0=B2?= =?UTF-8?q?=20=D0=B4=D0=BB=D1=8F=20KDE5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/logout.d/95syncface | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/data/logout.d/95syncface b/data/logout.d/95syncface index 964796c..058ac11 100644 --- a/data/logout.d/95syncface +++ b/data/logout.d/95syncface @@ -16,18 +16,34 @@ # limitations under the License. # get icon face directory from kdm config -get_icon_face_dir() { +get_kdm_icon_face_dir() { local config_file=/usr/share/config/kdm/kdmrc [[ -f $config_file ]] && sed -rn 's/^FaceDir=(.*)/\1/p' $config_file } +get_sddm_icon_face_dir() { + local config_file=/etc/sddm.conf + if [[ -f $config_file ]] + if grep ^FacesDir $config_file &>/dev/null + then + sed -rn 's/^FacesDir=(.*)/\1/p' $config_file + else + echo /usr/share/sddm/faces + fi + fi +} + run_script() { - # copy .face.icon from user home directory to kdm face directory + # copy .face.icon from user home directory to kdm/sddm face directory if [[ $DOMAIN_USER == "off" ]] && [[ -f $HOME_DIR/.face.icon ]]; then - FACE_DIR=$(get_icon_face_dir) + FACE_DIR=$(get_kdm_icon_face_dir) if [[ -n $FACE_DIR ]] && [[ -d $FACE_DIR ]];then cp $HOME_DIR/.face.icon $FACE_DIR/${USER}.face fi + FACE_DIR=$(get_sddm_icon_face_dir) + if [[ -n $FACE_DIR ]] && [[ -d $FACE_DIR ]];then + cp $HOME_DIR/.face.icon $FACE_DIR/${USER}.face.icon + fi fi return 0 }