Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I like the Linux-Mint 13 Mate Alt-F1 menu and the Alt-F2 run-dialog, but as soon as I installed Compiz those keys became non-functional.

Conpiz has a Gnome compaatibility settings panel which allows you to set these keys, but using that Compix settings panel did not make any diference (probably because Mate is not Gnome, strictly speaking)...

Is there some way to get those two shortcut keys back into acton with Compiz?

share|improve this question
up vote 5 down vote accepted

Alt+F2 from Mint forums

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);

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;[0] = run_atom;[1] = (Time)(time(NULL) * 1000);

   XSendEvent(display, event.window, False, StructureNotifyMask,
              (XEvent *)&event);


   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.

share|improve this answer
Thanks 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 Nov 2 '12 at 8:11
Thanks, 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: – Bojan Markovic Nov 3 '12 at 13:15

As it seems there is no standard way to do it, I've written a script which enables Alt-F1 to open the main menu. It utilizes the Panel Applet Main Menu (the main MATE menu)

  • Add a New psanel applet: Main Menu
  • Make it the leftmost icon in the top panel. If you want a different position, change the first 'mousemove' accordingly, so that it clicks on your icon's screen-position.
  • Put this script somewhere in your PATH

    # name: mouse-click-screen
    { eval $(xdotool getmouselocation --shell)  # save current mouse position
      sleep .15               # It needs a delay (?!).. Your Mileage May Vary
      xdotool mousemove --sync ${1:-10} ${2:-10} click 1
      xdotool mousemove --sync $X $Y           # restore saved mouse position
    } 2>/dev/null
  • In System -> Preferences -> Keyboard Shortcuts, click ADD.
    Note that because compiz is the desktop manager, there is no clash with the previous Alt-F1)

    Name:     main-menu    
    Command:  mouse-click-screen
    Shortcut: Alt+F1

That's it. Alt+F2 is still pending. but at least Alt+F1 works. It isn't perfect, but it works pretty well.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.