Story
I just upgraded my lab desktop to Mandriva 2008.1. As usual, my first action was to install Xfce. That all worked well until I hit my usual Alt+F2 to launch a program. Nothing happened. I tried again. Still nothing. So I checked out the keyboard shortcuts, thinking they might be messed up. After actually finding where Alt+F2 gets set (there are a few different places in Xfce where keybindings are created), I saw it was indeed set up to run xfrun4, Xfce’s little run dialog.
I headed to the console (another aggravation: I am used to using gnome-terminal for my console, because I like its tabs and general feel. But it is way too slow for some reason and, even more importantly, I cannot figure out how to make the cursor stop blinking. It drives me nuts) and ran xfrun4 from there. Result: segfault
After poking around to see if there are any other little things like xfrun4 (something I have done before, actually), I gave up and wrote my own.
Requirements
- Zerenity
- GTK2
- Ruby/GTK2
require "rubygems"
require "zerenity/entry"
require "zerenity/warning"
loop do
begin
program = Zerenity.Entry(:title => "Run")
if program
exec program
end
break
rescue Interrupt
break
rescue Errno::ENOENT
Zerenity.Warning(:text => "Program not found.",
:title => "Error")
rescue Exception => e
Zerenity.Warning(:text => e.inspect, :title => "Error")
end
end
Thrilling Conclusion
I dropped this in a file in /usr/bin/ and changed the keybinding…and that’s it. Works well enough, though it would be nice to have autocomplete/history stuff. But Zerenity does not have that (yet).
