November 5, 20214 yr This is fantastic, thanks very much. One issue with the instructions linking to the script. The casing on /css/ in the url is wrong and causes a 404.
November 5, 20214 yr Author 6 minutes ago, Goobaroo said: This is fantastic, thanks very much. One issue with the instructions linking to the script. The casing on /css/ in the url is wrong and causes a 404. Thanks Fixed the URLs 👍
December 23, 20214 yr On 9/10/2021 at 2:30 PM, Hegewisch said: Can't run the Login Themes under 6.10.0-rc1 any known issues? Marcell Just came across this theming stuff today. Apparently, it's not working under 6.10.0-rc2 either...or at least I can't get it to work.
January 6, 20224 yr Suddenly, login themes stopped working. Might this be related to some broken links? I seem to be able to access the .css on my browser (ie https://theme-park.dev/css/addons/unraid/login-page/retro-terminal/green.css) and I get the .css without problems. Same with the imported url https://theme-park.dev/css/addons/unraid/login-page/retro-terminal/retro-terminal-base.css But when I run the script, I get the default login screen (yes, I hace DISABLE_THEME="false" in the script). What I can't understand is that the theme login screen was working flawlessly for months, and suddenly it works no more. It's related to some problem on my server? (running v6.9.2)
January 6, 20224 yr Author 4 minutes ago, Carpe_Diem said: Suddenly, login themes stopped working. Might this be related to some broken links? I seem to be able to access the .css on my browser (ie https://theme-park.dev/css/addons/unraid/login-page/retro-terminal/green.css) and I get the .css without problems. Same with the imported url https://theme-park.dev/css/addons/unraid/login-page/retro-terminal/retro-terminal-base.css But when I run the script, I get the default login screen (yes, I hace DISABLE_THEME="false" in the script). What I can't understand is that the theme login screen was working flawlessly for months, and suddenly it works no more. It's related to some problem on my server? (running v6.9.2) This was the reason: https://github.com/GilbN/theme.park/releases/tag/1.6.9 You can fix it with using the latest version of the script: https://github.com/GilbN/theme.park/blob/master/css/addons/unraid/login-page/custom_login.sh
January 6, 20224 yr 5 hours ago, GilbN said: This was the reason: https://github.com/GilbN/theme.park/releases/tag/1.6.9 You can fix it with using the latest version of the script: https://github.com/GilbN/theme.park/blob/master/css/addons/unraid/login-page/custom_login.sh That solved the problem. Thanks! I have now realized that there are community themes inspired on infinity gems, i need to try them! 😍
February 24, 20224 yr Should this still be working? I'm on 6.10.0-rc2, however after the theme didn't seem to apply, I went digging and noticed something interesting about the login page itself. /usr/local/emhttp/login.php: <?php $docroot = $docroot ?? $_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp'; require_once "$docroot/webGui/include/Helpers.php"; // add translations extract(parse_plugin_cfg('dynamix',true)); $login_locale = $display['locale']; require_once "$docroot/webGui/include/Translations.php"; $var = parse_ini_file('state/var.ini'); $error = ''; if ($_SERVER['REQUEST_URI'] == '/logout') { // User Logout if (isset($_COOKIE[session_name()])) { session_start(); unset($_SESSION['unraid_login']); unset($_SESSION['unraid_user']); // delete session file session_destroy(); // delete the session cookie $params = session_get_cookie_params(); setcookie(session_name(), '', 0, '/', $params['domain'], $params['secure'], isset($params['httponly'])); syslog(LOG_INFO, "Successfull logout user {$_SERVER['USER']} from {$_SERVER['REMOTE_ADDR']}"); } $error = _('Successfully logged out'); } $result = exec( "/usr/bin/passwd --status root"); if (($result === false) || (substr($result, 0, 6) !== "root P")) include "$docroot/webGui/include/.set-password.php"; else include "$docroot/webGui/include/.login.php"; ?> See how at the bottom it it's including ".login.php"? Well, it turns out that this is the file that actually includes all the HTML/CSS/JS, however I'm not sure when this change was made, especially considering others are on the same Unraid version, yet for some reason it's working for them. In the meantime I'll see if I can just substitute the paths for the new/different login page, as I would assume the structure/styling of the login page hasn't changed much, if at all.
February 24, 20224 yr UPDATE: It worked! Here's the revised script, where I simply replaced all the hardcoded paths to login.php with an environment variable, then pointed said environment variable to the new/appropriate login page path. #!/bin/bash TYPE="retro-terminal" THEME="green.css" DOMAIN="theme-park.dev" #if you update the domain after the script has been run, You must disable and re enable JS or the whole theme. ADD_JS="true" JS="custom_text_header.js" DISABLE_THEME="false" #LOGIN_PAGE="/usr/local/emhttp/login.php" LOGIN_PAGE="/usr/local/emhttp/webGui/include/.login.php" echo -e "Variables set:\\n\ THEME = ${THEME}\\n\ DOMAIN = ${DOMAIN}\\n\ ADD_JS = ${ADD_JS}\\n\ JS = ${JS}\\n\ DISABLE_THEME = ${DISABLE_THEME}\\n" # Restore login.php if [ ${DISABLE_THEME} = "true" ]; then echo "Restoring backup of login.php" cp -p ${LOGIN_PAGE}.backup ${LOGIN_PAGE} exit 0 fi # Backup login page if needed. if [ ! -f ${LOGIN_PAGE}.backup ]; then echo "Creating backup of login.php" cp -p ${LOGIN_PAGE} ${LOGIN_PAGE}.backup fi # Use correct domain style case ${DOMAIN} in *"github.io"*) echo "Switching to github.io URL style" DOMAIN="${DOMAIN}\/theme.park" ;; esac # Adding stylesheets if ! grep -q ${DOMAIN} ${LOGIN_PAGE}; then echo "Adding stylesheet" sed -i -e "\@<style>@i\ <link rel='stylesheet' href='https://${DOMAIN}/css/addons/unraid/login-page/${TYPE}/${THEME}'>" ${LOGIN_PAGE} echo 'Stylesheet set to' ${THEME} fi # Adding/Removing javascript if [ ${ADD_JS} = "true" ]; then if ! grep -q ${JS} ${LOGIN_PAGE}; then if grep -q "<script type='text/javascript' src='https://${DOMAIN}/css/addons/unraid/login-page/" ${LOGIN_PAGE}; then echo "Replacing Javascript" sed -i "/<script type='text\/javascript' src='https:\/\/${DOMAIN}\/css\/addons\/unraid\/login-page/c <script type='text/javascript' src='https://${DOMAIN}/css/addons/unraid/login-page/${TYPE}/js/${JS}'></script>" ${LOGIN_PAGE} else echo "Adding javascript" sed -i -e "\@</body>@i\ <script type='text/javascript' src='https://${DOMAIN}/css/addons/unraid/login-page/${TYPE}/js/${JS}'></script>" ${LOGIN_PAGE} fi fi else if grep -q ${JS} ${LOGIN_PAGE}; then echo "Removing javascript.." sed -i "/<script type='text\/javascript' src='https:\/\/${DOMAIN}\/css\/addons\/unraid\/login-page/d" ${LOGIN_PAGE} fi fi # Changing stylesheet if ! grep -q ${TYPE}"/"${THEME} ${LOGIN_PAGE}; then echo "Changing existing custom stylesheet.." sed -i "/<link rel='stylesheet' href='https:\/\/${DOMAIN}\/css\/addons\/unraid\/login-page/c <link rel='stylesheet' href='https://${DOMAIN}/css/addons/unraid/login-page/${TYPE}/${THEME}'>" ${LOGIN_PAGE} echo 'Stylesheet set to' ${THEME} fi
April 11, 20224 yr After I update to Unraid OS 6.10-rc4. The login page stopped working. Any known issues on this?
April 11, 20224 yr 16 minutes ago, jawattus said: After I update to Unraid OS 6.10-rc4. The login page stopped working. Any known issues on this? Probably best to post this in the prerelease forum or general support.
April 15, 20224 yr Author Thanks @Didstopia, I've updated my script and added a check that switches the path automatically. https://github.com/GilbN/theme.park/blob/develop/css/addons/unraid/login-page/custom_login.sh Edited April 15, 20224 yr by GilbN
April 19, 20224 yr Thanks @GilbN and @Didstopia. I use a fork of the script and before I only needed to change de domain to thyselblaso.github.io. But this doesn't work anymore. Do I need to change other things in the script to let this work?
April 19, 20224 yr Author 2 hours ago, jawattus said: Thanks @GilbN and @Didstopia. I use a fork of the script and before I only needed to change de domain to thyselblaso.github.io. But this doesn't work anymore. Do I need to change other things in the script to let this work? When you run the script does it say "Switching to github.io URL style"?
April 19, 20224 yr 13 minutes ago, GilbN said: When you run the script does it say "Switching to github.io URL style"? No it only say this when I start the script in the background: Script location: /tmp/user.scripts/tmpScripts/Custom_unraid_loginscreen/script Now starting the script in the background This is my script: #!/bin/bash TYPE="retro-terminal" THEME="white.css" DOMAIN="thijselblaso.github.io" # If you update the domain after the script has been run, You must disable and re enable JS or the whole theme. ADD_JS="false" JS="custom_text_header.js" DISABLE_THEME="false" echo -e "Variables set:\\n\ THEME = ${THEME}\\n\ DOMAIN = ${DOMAIN}\\n\ ADD_JS = ${ADD_JS}\\n\ JS = ${JS}\\n\ DISABLE_THEME = ${DISABLE_THEME}\\n" IFS='"' set $(cat /etc/unraid-version) UNRAID_VERSION="$2" IFS=$' \t\n' LOGIN_PAGE="/usr/local/emhttp/login.php" # Changing file path to login.php if version >= 6.10 if [[ "${UNRAID_VERSION}" =~ ^6.10.* ]]; then echo "Unraid version: ${UNRAID_VERSION}, changing path to login page" LOGIN_PAGE="/usr/local/emhttp/webGui/include/.login.php" fi # Restore login.php if [ ${DISABLE_THEME} = "true" ]; then echo "Restoring backup of login.php" cp -p ${LOGIN_PAGE}.backup ${LOGIN_PAGE} exit 0 fi # Backup login page if needed. if [ ! -f ${LOGIN_PAGE}.backup ]; then echo "Creating backup of login.php" cp -p ${LOGIN_PAGE} ${LOGIN_PAGE}.backup fi # Use correct domain style case ${DOMAIN} in *"github.io"*) echo "Switching to github.io URL style" DOMAIN="${DOMAIN}\/theme.park" ;; esac # Adding stylesheets if ! grep -q ${DOMAIN} ${LOGIN_PAGE}; then echo "Adding stylesheet" sed -i -e "\@<style>@i\ <link rel='stylesheet' href='https://${DOMAIN}/css/addons/unraid/login-page/${TYPE}/${THEME}'>" ${LOGIN_PAGE} echo 'Stylesheet set to' ${THEME} fi # Adding/Removing javascript if [ ${ADD_JS} = "true" ]; then if ! grep -q ${JS} ${LOGIN_PAGE}; then if grep -q "<script type='text/javascript' src='https://${DOMAIN}/css/addons/unraid/login-page/" ${LOGIN_PAGE}; then echo "Replacing Javascript" sed -i "/<script type='text\/javascript' src='https:\/\/${DOMAIN}\/css\/addons\/unraid\/login-page/c <script type='text/javascript' src='https://${DOMAIN}/css/addons/unraid/login-page/${TYPE}/js/${JS}'></script>" ${LOGIN_PAGE} else echo "Adding javascript" sed -i -e "\@</body>@i\ <script type='text/javascript' src='https://${DOMAIN}/css/addons/unraid/login-page/${TYPE}/js/${JS}'></script>" ${LOGIN_PAGE} fi fi else if grep -q ${JS} ${LOGIN_PAGE}; then echo "Removing javascript.." sed -i "/<script type='text\/javascript' src='https:\/\/${DOMAIN}\/css\/addons\/unraid\/login-page/d" ${LOGIN_PAGE} fi fi # Changing stylesheet if ! grep -q ${TYPE}"/"${THEME} ${LOGIN_PAGE}; then echo "Changing existing custom stylesheet.." sed -i "/<link rel='stylesheet' href='https:\/\/${DOMAIN}\/css\/addons\/unraid\/login-page/c <link rel='stylesheet' href='https://${DOMAIN}/css/addons/unraid/login-page/${TYPE}/${THEME}'>" ${LOGIN_PAGE} echo 'Stylesheet set to' ${THEME} fi This is my white.css that I use: /*_____________________WHITE_THEME______________________*/ /* --body-before:#00ff771a; /* This is the background that creates the crt lines, background uses a transparency of 10% SET TO NONE TO REMOVE CRT EFFECT */ /* --body-after: #00ff7733; /* This is the background that creates the crt lines, background uses a transparency of 20% SET TO NONE TO REMOVE CRT EFFECT */ /* --body-animation: flicker; This is the background that flickers. SET TO NONE TO REMOVE THE FLICKER ANIMATION! */ /* --custom-text-header-animation: textflicker; /* SET TO NONE TO REMOVE THE FLICKER ANIMATION! */ @import url(https://thijselblaso.github.io/theme.park.edit/CSS/addons/unraid/login-page/retro-terminal/retro-terminal-base.css); :root { --main-bg-color:black; --body-before:#70d7f61a; --body-after: none; --body-animation: none; --logo: url(https://i.imgur.com/rLGePdW.png) center no-repeat; --text-color: #ffffff; --input-color: #ffffff; --link-color: #ffffff; --link-color-hover: #e68a00; --case-color: #ffffff; --button-text-color: #ffffff; --button-text-color-hover: #000; --button-color: #ffffff; --button-color-hover: #4caf50; --selection-color: #e68a00; --custom-text-header:#ffffff; --custom-text-header-shadow:#ffffff; --custom-text-header-animation: none; --input-font: 'Share Tech Mono', monospace; --text-font: 'Share Tech Mono', monospace; --loginbox-background-color: transparent; --text-shadow: 0 0 8px; --text-shadow-color: #000000; --box-shadow: 0 0 15px; }
April 19, 20224 yr Author What does it output when you just run the script. (Not in background) @jawattus Edited April 19, 20224 yr by GilbN
April 19, 20224 yr Author @jawattus you renamed the repo. the name must be "theme.park" when using a github.io domain. Assuming this is your repo https://github.com/thijselblaso/theme.park.edit
April 19, 20224 yr Author or change this part to reflect your name change # Use correct domain style case ${DOMAIN} in *"github.io"*) echo "Switching to github.io URL style" DOMAIN="${DOMAIN}\/theme.park" ;; esac
April 19, 20224 yr 2 hours ago, GilbN said: or change this part to reflect your name change # Use correct domain style case ${DOMAIN} in *"github.io"*) echo "Switching to github.io URL style" DOMAIN="${DOMAIN}\/theme.park" ;; esac Thanks for your help! I changed "DOMAIN="${DOMAIN}\/theme.park" to "DOMAIN="${DOMAIN}\/theme.park.edit" This is what I see when I run the script: Script location: /tmp/user.scripts/tmpScripts/Custom_unraid_loginscreen/script Note that closing this window will abort the execution of this script Variables set: THEME = white.css DOMAIN = thijselblaso.github.io ADD_JS = false JS = custom_text_header.js DISABLE_THEME = false Unraid version: 6.10.0-rc4, changing path to login page Switching to github.io URL style Adding stylesheet Stylesheet set to white.css but the login screen is not changed yet
April 19, 20224 yr Author 4 minutes ago, jawattus said: Thanks for your help! I changed "DOMAIN="${DOMAIN}\/theme.park" to "DOMAIN="${DOMAIN}\/theme.park.edit" This is what I see when I run the script: Script location: /tmp/user.scripts/tmpScripts/Custom_unraid_loginscreen/script Note that closing this window will abort the execution of this script Variables set: THEME = white.css DOMAIN = thijselblaso.github.io ADD_JS = false JS = custom_text_header.js DISABLE_THEME = false Unraid version: 6.10.0-rc4, changing path to login page Switching to github.io URL style Adding stylesheet Stylesheet set to white.css but the login screen is not changed yet check your browser console for any errors
April 19, 20224 yr Author Pretty sure your forked repo is out of date using the script. You are 440 commits behind.
April 19, 20224 yr 20 minutes ago, GilbN said: Pretty sure your forked repo is out of date using the script. You are 440 commits behind. okay I will delete the fork and make a new fork and I will not change the name. And I will only change the domain to "DOMAIN = thijselblaso.github.io" in the script. What is the right format for the domain? "DOMAIN = thijselblaso.github.io" is this correct?
April 20, 20224 yr Author 22 hours ago, jawattus said: okay I will delete the fork and make a new fork and I will not change the name. And I will only change the domain to "DOMAIN = thijselblaso.github.io" in the script. What is the right format for the domain? "DOMAIN = thijselblaso.github.io" is this correct? You can just update the repo through github btw. And yeah that works.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.