Koozali.org: home of the SME Server
Obsolete Releases => SME Server 9.x => Topic started by: julianop on June 16, 2018, 07:04:11 PM
-
How can I change the height of the combo box from which I select packages to install?
-
Note: This change will NOT survive a server update.
cd /etc/e-smith/web/functions
#
# create a backup of the original yum function
cp yum yum~
#
# add [size="10"] to the select windows on all yum functions
# (don't do this more than once...)
sed -i s/multiple\=\"1\"/multiple\=\"1\"\ size\=\"10\"/ yum
#
# set the setuid bit for the edited version of the yum function
chmod u+s yum
The updater will use the new select window size (10 in this example) the next time you load the page.
Undo these changes using:
cd /etc/e-smith/web/functions
cp -y yum~ yum
chmod u+s yum
Explanation:
server-manager uses FormMagick (http://cpansearch.perl.org/src/MITEL/CGI-FormMagick-0.89/lib/CGI/FormMagick.pm) to generate the various configuration screens.
The "sed -i" command above is adding a "size" declaration to each of the "select" windows in the "yum" panel. Each of these select windows already includes [multiple="1"] to indicate the multi-select is supported; we're adding [size="10"].
"chmod u+s" sets the setuid bit for the edited version of the yum panel; without this server-manager throws an internal server error.
--- /etc/e-smith/web/functions/yum~ 2018-06-16 14:30:00.065526258 -0400
+++ /etc/e-smith/web/functions/yum 2018-06-16 14:38:35.728250134 -0400
@@ -138,7 +138,7 @@
post-event="do_yum('update')">
<field
- type="select" multiple="1"
+ type="select" multiple="1" size="10"
id="SelectedPackages"
value="get_names('updates','package')"
options="get_options('updates','package')">
@@ -161,7 +161,7 @@
</field>
<field
- type="select" multiple="1"
+ type="select" multiple="1" size="10"
id="SelectedGroups"
display="non_empty('available','group')"
options="get_options('available','group')">
@@ -170,7 +170,7 @@
</field>
<field
- type="select" multiple="1"
+ type="select" multiple="1" size="10"
id="SelectedPackages"
display="non_empty('available','packages')"
options="get_options('available','package')">
@@ -193,7 +193,7 @@
</field>
<field
- type="select" multiple="1"
+ type="select" multiple="1" size="10"
id="SelectedGroups"
display="non_empty('installed','group')"
options="get_options('installed','group')">
@@ -202,7 +202,7 @@
</field>
<field
- type="select" multiple="1"
+ type="select" multiple="1" size="10"
id="SelectedPackages"
display="non_empty('installed','package')"
options="get_options('installed','package')">
@@ -237,7 +237,7 @@
</field>
<field
- type="select" multiple="1"
+ type="select" multiple="1" size="10"
id="SelectedRepositories"
options="get_repository_options()"
value="get_repository_current_options()">
-
Note: This change will NOT survive a server update.
cd /etc/e-smith/web/functions
#
# create a backup of the original yum function
cp yum yum~
#
# add [size="10"] to the select windows on all yum functions
# (don't do this more than once...)
sed -i s/multiple\=\"1\"/multiple\=\"1\"\ size\=\"10\"/ yum
#
# set the setuid bit for the edited version of the yum function
chmod u+s yum
The updater will use the new select window size (10 in this example) the next time you load the page.
Undo these changes using:
cd /etc/e-smith/web/functions
cp -y yum~ yum
chmod u+s yum
Explanation:
server-manager uses FormMagick (http://cpansearch.perl.org/src/MITEL/CGI-FormMagick-0.89/lib/CGI/FormMagick.pm) to generate the various configuration screens.
The "sed -i" command above is adding a "size" declaration to each of the "select" windows in the "yum" panel. Each of these select windows already includes [multiple="1"] to indicate the multi-select is supported; we're adding [size="10"].
"chmod u+s" sets the setuid bit for the edited version of the yum panel; without this server-manager throws an internal server error.
Thank you for this most helpful information, and for the excellent description of its operation. It did exactly what I wanted.
I've made a copy of the updated file and taken note of the command executed, so I can reinstate it (after doing a diff to identify any other changes, of course) after any upgrade. I don't do much command line work these days, so writing it down saves the strain on the memory.