Jump to content











Photo
* * * - - 1 votes

Configurable gfxmenu


  • Please log in to reply
27 replies to this topic

#1 Bean123

Bean123

    Member

  • Members
  • 30 posts

Posted 19 February 2009 - 10:20 AM

Gfxmenu is not easy to configure. The files are bundled in a cpio archive, and the control mechanism is inside a binary file init. It's relatively easy to make basic treak like changing background image, but it's impossible to make big changes, such as changing the menu position, without compiling it from source code.

To make it easier for normal user to do advanced treaking with gfxmenu, I've built a special message file whose behavior can be altered simply by editing the config file gfxboot.cfg. Currently, it understand the following options:

boot_show (default: 0)
if set to 1, show the "Boot Options" box. As grub4dos currently don't use this feature, it might be better to hide it.

xmenu_hide_current (default: 0)
if set to 1, hide the current selection item below the bottom menu.

menu_start_x, menu_start_y
Position of menu

menu_max_entries (default: 8)
Maximum number of menu entry to display.

menu_bar_min_width
The minimum width of menu select bar.

menu_text_normal
Normal text color, use RGB value such as 0xffffff.

menu_text_select
Color of selected text

boot_text_options
Color of boot options label

boot_text_normal
Color of boot options text

infobox_bg
Background color of info box

infobox_text_normal
Text color of info box

menu_bar_color
Color of menu bar

loading_color
Color of load bar

title_bg
Background color of dialog background

hide_reboot (default: 0)
If set to 1, hide the reboot button (F9)

hide_poweroff (default: 0)
If set to 1, hide the poweroff button (F10)

disable_num_key (default: 0)
This message file has added keyboard shortcut function, for example, pressing '1' would choose the first menu item. If you don't want it, set this variable to 1.

hide_help (default: 0)
If set to 1, hide the help button (F1)

hide_lang (default: 0)
If set to 1, hide the language button (F2)

custom_width, custom_height, custom_depth
By default, the screen resolution is 800x600x16, if you want a higher resolution, set these three variables, for example:
custom_width=1024
custom_height=768
custom_depth=16
The mode must be supported by bios, otherwise, it just fallback to default.

panel_normal
Color of panel text

panel_title
Color of panel title

panel_high
Color of panel hotkey (Fn)

panel_bg
Background color of panel pop-up box

panel_border
Border color of panel pop-up box

The above variables are contained in the sample gfxboot.cfg, but they're disable using the comment indicator #. To use them, remove the leading # and set the corresponding value.

Attached Files



#2 mr_

mr_

    Frequent Member

  • Members
  • 355 posts
  •  
    Germany

Posted 21 February 2009 - 05:27 PM

That's pretty cool but it's still a hell for me to edit the cpio archive, see http://www.boot-land...?...ewpost&f=15

If the effort isn't to high, would it be possible for you to get ride of cpio and to switch to a common easy simple read/write/edit-anywhere format like zip?

#3 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7100 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 21 February 2009 - 05:59 PM

Do I get it right that gfxboot.cfg is intended to be outside the cpio file (thus eliminating the need to open/modify the cpio archive)? :poke:

Should it go wherever (same directory) of the actual gfx-theme (as defined in menu.lst as gfxmenu=/whatever/gfx_theme)?

jaclaz

#4 mr_

mr_

    Frequent Member

  • Members
  • 355 posts
  •  
    Germany

Posted 21 February 2009 - 09:39 PM

No, you can open message_en and see it contains gfxboot.cfg.

I've downlaoded OpenSuse now because the gfxgrub-devel package (containing the tool to create smaller fonts is only inside their and gfxgrub has no real own homepage).

#5 Bean123

Bean123

    Member

  • Members
  • 30 posts

Posted 22 February 2009 - 06:55 AM

If the effort isn't to high, would it be possible for you to get ride of cpio and to switch to a common easy simple read/write/edit-anywhere format like zip?


Unfortunately, the choice of archive type is not up to grub4dos. gfxboot is like a standalone program, to use it properly, grub4dos must conform to its interface. So unless gfxboot developers decide to support zip, there is not much we can do.

However, we do have a option of supporting in memory replacement of files, for example, we could support a incremental gfxmenu_add command like this:

gfxmenu_add /message
gfxmenu_add /gfxboot.cfg
gfxmenu_add /back.jpg

#6 Iamnuts

Iamnuts
  • Members
  • 4 posts
  •  
    United Kingdom

Posted 28 February 2009 - 04:13 PM

This has been fantastic.

How did you manage to figure out so many or did you recompile it? None the less great work.

Ive been looking through the init file and the gfxboot.cfg, but I cant work out how to change the color of the F keys or the text after them.

Its a real shame as the background I wish to use is white, but the yellow hardly shows up of the fkeys and obviously the text after being white is totaly hidden.

Is there any chance you could assist? Ive not given up im still trying myself.

mtia

#7 Bean123

Bean123

    Member

  • Members
  • 30 posts

Posted 28 February 2009 - 04:46 PM

This has been fantastic.

How did you manage to figure out so many or did you recompile it? None the less great work.

