SOLVED - need xbindkeys/xmodmap help/alternative

I've got a trackball keyboard without a middle mouse button: nice but still a catastrophe.
From the xbindkeys manpage:
XbindKeys is a program that grab keys and mouse button events in X and starts associated shell command.
Thing is, I don't want to run a shell command (I think) but want to remap another key or key combination so it gets interpreted as a middle mouse click.
afaik xmodmap should be capable of doing this but despite searching I cannot for the life of me make out how to do it
Last edited by toad (2011-10-08 21:35:19)

Excellent! Thanks for that info, it worked a treat. Now I'm able to copy and paste as per usual. Now looking for convenient keys for click 4 and 5
Am marking this as solved.

Similar Messages

  • [SOLVED] Need a little help with ACPI handler.sh script.

    By using ACPI I'm trying to get my laptop to hibernate at critical power state. So far I've made a few test scripts to test how to do this, with one of these scripts I'm stuck. My scripting skills are not that good to solve it.
    This is the script:
    if [ `awk '{print $3}' /proc/acpi/battery/C1E9/state` == "ok" ]
    then
    logger "battery is ok"
    else
    logger "battery is not ok"
    fi
    If I run the script I get an error (while "battery is not ok" is logged):
    ┌─[~]
    └─> ./test2
    ./test2: line 1: [: too many arguments
    ┌─[~]
    └─>
    When I run the awk-command from the script, I get the following output:
    ┌─[~]
    └─> awk '{print $3}' /proc/acpi/battery/C1E9/state
    ok
    discharging
    2341
    1824
    10969
    ┌─[~]
    └─>
    I think the problem lies in the multiple output of the awk-command, but I'm stuck in solving it.
    Any help would be great.
    Last edited by NeoXP (2009-11-16 22:40:45)

    @ skanky
    Thanks for the suggestion, but you're right I'm not gonna change a working script. It is working exactly as expected.
    @ all
    When interested this is my current handler.sh
    #!/bin/sh
    # Default acpi script that takes an entry for all actions
    # NOTE: This is a 2.6-centric script. If you use 2.4.x, you'll have to
    # modify it to not use /sys
    minspeed=`cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq`
    maxspeed=`cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq`
    setspeed="/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed"
    set $*
    case "$1" in
    button/power)
    echo "PowerButton pressed!">/dev/tty5
    case "$2" in
    PWRF) logger "PowerButton pressed: $2" ;;
    *) logger "ACPI action undefined: $2" ;;
    esac
    button/sleep)
    case "$2" in
    SLPB) echo -n mem >/sys/power/state ;;
    *) logger "ACPI action undefined: $2" ;;
    esac
    ac_adapter)
    case "$2" in
    AC)
    case "$4" in
    00000000)
    echo -n $minspeed >$setspeed
    #/etc/laptop-mode/laptop-mode start
    00000001)
    echo -n $maxspeed >$setspeed
    #/etc/laptop-mode/laptop-mode stop
    esac
    *) logger "ACPI action undefined: $2" ;;
    esac
    battery)
    if [ `awk '{print $2}' /proc/acpi/ac_adapter/C1E8/state` == "off-line" ];
    then
    logger "battery discharging"
    if (( `awk '{if (NR==5) {print $3}}' /proc/acpi/battery/C1E9/state` >= "250" ))
    then
    logger "battery ok"
    else
    logger "battery not ok"
    /usr/sbin/pm-hibernate;
    fi
    else logger "battery charging"
    fi
    button/lid)
    if [ `awk '{print $2}' /proc/acpi/button/lid/C1ED/state` == "closed" ];
    then
    logger "ACPI lid closed"
    /usr/sbin/pm-suspend
    fi
    logger "ACPI group/action undefined: $1 / $2"
    esac
    Still working on it though

  • [Solved] Need some conky help

    Hi,
    I'm battling with two conky issues related to audacious & hddtemp.
    EDIT: Feel a bit daft now, ${if_running audacious}${exec audtool current-song-tuple-data title} - ${exec audtool current-song-tuple-data artist} sorted the audacious issue out.
    I cannot get HDD temperature to be displayed, it's just blank. I have hddtemp daemon running and I can get the details from the hdd with hddtemp and nc.
    Temperature: ${alignr}${execi sudo hddtemp /dev/sda 127.0.0.1 7634 | cut -c20-21}°C
    I've also tried using execi nc 127.0.0.1 7634 | cut -c20-21 but both just come up blank.
    I'm probably missing something obvious, any ideas?
    Last edited by mips1 (2011-07-18 22:31:00)

    To answer the original question, just for future reference...
    "execi" requires an interval before the command.  So instead of
    Temperature: ${alignr}${execi sudo hddtemp /dev/sda 127.0.0.1 7634 | cut -c20-21}°C
    you should use something like
    Temperature: ${alignr}${execi 30 sudo hddtemp /dev/sda 127.0.0.1 7634 | cut -c20-21}°C
    That would refresh the info every 30 seconds.

  • [solved] Need a little help with sed and regular expressions

    Hello!
    I am shure this is something easy for most of you
    I want to make a script, which converts filenames of my ripped MP3s (replaces '_' with spaces, removes leading track numbers...)
    But I have some problems:
    j=$(echo $j | sed 's/_\+/ /g')
    j=$(echo $j | sed 's/^[0-9]{0,3}//g')
    j=$(echo $j | sed 's/[^ ]-[^ ]/ - /g')
    j=$(echo $j | sed 's/_\+/ /g') << this is working fine (converts all "_" to spaces)
    j=$(echo $j | sed 's/^[0-9]{0,3}//g') << is NOT working, why??
    For Example in "01-somebody_feat_someone-somemusic.mp3" the leading "01" number is NOT being removed..
    j=$(echo $j | sed 's/[^ ]-[^ ]/ - /g') << how can I insert spaces before and after the "-"?
    So that "someone-somemusic" becomes "someone - somemusic" (but only where "-" is surrounded by letters)
    Last edited by cyberius (2011-07-27 18:50:54)

    For sed, you must escape { and } to use them as you want (just slap a \ before them).
    For the last expression, capture the letter before/after the dash -- use \( and \) -- and then substitute it for something like "\1 -" and then "- \1". You'll want to split this into two pieces, one for the front and one for the back so you can get "somemusic -someband" the way you want without a bunch of cases.
    Edit: Or, you could just do a replace for "-" to be " - " and then have another expression to reduce spaces. I see you've used \+ before, so I'm guessing you can figure that out
    Also, sed has the -e switch so you can do multiple different expressions with one invocation.
    Also (also), have you looked into something like Picard with automatic track renaming? You can even customize how they are renamed.
    Edit (2): Also^3, check out prename. There are different versions, ones which use PCRE and ones that use other standards, but it is for renaming files based on regular expressions, which is what you're doing. In any case, you might want to put you script into the User made scripts thread when you feel more comfortable and get some more critiquing, if you're interested.
    Last edited by jac (2011-07-26 23:13:27)

  • Hard Drive Failure on HP DV 6000 Pavilion laptop Windows-XP​sp3 OS - Need Data Recovery Help

    Hard Drive Failure on HP DV 6000 Pavilion laptop - Need Data Recovery Help
    HP Pavilion DV 6108 NR, RG365UA, purchased in late 2006 at Best Buy, with Windows XP, upgraded to Service Pack 3. It has a Fujitsu hard disk, 60 gigabyte, partitioned into C: and a Recovery D:.
    Windows tries to boot up, but goes to blue screen with the message: "Unmountable Boot Volume" for one second, then just keeps recycling until I force a shutdown.
    BIOS Phoenix, hard drive test result: " #1-08 Fail "
    I ran a disk analysis/recovery program on the Cdrive and it seemed to show the directory structure intact, and it was able to recover some files. I was using the free one from Seagate (which only recovers small files). The second pass didn't run so well, and during the third run the program said I should not proceed further, and I should contact a professional disk recovery company.
    However, the D drive seems to be intact, so, I wonder if the disk is corrupted or just some aspect of the logical C drive is bad.
    How can I get the D: to run the recovery software on it? The recovery disks, made by Best Buy, only proceed to the R / F / Q option screen, and when I press R, I get a blue screen every time.
    Tapping the F10 key during startup gets me nowhere. Ditto the F11 key.
    I dont care about the hard disk; it is the data (files, docs, images, etc)  that I want.
    I contacted HP to order recovery disks but they are no longer available for my computer.
    Any suggestions would be greatly appreciated!
    Jon
    This question was solved.
    View Solution.

    Update...
    I found a website that offers the following:
    http://www.computersurgeons.com/p-13442-recovery-k​it-435422-001-for-hp-model-number-dv6108nr.aspx
    Recovery Kit 435422-001 For HP Model Number dv6108nr
    Price: $27.00
    Recovery Kit Set (An Entire Image of the Computer hard drive when the computer was new)
    But I wonder how useful it would be. Early XP , no doubt. And if my hard disk problem is a mechanical fault, would any recovery disk even work? The disks made by Best Buy when I bought mine new in 2006 don't do anything more than go to the R /F/ Q screen and then goes to a blue screen when I press R (to recover the OS and apps and data files). And, as I wrote, it is the data that I want, not the disk drive.

  • My iphone is on recovery mode and i can´t turn on it, when i try to recover it from itunes i get: "unknown error (36), i´ve tried to do lot of things but i can´t  solve my problem. please help!!

    my iphone is on recovery mode and i can´t turn on it, when i try to recover it from itunes i get: unknown error (36), i´ve tried to do lot of things but i can´t solve my problem. please help!!

    Hi, i had the same problem. Try to find the file "apple" or "itunes" don't know it anymore exactly. Ahm well you need to delet any information or just plug in your iphone into an other computer. important is that your iphone never has been pluged in this computer before. This was what i did, and it worked!

  • Need a quick help on Pro*C

    Hi All,
    I need a quick help on Pro*C. Here's the details on the same:
    - My program takes one input file as parameter. Lets assume argv[2] is the name of the inputfile, which is my input parameter as well.
    - ps_filename = argv[2]; I'm copying argv[2] i.e. filename in a variable called ps_filename
    - Now this inputfile can be of two types, say type A_yyyymmddhhmmss.dat and B_yyyymmddhhmmss.dat.
    - Therefore for every run I'll have one of this value as input parameter which will be copied into the ps_filename.
    - Now I need to call two different functions based on the inputfile i.e. if ps_filename like 'A%' then call func A() else call func B();
    But in ProC/C there is no provision to use like operator.
    Therefore my question is how can I have ps_filename like 'A%' in C?
    Can anyone please help me to solve this issue?
    Hope to get your co-operation.
    Thanks & Regards,
    Debabrata

    debabratas wrote:
    Therefore my question is how can I have ps_filename like 'A%' in C?Hello, why don't you just substring on the first character, and if that's an 'A', then LIKE 'A%' will also hold.
    For example, in Pro*C:
    if (substr(ps_filename,1,1) == 'A') {
    ..

  • I need to get help... edited by host

    I need to get help... My Case ID: <edited by host>
    My English is not good, please forgive me. But I need to get help
    I purchased in China in March of 2t time capsule, can not open yesterday, which has important data.
    China, Hong Kong Plaza Apple store genius to help me split out the hard drive, but I have no other large-capacity hard disk, there is no hard drive connected to the computer data lines.
    I hope that the genius of the new time capsule give me that in China, Hong Kong Plaza Apple store, so I will transfer data from the old hard drive to the new time capsule in China, Hong Kong Plaza Apple store.
    But genius manager: "Anthony Xu" bad attitude not only refused my request, has asked me to buy the apple store the backup hard drive data cable and a new mac computer! Even persecute me sign in confirmation!
    Now, my hard drive in my hands, but I can not get data.
    I contacted the Chinese 400 customer service, they could not help me. But they are eager to help me keep track of the entire event: <edited by host>
    Who can help me T_T

    Sorry, but we are all just fellow users here and have no power to intervene or assist in this issue. You will need to try and work out a solution with the Apple Store or Apple Customer Relations. The only alternative, if I understand correctly that the hard drive from the Time Capsule is working and contains your data would be for you to purchase a case for the hard drive, mount the drive in that case, and recover your data that way.
    Regards.

  • Need IDoc Related Help

    Hi Folks,
    I need an urgent help on IDOC issue for COR3 Transaction.
    We have one legacy system from where data is coming for a particular Process Order. Now in Process Order display transaction COR3 when we go to Good Receipt Tab, and double click on batch, it displays the batch characteristics. Now Batch Detail's classification tab there are characteritics values. These characteristic values are suppose to store multiple values. We have changed in configuration.
    Now when I execute the IDOC it stores only current value. It is kind of that it overwrites the previous value and keeps the new value in it's place and i want to retain all the values from the very beginning to the end. Please help me with the same.
    Siddarth.

    Try a hard reset.Disconnect all external devices first.
    1-remove power cord and battery
    2-press power button for 30 seconds
    3-reinstall only power cord for first startup.
    4-power on
    ******Clicking the Thumbs-Up button is a way to say -Thanks!.******
    **Click Accept as Solution on a Reply that solves your issue to help others**

  • Hi guys i have an ipad 1 and when i plug it in to my macbook pro picasa opens up and show its name but when i open itunes i cant find the name, ive been working my head out to solve the problem please help me:(

    hi guys i have an ipad 1 and when i plug it in to my macbook pro picasa opens up and show its name but when i open itunes i cant find the name, ive been working my head out to solve the problem please help me:(

    Pay no attention to iinami, the amount of replies to people saying their handsets must have been jailbroken everytime iTunes throws out an error is tremendous. (Clearly you don't need to have any real knowledge to get to level 3 on these forums, let's hope apple's geniuses know a lot more than some of their customers.)
    http://support.apple.com/kb/TS3694
    Solution below.
    Error 9
    This error occurs when the device unexpectedly loses its USB connection with iTunes. This can occur if the device is manually disconnected during the restore process. This issue can be resolved by performing USB troubleshooting, using a different USB dock-connector cable, trying another USB port, restoring on another computer, or by eliminating conflicts from third-party security software.

  • I have a hp dv6-1375dx was told maybe i need a motherboard Help!

    i have a hp dv6-1375dx was told maybe i need a motherboard Help! i had to take out my battery because the laptop wouldnt pass the boot up process nor charge either. did i destroy the motherboard doing this or do i need a new power circuit how do i go about ordering these parts

    Try a hard reset.Disconnect all external devices first.
    1-remove power cord and battery
    2-press power button for 30 seconds
    3-reinstall only power cord for first startup.
    4-power on
    ******Clicking the Thumbs-Up button is a way to say -Thanks!.******
    **Click Accept as Solution on a Reply that solves your issue to help others**

  • My iPad shows a message "Cannot find AirPrint printer". I used to use my iPad to print materials using HP wireless printer D110. Now it does not want to print. Is this because I am now using IOS 7? What should I do to solve the problem? Help please.

    My iPad shows a message "Cannot find AirPrint printer". I used to use my iPad to print materials using HP wireless printer D110. Now it does not want to print. Is this because I am now using IOS 7? What should I do to solve the problem? Help please.

    Restart your WiFi router and printer by removing power for 30 seconds.

  • I need advise and help with this problem . First , I have been with Mac for many years ( 14 to be exact ) I do have some knowledge and understanding of Apple product . At the present time I'm having lots of problems with the router so I was looking in to

    I need advise and help with this problem .
    First , I have been with Mac for many years ( 14 to be exact ) I do have some knowledge and understanding of Apple product .
    At the present time I'm having lots of problems with the router so I was looking in to some info , and come across one web site regarding : port forwarding , IP addresses .
    In my frustration , amongst lots of open web pages tutorials and other useless information , I come across innocent looking link and software to installed called Genieo , which suppose to help with any router .
    Software ask for permission to install , and about 30 % in , my instinct was telling me , there is something not right . I stop installation . Delete everything , look for any
    trace in Spotlight , Library . Nothing could be find .
    Now , every time I open Safari , Firefox or Chrome , it will open in my home page , but when I start looking for something in steed of Google page , there is
    ''search.genieo.com'' page acting like a Google . I try again to get raid of this but I can not find solution .
    With more research , again using genieo.com search eng. there is lots of articles and warnings . From that I learn do not use uninstall software , because doing this will install more things where it come from.
    I do have AppleCare support but its to late to phone them , so maybe there some people with knowledge , how to get this of my computer
    Any help is welcome , English is my learned language , you may notice this , so I'm not that quick with the respond

    Genieo definitely doesn't help with your router. It's just adware, and has no benefit to you at all. They scammed you so that they could display their ads on your computer.
    To remove it, see:
    http://www.thesafemac.com/arg-genieo/
    Do not use the Genieo uninstaller!

  • Need a little help new to mac

    Need a little help I'm new to Mac.. i have had my ibook for over a year now and i like it a lot, but some times my usb post dies on my for a couple days maybe weeks. Ill have my ipod connected and when i go to plug in a flash drive. It doesn't detect my ipod anymore and my usb port don't work. it says that they were "removed improperly" and now they are not working again..i have tried to reinstall the whole os again and that doesn't work i don't have the hardware test disk so i don't know what could be the problem i know its not the logic board is there any test i can do to it to find out the problem its an ibook late 2001... there is no reset button on it. i tried to hold in the space bar and now when i boot up i get prompt to this screen that shows the world and then a folder with a ? mark but then after a few sec it boots right up im a mess need some help

    +it says that they were "removed improperly"+
    You have to go to the iPod's icon on your computer (or the flash drive's icon), select it and eject it there before removing it. Otherwise, data can be corrupted and/or lost. Repeatedly removing it without ejecting it from the desktop can cause it not to be recognized any longer.
    If your iBook is a "late 2001" model. It should have a reset button. Check out the chart here to make sure which model iBook you have:
    http://support.apple.com/kb/HT1772?viewlocale=en_US
    +i get prompt to this screen that shows the world and then a folder with a ? mark but then after a few sec it boots right up+
    It's trying to find a network volume from which to boot.
    Once it's booted up, go to System Preferences > Startup Disk, and select your Mac OS X startup volume. Then close System Preferences. The next time you start up, it should start up without looking for a network volume.

  • In iTunes the iPhone device icon will not show up whenever I plug in a USB into my PC but the iPhone icon will show up in 'This PC'  so if anyone who knows a resolution to my problem with my iTunes or PC,it would really help me.I need at least Help or Tip

    In iTunes the iPhone device icon will not show up whenever I plug in a USB into my PC but the iPhone icon will show up in 'This PC'  so if anyone who knows a resolution to my problem with my iTunes or PC,it would really help me.I need at least Help or some Tips.I have already tried many things to iTunes and my PC like trying to restore my PC but that do anything.Also,would it be fine if i contacted (call) Apple Support? Please,I need help because what I think is wrong is my PC,iPhone,or USB might be messed up so if anyone could help me with this,it would be really helpful and for anyone to be nice enough to help me.

    I think this article will help you.

Maybe you are looking for

  • Opening Dreamweaver 8 files in MX?

    I recently designed a basic html site for a friend using Studio 8. Unfortunately all my friend has is Dreamweaver MX. When she opens the files, all she get is blank page. I tried this at work in Dreamweaver MX 2004 and get the same results. Even in j

  • Permissions problem copying folders from Leopard to Lion

    I just got a new iMac (running Lion) to replace my old G4, running Leopard (10.5.8). I'm trying to copy entire folders (with many items inside) from the old G4 to the new iMac. I get a message saying something to the effect that "One or more items ca

  • Item Master Data

    Hi there, Item descriptions update on master data does not get read into existing sales orders and subsequently when delivery dockets and invoice are generated, they are all not updated. Could the SAP programmer analysts please fix this bug? thanks.

  • QStats31.dis not working

    I imported qstats31.eex in on the Admin side, and then tried to run the Qstats31.dis file, but I get the message: ORA-06502:PL/SQL: numereric error or value ORA-06512:at "ORA15A.EUL_GET_OBJECT_NAME",line 1 ORA-06512:at line 1 Any idea what I did wron

  • Will Snow Leopard run older PPC software, pre-universal binary stuff?

    Hi there I know this is probably the most stupid question in the world, and I know that Snow Leopard dropped support for PPC and is intel only. Does this mean that I could no longer run my CS2, MS Office 2004 and Quark 6.5 (as none of these were univ