From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1LTNZI-0004dV-Hd for mharc-grub-devel@gnu.org; Sat, 31 Jan 2009 16:40:00 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LTNZG-0004dH-SE for grub-devel@gnu.org; Sat, 31 Jan 2009 16:39:58 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LTNZE-0004d5-Et for grub-devel@gnu.org; Sat, 31 Jan 2009 16:39:57 -0500 Received: from [199.232.76.173] (port=49161 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LTNZE-0004d2-9T for grub-devel@gnu.org; Sat, 31 Jan 2009 16:39:56 -0500 Received: from mta-out.inet.fi ([195.156.147.13]:41374 helo=kirsi1.inet.fi) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LTNZD-0003pZ-G6 for grub-devel@gnu.org; Sat, 31 Jan 2009 16:39:55 -0500 Received: from [192.168.1.102] (84.248.105.254) by kirsi1.inet.fi (8.5.014) id 48FC5AC904786E58 for grub-devel@gnu.org; Sat, 31 Jan 2009 23:39:54 +0200 Message-ID: <4984C520.3030005@nic.fi> Date: Sat, 31 Jan 2009 23:39:44 +0200 From: =?ISO-8859-1?Q?Vesa_J=E4=E4skel=E4inen?= User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 To: The development of GRUB 2 References: <20090131125939.0a5c3bce@gibibit.com> In-Reply-To: <20090131125939.0a5c3bce@gibibit.com> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: Re: [PATCH] 5/5 Graphical menu (gfxmenu) X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2009 21:39:59 -0000 Hi, As this patch is quite large and I am going go to sleep soon so I only comment your message on this run... Colin D Bennett wrote: > This long-awaited patch adds graphical menu support to GRUB 2. It is > largely the result of my work during the Google Summer of Code 2008. And thanks for it! > There are still a few important things that need to be done on gfxmenu > before it is completely ready for end-users (off the top of my head): > > - Need a good way to switch themes at runtime. I want to add a popup > menu that lists the available themes and lets the user choose one. > (Currently the keys 1, 2, 3, and 4 are hardcoded to switch between my > sample themes...) I think switching would need to validate new theme before taking it to into use. When it is ok then it is safe to switch... > - gfxmenu interacts badly with gfxterm. Running commands from the > terminal withing gfxmenu that switch the video mode > ('videotest basic', for instance) cause a crash when the command > returns. I think this has something to do with the interaction of > video mode-switching and the GRUB output terminal. I have thought about this for some years... but still haven't implemented it. Basically it should work something like this: state = grub_video_save_state() change mode or what ever. grub_video_restore_state(state); State would have two parts. One is generic part that tells what video driver to load and then second part is driver specific so it can restore old video mode perhaps with same palette if in indexed color mode... but contents of display does not need to saved. If there is no need to perform any change on restore (eg. state matches) then no action is taken. This should work also with text mode, so that at start before changing video mode grub_video_save_state() would be called which records text mdoe. And if graphical mode fails, then it would call restore with this state. Now if there was graphical mode before this it would restore to old working graphical mode. > The default theme is set in grub.cfg like so: > > set theme="/boot/grub/themes/proto/theme.txt" I think it would be wise to pick some other theme extension that .txt.