1. 服务器/VPS/主机用户Telegram电报群: https://t.me/openos
    黑群晖 Synology Telegram电报群: https://t.me/nasfan
    排除公告

群晖DSM7.x 每天自动更换登陆界面壁纸教程

本帖由 CCK2021-12-01 发布。版面名称:群晖 Synology DSM

  1. zc198702

    zc198702 New Member

    注册:
    2020-08-22
    帖子:
    5
     
  2. yxmlyl

    yxmlyl New Member

    注册:
    2022-05-16
    帖子:
    10
    谢谢楼主分享
     
  3. MRPigeon

    MRPigeon New Member

    注册:
    2022-07-24
    帖子:
    1
    谢谢楼主分享
     
  4. 1003968214

    1003968214 New Member

    注册:
    2022-07-24
    帖子:
    1
    来学习的,谢谢楼主的分享
     
  5. vicgeng

    vicgeng New Member

    注册:
    2020-09-22
    帖子:
    26
     
  6. Crudely5952

    Crudely5952 New Member

    注册:
    2022-07-25
    帖子:
    2
    感谢分享~谢谢楼主的分享
     
  7. quezhou

    quezhou New Member

    注册:
    2022-05-25
    帖子:
    11
    谢谢分享了
     
  8. Sadog

    Sadog New Member

    注册:
    2022-07-21
    帖子:
    4
    来学习的,谢谢楼主的分享
     
  9. SuperWong

    SuperWong New Member

    注册:
    2019-07-22
    帖子:
    9
    进来学习的。感谢楼主分享
     
  10. 执剑横秋

    执剑横秋 New Member

    注册:
    2021-03-20
    帖子:
    28
    DSM 7.1-42661 Update 4
    只是将default_login_background替换为default_wallpaper
    解决了新的只有登录界面,无桌面效果的问题

    代码:
    #如需收集每日美图去掉下面注释设置保存文件夹路径,在FileStation里面右键文件夹属性可以看到路径
    #savepath="/volume1/Config/wallpaper"
    #下载Bing图片
    pic=$(wget -t 5 --no-check-certificate -qO- "https://www.bing.com/HPImageArchive.aspx?format=js&idx=0&n=1")
    echo $pic|grep -q enddate||exit
    link=$(echo https://www.bing.com$(echo $pic|sed 's/.\+"url"[:" ]\+//g'|sed 's/".\+//g'))
    date=$(echo $pic|sed 's/.\+enddate[": ]\+//g'|grep -Eo 2[0-9]{7}|head -1)
    tmpfile=/tmp/$date"_bing.jpg"
    wget -t 5 --no-check-certificate  $link -qO $tmpfile
    [ -s $tmpfile ]||exit
    rm -rf /usr/syno/etc/login_background*.jpg
    cp -f $tmpfile /usr/syno/etc/login_background.jpg &>/dev/null
    cp -f $tmpfile /usr/syno/etc/login_background_hd.jpg &>/dev/null
    cp -f $tmpfile /usr/syno/synoman/webman/resources/images/1x/default_wallpaper/dsm7_01.jpg &>/dev/null
    cp -f $tmpfile /usr/syno/synoman/webman/resources/images/2x/default_wallpaper/dsm7_01.jpg &>/dev/null
    title=$(echo $pic|sed 's/.\+"title":"//g'|sed 's/".\+//g')
    copyright=$(echo $pic|sed 's/.\+"copyright[:" ]\+//g'|sed 's/".\+//g')
    word=$(echo $copyright|sed 's/(.\+//g')
    if  [ ! -n "$title" ];then
    cninfo=$(echo $copyright|sed 's/,/"/g'|sed 's/,/"/g'|sed 's/(/"/g'|sed 's/ //g'|sed 's/\//_/g'|sed 's/)//g')
    title=$(echo $cninfo|cut -d'"' -f1)
    word=$(echo $cninfo|cut -d'"' -f2)
    fi
    #将图片应用于登陆界面
    sed -i s/login_background_customize=.*//g /etc/synoinfo.conf
    echo "login_background_customize=\"yes\"">>/etc/synoinfo.conf
    sed -i s/login_welcome_title=.*//g /etc/synoinfo.conf
    echo "login_welcome_title=\"$title\"">>/etc/synoinfo.conf
    sed -i s/login_welcome_msg=.*//g /etc/synoinfo.conf
    echo "login_welcome_msg=\"$word\"">>/etc/synoinfo.conf
    #将图片保存到指定路径
    if (echo $savepath|grep -q '/') then
    cp -f $tmpfile "$savepath/$date@$title-$word.jpg"
    fi
    #清除临时文件
    rm -rf /tmp/*_bing.jpg