Ive been looking through the init file and the gfxboot.cfg, but I cant work out how to change the color of the F keys or the text after them.

Its a real shame as the background I wish to use is white, but the yellow hardly shows up of the fkeys and obviously the text after being white is totaly hidden.

Is there any chance you could assist? Ive not given up im still trying myself.

mtia


The original message file uses fixed value, I modify the source code so that it would query gfxboot.cfg as well.

I've uploaded a new version of message that supports panel color, the color of fkeys are configurable via the panel_high variable.

#8 orions

orions

    Newbie

  • Members
  • 11 posts
  •  
    Vietnam

Posted 01 March 2009 - 11:23 AM

Hi its Iamnuts (im havving trouble logging in so im using a bugme login as orions to say thanks)

Many thanks for that, Im amazed at the speed at which you did that, thanks so much I can now use the white background I wanted. 5***** all the way mate.

Im going to be cheeky now, is it possible to be able to have a variable to change the wording of help to a word of choice.

cheers

#9 Bean123

Bean123

    Member

  • Members
  • 30 posts

Posted 02 March 2009 - 12:54 PM

Hi its Iamnuts (im havving trouble logging in so im using a bugme login as orions to say thanks)

Many thanks for that, Im amazed at the speed at which you did that, thanks so much I can now use the white background I wanted. 5***** all the way mate.

Im going to be cheeky now, is it possible to be able to have a variable to change the wording of help to a word of choice.

cheers


Well, it's possible to use variable, but it's best to modify the translation file *.tr. However, this file is binary format, so you need to use the source code.

I've uploaded the source code to:

http://grub4dos.sour...-3.3-custom.zip

To build it in windows, you can use my customized msys package:

http://grub4dos.sour...ge.net/msys.zip

Extract msys.zip, then click "Console.exe", you enter a command windows. cd to the gfxboot directory, and type "make".

The translation is in po subdirectory. bootloader.pot is the default translation (english). For example, to change the translation of help text, you need to locate txt_help and change the msgstr. After you have done, use make to create a new message_en.

BTW, the msys package can also be used to build grub4dos. I've added two script to simplify the task, grub4dos_update is used to sync with the latest svn code, and grub4dos_build is used to build the binary packge (the result is in /build directory).

#10 Iamnuts

Iamnuts
  • Members
  • 4 posts
  •  
    United Kingdom

Posted 02 March 2009 - 02:02 PM

Words escape me. You truly are a star.

You've now just given me and many other a new toy to be playing with.

Cheers

#11 niche99

niche99

    Frequent Member

  • Advanced user
  • 235 posts
  • Location:Aberdeen, Scotland
  •  
    Scotland

Posted 30 June 2009 - 05:34 PM

Excellent work.

Would it be possible to add transparency options.

; menu background transparency (0..255)
menu.transparency=0x20

; main menu selection bar transparency (0..255)
mainmenu.bar.transparency=100

Thanks,
niche99

#12 Mr.xx

Mr.xx

    Newbie

  • Members
  • 15 posts
  •  
    Albania

Posted 11 March 2010 - 09:19 AM

Well, it's possible to use variable, but it's best to modify the translation file *.tr. However, this file is binary format, so you need to use the source code.

I've uploaded the source code to:

http://grub4dos.sour...-3.3-custom.zip

To build it in windows, you can use my customized msys package:

http://grub4dos.sour...ge.net/msys.zip

Extract msys.zip, then click "Console.exe", you enter a command windows. cd to the gfxboot directory, and type "make".

The translation is in po subdirectory. bootloader.pot is the default translation (english). For example, to change the translation of help text, you need to locate txt_help and change the msgstr. After you have done, use make to create a new message_en.

BTW, the msys package can also be used to build grub4dos. I've added two script to simplify the task, grub4dos_update is used to sync with the latest svn code, and grub4dos_build is used to build the binary packge (the result is in /build directory).


thanx but can Explained in detail more how to trans lang

#13 tefole

tefole

    Member

  • Members
  • 49 posts
  • Location:Heidelberg
  •  
    Germany

Posted 23 April 2010 - 05:43 PM

just a question about the used font 16x16.fnt:
what a kind of file type is that, respectively how can i use a smaller font?
i have no idea :cheers:

#14 ireneuszp

ireneuszp

    Frequent Member

  • Advanced user
  • 191 posts
  •  
    Poland

Posted 24 April 2010 - 09:27 AM

My pack with GfxMenu files for Grub4Dos
http://grub4dos-iren...iles/GfxGrub.7z

:mellow:

#15 agni

agni

    Frequent Member

  • Tutorial Writer
  • 270 posts
  • Location:Bengaluru (Bangalore)
  •  
    India

Posted 25 April 2010 - 01:26 AM

My pack with GfxMenu files for Grub4Dos
http://grub4dos-iren...iles/GfxGrub.7z

:mellow:


What is the difference in your pack compared to BlueLife's Pack?

#16 Mr.xx

Mr.xx

    Newbie

  • Members
  • 15 posts
  •  
    Albania

