How do I edit a theme?

I want to change the Usermin :20000 login page to say something like:

"Complete email address required for login to "

I downloaded the Authentic Theme as a .gz in my browser. I found two likely files, “theme.info” (which contains “Authentic Theme”… I hoping to name the something else so as not to break the original if a fix for “Automatically try appending domain name to usernames?” turns up) and “en” which contains the text but the edited versions appear to save in 7zip on Windows but then do not.

The .gz file itself contains only one file, and .ubt file (which acts like a folder in 7zip, but can be directly edited with notepad as well). The text I want to change is there as well (at least the login text is, I would be unlikely to know how to rename the theme) but I can’t save that either (it gives me an error about the file being opened by something else).

I can extract the .ubt file and edit it but 7zip doesn’t zip back to .gz. It does to .tar though, but the Install Theme won’t accept it (it says “:File does not appear to contain any modules”. I can upload the edited .ubt file directly but it says “: Not a valid module file : tar: This does not look like a tar archive tar: Skipping to next header tar: Exiting with failure status due to previous errors”.

Is there a guide somewhere to making or editing themes? (It’s such a small change I was sure I’d be able to just make a slightly altered version of the original and switch to it for now.). Would I have better luck using gzip on the Ubuntu itself?

Thanks.

SYSTEM INFORMATION
OS type and version Ubuntu 24.04.1
Virtualmin version 7.20.2

For a minor text change, you shouldn’t do a whole new theme. You can just use a custom-lang file in the relevant module or theme directory in /etc/usermin or /etc/webmin to override some text.

e.g. here’s one discussion of how to do that: https://github.com/webmin/authentic-theme/issues/639#issuecomment-271138852

Thanks, that worked good.

In case anyone comes back looking for this later the basic idea is to pick lines out of your theme’s language file and make a cust-lang file (in a different folder) with your altered text. This will survive updates (editing the language file directly will not).

Differences between the original post and now are that the language file is:

/usr/share/webmin/authentic-theme/lang/en

(not “en.UTF8” as in the link)

And in my case it was the usermin login that I wanted to alter, not the webmin login, so the post says to:

echo “theme_xhred_titles_wm=Supermin” > /etc/webmin/authentic-theme/custom-lang

I changed the “login_message” but more importantly in the usermin version of the the login not the webmin one, so:

echo “login_message=Complete email address required to login to” > /etc/usermin/authentic-theme/custom-lang

(I would not post to a “Solved” issue, but I am not proud of how long it took me to realize that /etc/webmin does not equal /etc/usermin, so if I could spare someone else similarly slow-on-the-uptake I figured it was worth it.)

1 Like

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.