I want kubuntu to ask me at start up - which of the profile I want to use. There should be a default answer which should run automatically in 3 seconds. Much as if were Grub asking You which operational system You would like to start.
The rational to have several start-up options: normally I have a lot of things starting by default: krusader, firefox, konsole, emacs... So the full loading takes about 1 minute. But sometimes - I'm on the run, and need just to do some single thing - so I'll need only, say krusader. I'd've made several start-up scripts... So I'm wondering - is it possible to choose between them at start up?
Perhaps that could be done with Grub...
Edit:
Grub didn't asked me about the start up profile at all - that is not even "Normal mode" or "Recovery mode". I made him do it with Grub Editor (the package is called kcm-grub2
):
sudo sed -i '$ a\deb http://download.opensuse.org/repositories/home:ksmanis/xUbuntu_11.10/ /' /etc/apt/sources.list
wget -q http://download.opensuse.org/repositories/home:ksmanis/xUbuntu_11.10/Release.key -O- | sudo apt-key add -
sudo apt-get update
sudo apt-get install kcm-grub2
After the installation and restart, in System settings
-> Startup and Shutdown
new item has appeared: Grub2 Bootloader
. In there - I checked "Automatically choose the default boot entry in 3 seconds".
After that, following the lumbric solution I've copied the gnu-linux
menuentry
record to the end of the /etc/grub.d/40_custom
, and add a "productivity-profile" there. Here's the text of the modified 40_custom
:
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
menuentry 'Full' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root 392f79ba-0f1f-422f-ac76-11860e0f4869
linux /boot/vmlinuz-3.0.0-16-generic root=UUID=392f79ba-0f1f-422f-ac76-11860e0f4869 ro quiet splash vt.handoff=7 productivity-profile=1
initrd /boot/initrd.img-3.0.0-16-generic
}
menuentry 'Public' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root 392f79ba-0f1f-422f-ac76-11860e0f4869
linux /boot/vmlinuz-3.0.0-16-generic root=UUID=392f79ba-0f1f-422f-ac76-11860e0f4869 ro quiet splash vt.handoff=7 productivity-profile=2
initrd /boot/initrd.img-3.0.0-16-generic
}
menuentry 'Fastest' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root 392f79ba-0f1f-422f-ac76-11860e0f4869
linux /boot/vmlinuz-3.0.0-16-generic root=UUID=392f79ba-0f1f-422f-ac76-11860e0f4869 ro quiet splash vt.handoff=7 productivity-profile=3
initrd /boot/initrd.img-3.0.0-16-generic
}
productivity-profile
is picked up by the Start-up bash script.
That's it. Now I have 5 start-up profiles: Clean, Recovery, Full, Public, Fastest.