XrXca - 2014-10-19

Maintaining multiple machines is much easier if you can tell what machine your current tab is without having to hover over the tab itself, with multiple tabs open the tabs aren't wide enough for the hostname to be visible (never mind running in an environment where there are no tabs or titlebar)

So we've patched the blue and gray themes to add the hostname above the username in the left panel.

We've only patched the english language file so the left_host would need to be added to the other language files....

diff -rupN webmin/blue-theme/lang/en webmin-new/blue-theme/lang/en
--- webmin/blue-theme/lang/en   2014-10-19 13:11:46.233076452 -0600
+++ webmin-new/blue-theme/lang/en       2014-10-19 13:09:10.845074889 -0600
@@ -1,3 +1,4 @@
+left_host=Host: $1
 left_login=Login: $1
 left_home=System Information
 left_oc=Sponsored by OpenCountry
diff -rupN webmin/blue-theme/left.cgi webmin-new/blue-theme/left.cgi
--- webmin/blue-theme/left.cgi  2014-10-19 13:11:52.489076515 -0600
+++ webmin-new/blue-theme/left.cgi      2014-10-19 13:15:56.181078967 -0600
@@ -53,6 +53,9 @@ else {
 <body>
 EOF

+# Show hostname
+print &text('left_host', &get_system_hostname()),"<br>\n";
+
 # Show login
 print &text('left_login', $remote_user),"<br>\n";

diff -rupN webmin/gray-theme/lang/en webmin-new/gray-theme/lang/en
--- webmin/gray-theme/lang/en   2014-10-19 13:12:00.513076596 -0600
+++ webmin-new/gray-theme/lang/en       2014-10-19 13:10:10.169075486 -0600
@@ -1,3 +1,4 @@
+left_host=Host: $1
 left_login=Login: $1
 left_home=System Information
 left_oc=Sponsored by OpenCountry
diff -rupN webmin/gray-theme/left.cgi webmin-new/gray-theme/left.cgi
--- webmin/gray-theme/left.cgi  2014-10-19 13:12:11.209076704 -0600
+++ webmin-new/gray-theme/left.cgi      2014-10-19 13:15:44.645078851 -0600
@@ -53,9 +53,10 @@ else {
 <body>
 EOF

-# Show login
+# Show hostname and login
 print "<div class='wrapper'>\n";
 print "<table id='main' width='100%'><tbody><tr><td>\n";
+print &text('left_host', &get_system_hostname()),"<br>\n";
 print &text('left_login', $remote_user),"<br>\n";
 print "<hr>\n";