Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Custom login page themes

Featured Replies

  • 1 month later...
  • Replies 56
  • Views 22.7k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • 🛠️ Installation   Install using the bash script and the CA User Scripts Plugin   Add a new user script by clicking `Add new script`     Give it a name and clic

  • OMG!  THESE LOOK AMAZING!  I can't wait to try them out.  Seriously nice work @GilbN!

  • EPIC!!!!

Posted Images

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.

  • 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 👍

  • 1 month later...
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.

  • 2 weeks later...

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)

  • 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

  • 1 month later...

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.

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
  • 1 month later...

After I update to Unraid OS 6.10-rc4. The login page stopped working. Any known issues on this?

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.

Or check my two messages above, which are likely the issue. 🙂

Thanks  @Didstopiaworked again with 6.10.0-rc4 on both of my servers

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?

  • 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"?

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;
}

 

  • Author

What does it output when you just run the script. (Not in background) @jawattus

Edited by GilbN

  • 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

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

  • 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

  • Author

Pretty sure your forked repo is out of date using the script.  You are 440 commits behind. 

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?

  • 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. 

 raw

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.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.