require 'gtk2' require 'gconf2' client = GConf::Client.default window = Gtk::Window.new str = client.get "/apps/gnome-cd/device" label = Gtk::Label.new(str ? str : '') window.add label client.add_dir "/apps/gnome-cd" client.notify_add "/apps/gnome-cd/device" do |client, entry| label.text = entry.value ? entry.value : '' end window.show_all Gtk.main