Posted 23 May 2010 - 07:43 AM

My pack with GfxMenu files for Grub4Dos
http://grub4dos-iren...iles/GfxGrub.7z

:cheers:


can re-upload file again because the file corrupt

Posted Image

#17 steve6375

steve6375

    Platinum Member

  • Developer
  • 7187 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars, www.easy2boot.com
  •  
    United Kingdom

Posted 27 November 2010 - 02:28 PM

Gfxmenu is not easy to configure.
To make it easier for normal user to do advanced treaking with gfxmenu, I've built a special message file whose behavior can be altered simply by editing the config file gfxboot.cfg. Currently, it understand the following options:


Thanks for this very useful feature, which I am playing with now. It all seems to work except...

I cannot seem to get these 2 settings to work though...

#Background color of panel pop-up box 0xd8deed
panel_bg=0xff0000
#Border color of panel pop-up box 0xeff2f6
panel_border=0x00ff00

Also 'Language' seems to come in a different color than expected?

Also I am not sure what this option does...
#loading color 0x295202
loading_color=0xff00ff


Also, I know that the / in /n for help text is the wrong way round in the screenshot, but \n does not show the help text at all in gfx menu - is it supported?

Has anyone had any success with these? Here is my test gfxboot.cfg file and a screenshot of what I get.

http://sites.google....ons/gfxboot.cfg


Posted Image

#18 Klaus21

Klaus21

    Frequent Member

  • Advanced user
  • 169 posts
  •  
    Germany

Posted 09 December 2010 - 05:22 PM

Is it possible for different screen resolutions in the gfxboot.cfg install?
If the monitor size queried?

For example:
[1280x1024]
screen.size = 1280.1024
[1024x768]
screen.size = 1024.768
[800x600]
screen.size = 800.600

Regards Klaus

#19 ded

ded

    Frequent Member

  • Developer
  • 133 posts

Posted 09 December 2010 - 06:14 PM

gfxboot.cfg

custom_width=1024
custom_height=768
custom_depth=32

#20 Klaus21

Klaus21

    Frequent Member

  • Advanced user
  • 169 posts
  •  
    Germany

Posted 09 December 2010 - 06:50 PM

Is it possible to give all three resolutions in one gfxboot.cfg?

Can you tell me how can I work with @ DED-LEGO @ ??

Does anyone know how can I bring headings and blank lines in the menu.lst?

Like
title == Heading ==

Regards Klaus

#21 ded

ded

    Frequent Member

  • Developer
  • 133 posts

Posted 10 December 2010 - 08:13 AM

 

Is it possible to give all three resolutions in one gfxboot.cfg?

If you have the source code of your gfxboot, then have a look at the script common.inc. You might be interested in these parts of common.inc:

false "custom_width" getgfxnum dup {
0 "custom_height" getgfxnum 16 "custom_depth" getgfxnum findmode setmode
} if

not {
800 600 16 findmode setmode not {
800 600 32 findmode setmode not {
640 480 16 findmode setmode not {
640 480 32 findmode setmode not {
false .end
} if
} if
} if
} if
} if

Topic to the discussion of inc-scripts is HERE

Can you tell me how can I work with @ DED-LEGO @ ??

Please post questions about @DED-LEGO@ in the topic "GFXboot, editing, animation, @DED-LEGO@ examples" 

Does anyone know how can I bring headings and blank lines in the menu.lst?

This question can also be solved with the inc-scripts editing.

Edited by ded, 10 December 2010 - 08:19 AM.


#22 Klaus21

Klaus21

    Frequent Member

  • Advanced user
  • 169 posts
  •  
    Germany

Posted 10 December 2010 - 09:33 AM

@ Ded
Thank you for your reply.
However, I have no idea where to change gfxboot.cfg in the what. With the title, I at first a small solution.

***
title Several Virenscanner
lock
find --set-root /menu.lst
configfile /menu.lst

#23 ded

ded

    Frequent Member

  • Developer
  • 133 posts

Posted 10 December 2010 - 12:11 PM

 

I have no idea where to change gfxboot.cfg in the what.

This is a text file (like menu.lst). To edit it you can use any text editor.    :cheers:

***
title Several Virenscanner
lock
find --set-root /menu.lst
configfile /menu.lst

Grub4dos uses menu.lst by default. If you want to use multilevel menu, then pay attention to the topic of "Multilevel Enclosed Menus in Grub4DOS" 

Edited by ded, 10 December 2010 - 12:20 PM.


#24 ded

ded

    Frequent Member

  • Developer
  • 133 posts

Posted 10 December 2010 - 03:32 PM

Does anyone know how can I bring ... blank lines in the menu.lst?

Solution described here

#25 nierewa

nierewa

    Member

  • Members
  • 88 posts
  •  
    Germany

Posted 06 February 2012 - 01:38 PM

Man kann ja mit n für die einzelnen Einträge einen Erklärungstext eingeben.
Also z.Bsp.: title Boot first HarddisknMit Enter wird von der Festplatte gestartet

Ist das auch mit gfxmenu möglich?
Und wenn ja, wie?




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users