4

Is it possible to display a right-click menu using a shell script (or some kind of Unix command?) I'm trying to find a program that can be used to display a context menu at a specific location on the screen.

For example, it would be useful to display the desktop right-click context menu programmatically (the one that appears when right-clicking on a file.) This would require some method of launching the desktop right-click menu from the command line.

1
  • This might be relevant (a Java popup window that closes automatically when the user clicks outside it): stackoverflow.com/questions/1675912/… It might be possible to modify this program so that it can be launched at a specific screen position using a shell script. Commented Nov 17, 2012 at 20:18

1 Answer 1

4

You can do this using xdotool, see the MOUSE COMMANDS section of the manual, specifically the click argument.

4
  • Do you mean this section here? semicomplete.com/projects/xdotool/xdotool.xhtml#mouse_commands Commented Nov 17, 2012 at 20:06
  • 1
    @AndersonGreen - Yes.
    – Chris Down
    Commented Nov 17, 2012 at 20:07
  • Do the mouse commands do anything besides moving the mouse to a specific position on the screen? (Specifically, which commands can be used to display a context menu at a specific position on the screen?) Commented Nov 17, 2012 at 20:10
  • @AndersonGreen It's not that simple. You need to find and activate the window (see the window section of that manual), then right click on that window using the click command.
    – Chris Down
    Commented Nov 17, 2012 at 20:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .