From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1LSC2s-0000te-HK for mharc-grub-devel@gnu.org; Wed, 28 Jan 2009 10:09:38 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LSC2q-0000sy-E7 for grub-devel@gnu.org; Wed, 28 Jan 2009 10:09:36 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LSC2k-0000rB-Pu for grub-devel@gnu.org; Wed, 28 Jan 2009 10:09:35 -0500 Received: from [199.232.76.173] (port=45279 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LSC2k-0000r4-I0 for grub-devel@gnu.org; Wed, 28 Jan 2009 10:09:30 -0500 Received: from gateway03.websitewelcome.com ([69.93.205.23]:53248) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1LSC2f-0003Sx-JV for grub-devel@gnu.org; Wed, 28 Jan 2009 10:09:30 -0500 Received: (qmail 30671 invoked from network); 28 Jan 2009 15:29:21 -0000 Received: from gator297.hostgator.com (74.53.228.114) by gateway03.websitewelcome.com with SMTP; 28 Jan 2009 15:29:21 -0000 Received: from [67.185.177.95] (port=42062 helo=localhost) by gator297.hostgator.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69) (envelope-from ) id 1LSC2P-0001ul-6P; Wed, 28 Jan 2009 09:09:09 -0600 Date: Wed, 28 Jan 2009 07:09:05 -0800 From: Colin D Bennett To: The development of GRUB 2 Message-ID: <20090128070905.4dcf7f4f@gibibit.com> In-Reply-To: References: X-Mailer: Claws Mail 3.7.0 (GTK+ 2.14.7; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/TUSa1ZPr7/AXwn+6UPUOWam"; protocol="application/pgp-signature"; micalg=PGP-SHA1 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator297.hostgator.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - gibibit.com X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Cc: anthony.cunningham@gmail.com Subject: Re: Random selections and changing splash screen 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: Wed, 28 Jan 2009 15:09:36 -0000 --Sig_/TUSa1ZPr7/AXwn+6UPUOWam Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Wed, 28 Jan 2009 13:01:52 +0000 Ant=C3=B3in =C3=93g =C3=93 Cuinneag=C3=A1in = wrote: > Hi my name is Anthony Cunningham and I have recently joined this list. >=20 > I'd had some ideas for features for Grub and the wiki mentions putting > them on this list in case they exist, or others may be working on > something similar. >=20 > One idea is that after the timeout a random entry is chosen from the > boot menu, instead of default. The use case I had in mind would be > where multiple distributions are installed and the user would let a > random one boot as an incentive to learn to work with that > distributions package manager, destop environment etc. > the entry could be like : > random //any random entry > random (4,5,8) //random of 4, 5 or 8 > random not (3,5,9) //random , except these..for not choosing windows > or rescue partitions etc. Hi Anthony, That's an interesting idea. It wouldn't be too hard to implement, I'm sure. Another implementation that might be cleaner than specifying the indices of the items to select from would be to use the 'class' attribute of menu items which has recently been added. The 'class' attribute works similarly to the way the HTML/CSS class attribute functions: Each menu entry has a set of zero or more classes (which are simply character strings) which characterize the entry. The reason I added the 'class' attribute initially was to support showing an icon for each menu entry, where the most appropriate icon is chosen (i.e., if 'Ubuntu Linux 8.10' is an entry with classes { 'ubuntu', 'linux', 'os' }, then an icon called 'ubuntu.png' is first looked for, then if that is not found, 'linux.png' is searched for, etc.). We could use the 'class' attribute to identify which items you want to randomly select from. For instance, suppose you want to choose a random entry from all the free operating systems installed. Then you could add a class 'free-os' to the classes for each Linux, BSD, and other free OS menu entry. The 'random boot' command could then be specified as: random // Any random entry random --class=3Dfree-os // Any free operating system random --class=3Dlinux --exclude-class=3Drescue // ^ Any Linux distribution, but not rescue entries. I really try to avoid using indices to refer to entries in the grub.cfg since that makes it brittle to change (if you add/move/delete an entry, some of your index references may need to be changed, and it's up to you to figure out which ones). > Also another feature I thought of (when may exist) is a per entry > splashscreen setting, and moving up and down with the arrow keys would > change the background splashscreen. > I think this would be a nice feature to show OS specific splashscreens > Windows, Red Hat, FreeBSD etc. >=20 > Anthony By the 'splashscreen', do you mean the background image behind the GRUB menu? So, as you press the arrow keys up and down on the GRUB menu to select an entry to boot, the background image is changing depending on the highlighted menu entry? This is definitely possible, and it could be done on a theme-by-theme basis (this would be, IMO, a great place to use Lua scripting in the theme[1]). If the background-switching feature really seems useful, I can take a look at adding it to my gfxmenu branch sometime, which is in the final stages of preparation for merging into mainline GRUB. Regards, Colin [1] Lua support is *not* currently planned for inclusion into GRUB, but I did do a very successful 'spike' experiment which allows themes to include Lua code that can use the GRUB graphics API. I'd still like to continue down the path of adding Lua support at some point, because I think the value is high and the effort required is low. --Sig_/TUSa1ZPr7/AXwn+6UPUOWam Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEARECAAYFAkmAdRYACgkQokx8fzcGbYeJCACeKDxnGDsh1aQwndJUgLdjT21W aOcAnjQHlrB+lduKBs0u+okmVnXObjTk =8K1+ -----END PGP SIGNATURE----- --Sig_/TUSa1ZPr7/AXwn+6UPUOWam--