Month: February 2012

  • How to set/get default values for configuration keys

    It looks like dconf (the command) doesn’t read values of keys that haven’t been explicitly set by the user.

    jani@saegusa:~$ dconf read /org/gnome/desktop/session/idle-delay
    jani@saegusa:~$ 

    So how do I get the value of idle-delay whether or not it’s user-set?

    By using gsettings instead of dconf:

    jani@saegusa:~$ gsettings get org.gnome.desktop.session idle-delay
    uint32 600

    Note that setting the value to what is default for the key isn’t the same as resetting the key:

    jani@saegusa:~$ dconf write /org/gnome/desktop/session/idle-delay 'uint32 600'
    jani@saegusa:~$ dconf read /org/gnome/desktop/session/idle-delay
    uint32 600

    You see, now even according to dconf the key is set even though it just holds the default value.

    To actually reset the dconf key, you use its reset command:

    jani@saegusa:~$ dconf reset /org/gnome/desktop/session/idle-delay
    jani@saegusa:~$ dconf read /org/gnome/desktop/session/idle-delay
    jani@saegusa:~$ gsettings get org.gnome.desktop.session idle-delay
    uint32 600
  • Which Gsettings key holds Gnome Screensaver’s idle timeout?

    It’s the /org/gnome/desktop/session/idle-delay dconf key.

    jani@saegusa:~$ dconf read /org/gnome/desktop/session/idle-delay
    uint32 0
  • BitlBee

    20:19 <@uusijani> no
    20:19 <@root> Did I ask you something?
    20:19 <@uusijani> no
    20:19 <@root> Did I ask you something?
    20:19 <@uusijani> yes
    20:19 <@root> Did I ask you something?
    20:19 <@uusijani> yes
    20:19 <@root> Did I ask you something?

    BitlBee: Y U NO YES NOTHING

  • Booting Ubuntu’s Minimal CD iso from Grub2

    Today I got me a used Acer Aspire One ZG5. It came with preinstalled Ubuntu, but also with the previous owner’s data that they obviously wished to be wiped first.

    The ZG5 doesn’t have an optical drive, and I don’t have any thumbdrives bigger than 256 MB, so reinstalling took a bit of creativity.

    The obvious choice might have been to get an installation iso smaller than 256 MB, stick it to a thumbdrive and proceed from there. But I figured, I already have Grub and schtuff from the previous installation on the disk, so why not make use of it?

    The Boot & Install Ubuntu from the Grub Rescue Prompt HOWTO on Ubuntu Forums looked like the way to go, but I wanted to use the toram option to make unmounting of the iso work. As the ZG5 (by default) only has 512 MB of memory, cramming an entire CD’s worth of data into it wouldn’t be possible, so I grabbed the minimal CD image of Precise, which currently is 24,1 MB. To do this I recovery-booted the pre-existing installation and used wget to download the image into /root.

    I then rebooted and went to the Grub commandline. Just as in the Howto, I set the Grub modules path, loaded necessary modules (no Microsoft filesystems needed, the old / was ext2), set the loopback and root.

    set prefix=(hd0,1)/boot/grub
    insmod linux
    insmod loopback
    insmod iso9660
    loopback loop (hd0,1)/root/mini.iso
    set root=(loop)

    Next was the linux commandline. The mini CD doesn’t have casper and location of files differs slightly from the Live CD. I also added the toram parameter:

    linux /linux iso-scan/filename=/root/mini.iso noprompt noeject toram
    initrd /initrd.gz

    Then just

    boot
  • Apport opens Opera instead of default browser

    I’m titling this the way it seemed to me back when I was wondering what was going on. In fact the issue is that system problems are reported with root privileges, and Opera had hijacked the system-level default browser position (my normal account still used my choice). You can see which browser is the superuser default by issuing

    $ sudo xdg-open 'http://www.google.com'

    You can configure the default with

    $ sudo update-alternatives --config gnome-www-browser
    $ sudo update-alternatives --config x-www-browser