How to change iPXE's and Advanced Menu's colors?
-
Hi,
i have customized the menu a bit but i cannot really figure out howto change colors:
This is my boot menu:
menu
item --gap – ----------------- VS Boot Menu -----------------
item gap
item bootlocal Festplatte booten
item --gap Image installieren
item --key 1 image1 Image … installieren
item --gap Betriebssystem installieren
item --key 7 win7 Windows 7 Unattended Setup
item --gap Partition/Image/Backup
item --key a acronis2013 Acronis True Image 2013
item --key p easeuspms EaseUS Partition Master Server
item --gap Recovery
item --key e erd2005 ERD Commander Windows XP
item --key d dart7 DaRT 7.0 Windows 7 Server 2008 R2
item shell iPXE Shell
item hostinfo Computer-Informationen
item --gap –
item return <—
choose --default Win7 --timeout 60000 target && goto ${target}:bootlocal
sanboot --no-describe --drive 0x80 || goto MENU:win7
initrd http://${fog-ip}/iso/win7.iso
chain memdisk iso raw ||
goto MENU:acronis2013
initrd http://${fog-ip}/iso/acronis2013.iso
chain memdisk iso raw ||
goto MENU:easeuspms
initrd http://${fog-ip}/iso/easeuspms.iso
chain memdisk iso raw ||
goto MENU:erd2005
initrd http://${fog-ip}/iso/erd2005.iso
chain memdisk iso raw ||
goto MENU:dart7
initrd http://${fog-ip}/iso/dart7.iso
chain memdisk iso raw ||
goto MENU:shell
shell ||
goto MENU:hostinfo
echo ||
echo ||
echo This computer : ||
echo MAC address…${net0/mac} ||
echo IP address…${ip} ||
echo Netmask…${netmask} ||
echo Serial…${serial} ||
echo Asset number…${asset} ||
echo Manufacturer…${manufacturer} ||
echo Product…${product} ||
echo BIOS platform…${platform} ||
echo ||
echo Zurueck mit beliebiger Taste ||
prompt
goto MENU:image1
kernel bzImage root=/dev/ram0 rw ramdisk_size=127000 ip=dhcp dns=192.168.178.54 web=${fog-ip}/fog/ consoleblank=0 loglevel=4 type=down img=test ftp=${fog-ip} imgType=n osid=7 storage=${fog-ip}:/images capone=1 imgFormat=2
imgfetch init.xz
boot || goto MENU:return
chain http://${fog-ip}/${fog-webroot}/service/ipxe/boot.php?mac=${net0/mac} ||
prompt
goto MENUautoboot[/CODE]
This is what it looks like:
[IMG]http://i.imgur.com/br4lNDy.png[/IMG]
[IMG]http://i.imgur.com/mB0uGx0.png[/IMG]
[IMG]http://i.imgur.com/1RNth63.png[/IMG]
What i found on iPXE Homepage is:
[url]http://ipxe.org/cmd/cpair[/url]
[IMG]http://i.imgur.com/sMJwQyR.png[/IMG][url]http://ipxe.org/cmd/colour[/url]
[IMG]http://i.imgur.com/4MGeoPY.png[/IMG]Who is familar with this?
Lets say i could find out howto use that in my advanced menu, howto use other colors in the normal pxe menu? i don’t know where the source is?Regards X23
-
It’s actually not very simple as you can probably tell.
Here’s how I do it: This chnages the color for the value known as “green”
[code]print “colour --rgb 0xff6600 2\n”;[/code]
In the advanced configuration, you don’t need to add the print, quotes, the \n, or the semicolo. You can just put
[code]colour --rgb 0xff6600 2[/code]
The text is done with the code:
If registered: These change the color for the default value of black
[code]print “colour --rgb 0x00ff00 0\n”;[/code]
OR
If not registered
[code]print “colour --rgb 0xff0000 0\n”;[/code]Again, the same rules apply that you don’t need the print, quotes, \n, or semicolon.
I think the most confusing part is that they use the --rgb but then you use hex color code to specify your colors.
The “matrix” works on a double system.
The foreground refers to the text while the background refers to the “behind” the text or highligh.
0 is the “main background”. The “single” digit numbers refer to the “default” colors in use.
The cpair is where things get interesting. This is where you specify how to use the colors your specified (or completely change them all)
The lines I use:
[code]print “cpair --foreground 7 --background 2 2\n”;[/code]What you would use:
[code]cpair --foreground 7 --background 2 2[/code]What it does:
It set’s the text color to while (ANSI number 7) and the background color to 2 which I reset above for highlighted text(–background 2 is the color I specified or in ANSI green) and the ending 2 specifies the “highlighted” text.I hope this helps.
-
[IMG]http://i.imgur.com/WjpdMwo.png[/IMG]
[url]http://fogproject.org/forum/threads/latest-development-fog.10556/page-5#post-33375[/url]I could manage the colors a bit in the meantime actually not for initial menu:
[IMG]http://i.imgur.com/E6wWgmq.png[/IMG]
[IMG]http://i.imgur.com/Ll9jQyu.png[/IMG]
In the lastest svn advanced.php i cannot see how the initial values for the pxe menu are defined, also i see the my custom background bg.png in first menu but no definition for it like in svn before 2077
[IMG]http://i.imgur.com/agy7nSd.png[/IMG]
Regards
-
You’ll notice that the colors and cpair’s all transfer over to the advanced.php menu. I removed the setting as they were unnecessary for the advanced menu.
Something did change, but I do not have to specify what and or why it happened, though I try to with my commit statements.
The file that this is all set in is fog/lib/fog/BootMenu.class.php
I’m currently working to implement a form of hooking for the boot menu that will allow you to customize all these things using a hook or plugin system as you see fit.
-
-
Hi,
i now got what i want, except the password dialog:
[IMG]http://i.imgur.com/UiWRNHB.png[/IMG]
[IMG]http://i.imgur.com/vmfTPrm.png[/IMG]
[IMG]http://i.imgur.com/4pGX1P0.png[/IMG]
Where to find the settings for the password dialog?
Regards X23
-
Hi,
here is my idea to give us more flexibility:
[IMG]http://i.imgur.com/l3q0dLb.png[/IMG]
Would be nice to have.
Regards X23