Alt+F2 from Mint forums http://forums.linuxmint.com/viewtopic.php?f=206&t=104169
In short (for those who want to skip reading the whole thread). Paste the code below into mate-run.c
#include <stdio.h>
#include <stdlib.h>
#include <X11/Xlib.h>
void die(const char *message)
{
fputs(message, stderr);
exit(1);
}
Atom get_atom(Display *display, const char *atom_name)
{
Atom atom = XInternAtom(display, atom_name, False);
if (atom == None)
die("can't find an atom I need");
return atom;
}
int main()
{
Display *display;
Atom gnome_panel_atom, run_atom;
XClientMessageEvent event;
display = XOpenDisplay(NULL);
if (display == NULL)
die("can't open display");
gnome_panel_atom = get_atom(display, "_MATE_PANEL_ACTION");
run_atom = get_atom(display, "_MATE_PANEL_ACTION_RUN_DIALOG");
event.type = ClientMessage;
event.window = DefaultRootWindow(display);
event.message_type = gnome_panel_atom;
event.format = 32;
event.data.l[0] = run_atom;
event.data.l[1] = (Time)(time(NULL) * 1000);
XSendEvent(display, event.window, False, StructureNotifyMask,
(XEvent *)&event);
XCloseDisplay(display);
return 0;
}
Compile and install with:
$ gcc mate-run.c -o mate-run -L/usr/X11R6/lib -lX11
$ chmod 755 mate-run
$ sudo cp mate-run /usr/local/bin
and simply in CCSM > Commands add a command that links "mate-run" to "ALT+F2" key-combo.
Works in Maya x64 (I do have build-essentials and whatnot so you might want to check out what to install to have X11 libraries and gcc).
I deserve no credit for this other than discovering it in the forums.
1Thanks Bojan. I works nicely, and I find it behaves better with this following extra bash step to focus it:
mate-run; sleep .1; xdotool windowactivate $(wmctrl -lx | sed -nr 's/^([^ ]+).* mate-panel.Mate-panel .* Run Application/\1/p')
– Peter.O – 2012-11-02T08:11:48.370Thanks, it is much better now since I often forget to click in the textfield and CCSM doesn't have Focus Protection Windows option any more. Also you might want to check this out as an elegant solution that solves both Alt+F1 and Alt+F2 issue with one executable that's equally easy to compile: http://forums.linuxmint.com/viewtopic.php?f=219&p=615178
– Bojan Markovic – 2012-11-03T13:15:11.447