Search Results

Search found 20 results on 1 pages for 'xdotool'.

Page 1/1 | 1 

  • Alt Tab with xdotool and xkeybind

    - by Gary
    I'm trying to map alt tab behavior to a mouse button using xdotool in my .xbindkeysrc. What I want to do is map something like "xdotools keydown alt key Tab" release b:7 but by doing this the alt key gets stuck, and it prevents my other mappings from working until I press the alt key on the keyboard. Is there a way to do this without having to press the alt key to get things unstuck? Without keydown it just switches back and forth between two windows, with keydown it behaves like I want (displaying the alt-tab switcher) but the alt key is stuck. Is there a way to unstick the key after using the alt tab switcher using xdotools?

    Read the article

  • What type of command can I use for shortcut assignment?

    - by navie
    We all know that Ubuntu 12 has a shortcut mapper under "Keyboard" utility. I wonder when it asks for "command" in the new shortcut dialog, what type of command can I use? I used to think that commands in terminal can also be used here, but it seems xdotool is not like that. btw, if xdotool is not the right solution, how to map a key combination to a another key? for e.g.: alt+j to Down arrow key Thank you

    Read the article

  • Create a custom shortcut that types clipboard contents

    - by briankb
    I want to paste my clipboard contents to a remote session such as VNC, IPMI, or Raritan. To accomplish this, I installed xdotool and clip. Then I wrote a simple command that types the clipboard contents: xdotool type "$(xclip -o)" This works if I stay in a terminal window, and type that command myself. It types back my clipboard contents when I run the command. Of course now I want to make this into a hotkey that works in any window. However, if I create a custom shortcut using Keyboard settings, it doesn't work. If I assign a hotkey Alt+K to the shortcut, nothing happens when I press it. If I use Ctrl+K, unexpected behavior occurs to whatever window has focus. e.g. my terminal window size shrinks (it's somewhat amusing, actually). Similar results occur if I save it as a script and call the script, or if I encapsulate the command with sh -c. How can I make practical use of the powerful xdotool type command?

    Read the article

  • Sending keyboard commands to Ubuntu through Python. Remote for my Blackberry

    - by Rudi Strydom
    I am trying to build a remote control application to control media on my Ubuntu. Does anyone know a way in order to accomplish this. The media keys in particular. Thank you. EDIT 1: I have tried using XTE, but is seems python in truncating the input or there is a limit or something which means that you can't do Ctrl + Key key presses, which wont suit my needs. I also tried uinput, but alas you need to run it as root, which also will not quite my needs. Now I am looking at EVDEV which seems promicing, that is if I can get it working.

    Read the article

  • Map Ctrl and Alt to mouse thumb buttons

    - by murphyslaw
    I'm running Ubuntu 12.04 and have a multi-button Microsoft mouse. I would like to map the CTRL and ALT modifier keys to the left and right thumb buttons of my mouse, respectively, so I can ctrl-click and alt-click without touching the keyboard. My thumb buttons are buttons 8 and 9. I tried the solution in this question: How do I configure a mouse thumb button? which explained how to map a double click to a thumb button - this worked for the double-click but I couldn't figure out how to modify the solution for CTRL and ALT I also tried this: How to map Ctrl/Shift to thumb buttons of Mouse? which used xdotools and xbindkeys. I modified the script to this: ~/.xbindkeysrc: "xdotool keydown alt" b:9 "xdotool keyup alt" release + alt + b:9 "xdotool keydown ctrl" b:8 "xdotool keyup ctrl" release + control + b:8 Which ALMOST works. It simulates a CTRL-key press when I click the left thumb button, but I can't actually hold the button and click at the same time - holding the thumb button seems to prevent it from listening to other input until it is released. Does anyone know how I can make my mouse thumb button actually work as a modifier key, so I can use thumb_button+click instead of CTRL-click?

    Read the article

  • Alt, Meta and other modifier keys

    - by KAction
    I want to get more combos in Emacs, so I tried to bind Alt, Super, Hyper via modmap to keys. I failed at it. So I tried to use xdotool. I started emacs -Q for clean experiment. Pressed C-hC-c and executed in other terminal: xdotool key --window 119537875 "meta+x" xdotool key --window 119537875 "alt+x" Both commands resulted in M-x runs the command execute-extended-command. So, Emacs do not differ between Alt and Meta. How can I fix it?

    Read the article

  • Raspberry Pi entrance signed backed by Umbraco - Part 1

    - by Chris Houston
    Being experts on all things Umbraco, we jumped at the chance to help our client, QV Offices, with their pressing signage predicament. They needed to display a sign in the entrance to their building and approached us for our advice. Of course it had to be electronic: displaying multiple names of their serviced office clients, meeting room bookings and on-the-pulse promotions. But with a winding Victorian staircase and minimal storage space how could the monitor be run, updated and managed? That’s where we came in…Raspberry PiUmbraco CMSAutomatic updatesAutomated monitor of the signPower saving when the screen is not in useMounting the screenThe screen that has been used is a standard LED low energy Full HD screen and has been mounted on the wall using it's VESA mounting points, as the wall is a stud wall we were able to add an access panel behind the screen to feed through the mains, HDMI and sensor cables.The Raspberry Pi is then tucked away out of sight in the main electrical cupboard which just happens to be next to the sign, we had an electrician add a power point inside this cupboard to allow us to power the screen and the Raspberry Pi.Designing the interface and editing the contentAlthough a room sign was the initial requirement from QV Offices, their medium term goal has always been to add online meeting booking to their website and hence we suggested adding information about the current and next day's meetings to the sign that would be pulled directly from their online booking system.We produced the design and built the web page to fit exactly on a 1920 x 1080 screen (Full HD in Portrait)As you would expect all the information can be edited via an Umbraco CMS, they are able to add floors, rooms, clients and virtual clients as well as add meeting bookings to their meeting diary.How we configured the Raspberry PiAfter receiving a new Raspberry Pi we downloaded the latest release of Raspbian operating system and followed the official guide which shows how to copy the OS onto an SD card from a Mac, we then followed the majority of steps on this useful guide: 10 Things to Do After Buying a Raspberry Pi.Installing ChromiumWe chose to use the Chromium web browser which for those who do not know is the open sourced version of Google Chrome. You can install this from the terminal with the following command:sudo apt-get install chromium-browserInstalling UnclutterWe found this little application which automatically hides the mouse pointer, it is used in the script below and is installed using the following command:sudo apt-get install unclutterAuto start Chromium and disabling the screen saver, power saving and mouseWhen the Raspberry Pi has been installed it will not have a keyboard or mouse and hence if their was a power cut we needed it to always boot and re-loaded Chromium with the correct URL.Our preferred command line text editor is Nano and I have assumed you know how to use this editor or will be able to work it out pretty quickly.So using the following command:sudo nano /etc/xdg/lxsession/LXDE/autostartWe then changed the autostart file content to:@lxpanel --profile LXDE@pcmanfm --desktop --profile LXDE@xscreensaver -no-splash@xset s off@xset -dpms@xset s noblank@chromium --kiosk --incognito http://www.qvoffices.com/someURL@unclutter -idle 0The first few commands turn off the screen saver and power saving, we then open Cromium in Kiosk Mode (full screen with no menu etc) and pass in the URL to use (I have changed the URL in this example) We found a useful blog post with the Cromium command line switches.Finally we also open an application called Unclutter which auto hides the mouse after 0 seconds, so you will never see a mouse on the sign.We also had to edit the following file:sudo nano /etc/lightdm/lightdm.confAnd added the following line under the [SeatDefault] section:xserver-command=X -s 0 dpmsRefreshing the screenWe decided to try and add a scheduled task that would trigger Chromium to reload the page, at some point in the future we might well change this to using Javascript to update the content, but for now this works fine.First we installed the XDOTool which enables you to script Keyboard commands:sudo apt-get install xdotoolWe used the Refreshing Chromium Browser by Shell Script post as a reference and created the following shell script (which we called refreshing.sh):export DISPLAY=":0"WID=$(xdotool search --onlyvisible --class chromium|head -1)xdotool windowactivate ${WID}xdotool key ctrl+F5This selects the correct display and then sends a CTRL + F5 to refresh Chromium.You will need to give this file execute permissions:chmod a=rwx refreshing.shNow we have the script file setup we just need to schedule it to call this script periodically which is done by using Crontab, to edit this you use the following command:crontab -eAnd we added the following:*/5 * * * * DISPLAY=":.0" /home/pi/scripts/refreshing.sh >/home/pi/cronlog.log 2>&1This calls our script every 5 minutes to refresh the display and it logs any errors to the cronlog.log file.SummaryQV Offices now have a richer and more manageable booking system than they did before we started, and a great new sign to boot.How could we make sure that the sign was running smoothly downstairs in a busy office centre? A second post will follow outlining exactly how Vizioz enabled QV Offices to monitor their sign simply and remotely, from the comfort of their desks.

    Read the article

  • Simulate mouse movement in Ubuntu

    - by Dave Jarvis
    Problem Am looking to automatically move the mouse cursor and simulate mouse button clicks from the command-line using an external script. Am not looking to: Record mouse movement and playback (e.g., xnee, xmacro) Instantly move the mouse from one location to another (e.g., xdotool, Python's warp_pointer) Ideal Solution What I'd like to do is the following: Edit a simple script file (e.g., mouse-script.txt). Add a list of coordinates, movement speeds, delays, and button clicks. For example: (x, y, rate) = (500, 500, 50) sleep = 5 click = left Run the script: xsim < mouse-script.txt. Question How do you automate mouse movement so that it transitions from its current location to another spot on the screen, at a specific velocity? For example: xdotool mousemove 500 500 --rate 50 The --rate 50 doesn't exist with xdotool. I could write a script that uses xdotool to get the current mouse coordinates then move it a pixel at a time to the destination with a suitable sleep interval; what automated testing tool already does this? Thank you.

    Read the article

  • How to inhibit suspend temporarily?

    - by Zorn
    I have searched around a bit for this and can't seem to find anything helpful. I have my PC running Ubuntu 12.10 set up to suspend after 30 minutes of inactivity. I don't want to change that, it works great most of the time. What I do want to do is disable the automatic suspend if a particular application is running. How can I do this? The closest thing I've found so far is to add a shell script in /usr/lib/pm-utils/sleep.d which checks if the application is running and returns 1 to indicate that suspend should be prevented. But it looks like the system then gives up on suspending automatically, instead of trying again after another 30 minutes. (As far as I can tell, if I move the mouse, that restarts the timer again.) It's quite likely the application will finish after a couple of hours, and I'd rather my PC then suspended automatically if I'm not using it at that point. (So I don't want to add a call to pm-suspend when the application finishes.) Is this possible? Any advice would be appreciated. Cheers. EDIT: As I noted in one of the comments below, what I actually wanted was to inhibit suspend when my PC was serving files over NFS; I just wanted to focus on the "suspend" part of the question because I already had an idea how to solve the NFS part. Using the 'xdotool' idea given in one of the answers, I have come up with the following script which I run from cron every few minutes. It's not ideal because it stops the screensaver kicking in as well, but it does work. I need to have a look at why 'caffeine' doesn't correctly re-enable suspend later on, then I could probably do better. Anyway, this does seem to work, so I'm including it here in case anyone else is interested. #!/bin/bash # If the output of this function changes between two successive runs of this # script, we inhibit auto-suspend. function check_activity() { /usr/sbin/nfsstat --server --list } # Prevent the automatic suspend from kicking in. function inhibit_suspend() { # Slightly jiggle the mouse pointer about; we do a small step and # reverse step to try to stop this being annoying to anyone using the # PC. TODO: This isn't ideal, apart from being a bit hacky it stops # the screensaver kicking in as well, when all we want is to stop # the PC suspending. Can 'caffeine' help? export DISPLAY=:0.0 xdotool mousemove_relative --sync -- 1 1 xdotool mousemove_relative --sync -- -1 -1 } LOG="$HOME/log/nfs-suspend-blocker.log" ACTIVITYFILE1="$HOME/tmp/nfs-suspend-blocker.current" ACTIVITYFILE2="$HOME/tmp/nfs-suspend-blocker.previous" echo "Started run at $(date)" >> "$LOG" if [ ! -f "$ACTIVITYFILE1" ]; then check_activity > "$ACTIVITYFILE1" exit 0; fi /bin/mv "$ACTIVITYFILE1" "$ACTIVITYFILE2" check_activity > "$ACTIVITYFILE1" if cmp --quiet "$ACTIVITYFILE1" "$ACTIVITYFILE2"; then echo "No activity detected since last run" >> "$LOG" else echo "Activity detected since last run; inhibiting suspend" >> "$LOG" inhibit_suspend fi

    Read the article

  • Map caps-lock key to middle mouse click

    - by Stefano Palazzo
    Since I rarely use caps-lock, I'd like to map the key to a middle mouse click instead. I would also like to map Alt+Caps Lock to the original function of the caps lock key, should I ever need it. I can map any keyboard shortcut to xdotool click 2, but the Gnome Keyboard Shortcuts dialog won't let me assign a command to the caps-lock key, even with modifiers. I know this is a bit of a strange undertaking; How would I go about doing it?

    Read the article

  • How do I replicate the Super Key?

    - by joemangrove
    If you use xmonad, xbindkeys, and xdotool to try and remap the 'Menu' key, it does not work perfectly. The 'Menu' key will only emulate the Super key's quick press action, bringing up the application search. If you hold in the 'Menu' key it will not emulate the Super key's hold down action. That is, bring up the launcer with numbers over the applications. How do you make another key on the keyboard act exactly like the Super key?

    Read the article

  • Map caps-lock key to middle mouse click

    - by Stefano Palazzo
    Since I rarely use caps-lock, I'd like to map the key to a middle mouse click instead. I would also like to map Alt+Caps Lock to the original function of the caps lock key, should I ever need it. I can map any keyboard shortcut to xdotool click 2, but the Gnome Keyboard Shortcuts dialog won't let me assign a command to the caps-lock key, even with modifiers. I know this is a bit of a strange undertaking; How would I go about doing it?

    Read the article

  • Open a terminal window & run command, then close the terminal window if command completed successfully?

    - by Caspar
    I'm trying to write a script to do the following: Open a terminal window which runs a long running command (Ideally) move the terminal window to the top left corner of the screen using xdotool Close the terminal window only if the long running command exited with a zero return code To put it in Windows terms, I'd like to have the Linux equivalent of start cmd /c long_running_cmd if long_running_cmd succeeds, and do the equivalent of start cmd /k long_running_cmd if it fails. What I have so far is a script which starts xterm with a given command, and then moves the window as desired: #!/bin/bash # open a new terminal window in the background with the long running command xterm -e ~/bin/launcher.sh ./long_running_cmd & # move the terminal window (requires window process to be in background) sleep 1 xdotool search --name launcher.sh windowmove 0 0 And ~/bin/launcher.sh is intended to run whatever is passed as a command line argument to it: #!/bin/bash # execute command line arguments $@ But, I haven't been able to get the xterm window to close after long_running_cmd is done. I think something like xterm -e ~/bin/launcher.sh "./long_running_cmd && kill $PPID" & might be what I'm after, so that xterm is launched in the background and it runs ./long_running_cmd && kill $PPID. So the shell in the xterm window then runs the long running command and if it completes successfully, the parent process of the shell (i.e. the process owning the xterm window) is killed, thereby closing the xterm window. But, that doesn't work: nothing happens, so I suspect my quoting or escaping is incorrect, and I haven't been able to fix it. An alternate approach would be to get the PID of long_running_cmd, use wait to wait for it to finish, then kill the xterm window using kill $! (since $! refers to last task started in the background, which will be the xterm window). But I can't figure out a nice way to get the PID & exit value of long_running_cmd out of the shell running in the xterm window and into the shell which launched the xterm window (short of writing them to a file somewhere, which seems like it should be unnecessary?). What am I doing wrong, or is there an easier way to accomplish this?

    Read the article

  • is it possible to make nautilus open with two panes by default?

    - by marc-andre benoit
    Other than usign xdotool to send F3 to nautilus when it starts. (which is a solution..) I'm wondering if anything new as been included in the nautilus codebase that enable it in preferences to open up dual paned by default. I really liked total commander when using windows.. and other than to running it in wine, i haven't found any other more linux native way to manage more intuitively files and folders. (in a gui context) Having two panes open up that remember where i was prior to closing nautilus would be awesome if someone knows how enable it..

    Read the article

  • xubuntu keyboard application shortcuts not working

    - by Guanidene
    I am using the latest Xubuntu 13.04 with Xfce 4.10. I have issues while setting "Application Shortucts' from 'Settings Manager Keyboard Application Shortcuts'. Not all custom keyboards shortcuts, which I have added, work. Some do, some don't. Example the command 'xdotool key XF86AudioPause' works perfect from cmdline, but not when I assign this as a shortcut to some key, say 'F11'. Have tried to Google about this, but found nothing. Kindly help. If possible, kindly provide me a cmdline way to set a keyboard shortcut

    Read the article

  • Command-line way to send keystrokes to a window open on a different X-session

    - by Sanjay Manohar
    I have a Ubuntu desktop open and logged on, on my main machine. I am then also logging in to this machine from a remote computer, using X2go which creates a new X-session. I have a libreoffice file open on the original session. I want to save this file and close it - but from the remote machine! (Both sessions have same user logged in; I can sudo if needed) I have tried using xdotool search but this fails to find the window. Is there a way to do what I want from this second session? I can see the process with ps -A I can even see the open file with lsof! How can I do a "save-and-close" on it?

    Read the article

  • Can I use standard tools to get the full name of a process, when its name has embedded spaces?

    - by fred.bear
    I understand that it may be a rare situation for an executable to have spaces in it, but it could happen. An example may be the best explanation.. Using standard tools, I want to determine the location (on the file system) of the executable which owns(?) the current window... get the current window ID ...(xdotool getactivewindow ) use the ID to get the PID ...(wmctrl -p -l | sed ... ID .... use the PID to get the executable's name ... (ps -A ... here is where I run into problems ! Whith ps, when listing only the executable's name (-o ucmd), it truncates the name to 15 characters, so this rules out this option for any name which is longer. Widening the column (-o ucmd:99 ) makes no difference.. If pgrep is anything to go by, its matching is limited to 15 because of stat (see: info pgrep).. Listings in variants of "full" mode (eg -A w w) are not useful when the name concerned has spaces in it, because this name is separated from its args by another space!.. Also, in "full" mode, if the process was started by a link, the name of the link is shown, rather than the executable's name. Is there some way to do this (using standard tools)? ...or are spaces a show stopper here?

    Read the article

  • What gaming keyboard(s) will work with Ubuntu?

    - by belacqua
    I've been looking at gaming keyboards to use on Ubuntu system. Microsoft has a few popular ones (e.g., Sidewinder X4, X6), but the programmable function keys appear to be unusable without the Windows software. (Though here's a post from someone who has a more recent project that uses usbmon and xdotool to add functions to some keys.) Another choice in my budget is the Cyborg V.05. It seems about right for my needs, but I would be depressed having a bunch of useless, nonprogrammable keys on it. Logitech has some models (e.g., the Logitech G110), though again I expect that the extensive macro capabilities (which I don't need) would be lost under Linux. There's a project called g15tools which has some code to work with older Logitech gaming models, but I don't know what the current status is. Last entry there was in March 2010. There are also a number of very old posts around the internet with regard to the Logitech G11 and G15. Compatibility with the current keyboards, Ubuntu version, and Linux kernel are suspect. I'm in the U.S., and so it appears that few of the Roccat keyboards are available, and they're over-priced. Support might be OK for these, though -- there's a short Phoronix article about Roccat improving their Linux support, and there's also a project and webpage for "Using Roccat Hardware with Linux". Honestly, the only feature I have to have is good backlighting for the keys, and if it's not wired (which is fine), the wireless capability should function. I could probably live with dead function keys, as long as they weren't in places that would interfere with things like Unity/compiz shortcuts. Any experience or suggestions? I've not seen much to inspire confidence with programmable/macro keys. There is a thread (with no solutions) on the Sidewinder X4 on ubuntuforums here. I'm also considering the Logitech Illuminated Keyboard as a possibility, even though it's not specifically a gaming keyboard. It is backlit, and it's supposed to be a nice keyboard.

    Read the article

  • Open application in background without losing current window focus. Fedora 17, Gnome 3

    - by Ishan
    I'm running a script in the background which loads an image with feh depending on which application is currently in focus. However, whenever the script opens the image, window focus is lost to feh. I was able to circumvent this by using xdotool to switch back to the application that was originally in focus, but this introduces a short annoying period of time where the focus is switched from feh to the application. My question is this: is there any way to launch feh in the background such that window focus is NOT lost? System: Fedora 17, Gnome 3, Bash Thanks a ton!

    Read the article

  • How can I activate a Panel-icon via a script (or get its screen co-ordinates; to click it)?

    - by fred.bear
    This question is in the context of Lucid 10.04 desktop (ie. no Unity). I do most screen navigation via the keyboard (not the mouse), so I'm looking for a script solution to re-activating an app which has been "minimized" to the Panel's Notification Area. I'll use Skype as an example. wmctrl allows me enough access to normally-minimized windows, but when Skype is "minimized" to the Notification Area, it simply goes "off the radar" as far as wmctrl is concerned. Bearing in mind that icon positions in the Notification Area can vary, is there some way to determine the screen co-ordinates of Skype's Panel icon, so I can "click" it using xdotool (or a similar utility)? ...or maybe there is a more direct way to activate the "dormant" Skype? ... (and I don't mean the mouse ;) Here is the script, so far. Hopefully it will make clear what I'm trying to do: #!/bin/bash procname="skype-wrapper" windmask="Skype™" if [[ $(pgrep -x -n -c "$procname") == 1 ]] ; then wintitle="$(wmctrl -l |grep "$windmask" |head -n 1 |sed -n "s/^.\+${HOSTNAME} \(.*\)/\1/p")" if [ "$wintitle" = "" ] ; then echo "Click on Skype's Panel-icon to show the main window" ############################################################### # How can I find the screen co-ordinates of Skype's Panel Icon ############################################################### else # Skype is running, and has (at least) one visible window which matches $windmask. Activate it. wmctrl -a "$wintitle" fi else # The process is not currently running. Start it. ("$procname" &) fi

    Read the article

1