Page 87 of 128 FirstFirst ... 3777858687888997 ... LastLast
Results 861 to 870 of 1273

Thread: btnx: Send keyboard and mouse combination events with mouse buttons

  1. #861
    Join Date
    Jan 2007
    Beans
    85

    Re: btnx: Send keyboard and mouse combination events with mouse buttons

    Quote Originally Posted by daou View Post
    About integrating btnx-config to the mouse tab: it can be done with enough work. But there are a few problems which are mostly related to user permissions. First, the program would not be able to read the mouse input handlers because they require root permissions. This is one reason why you need to run btnx-config as root. It's a smart layer of security, because for example key loggers could easily read your keyboard as well. So this means the button detection would have to be run as root.
    Why not run mouse/button detection as root, with a gksudo-style login prompt. Detect the mouse, and list the buttons as reported by the mouse. Upon "button detection", automatically highlight the button name for replacement with a user supplied name.
    Quote Originally Posted by daou View Post
    If those preferences use btnx to send the events, then some changes need to be made so each user can have their own btnx configuration in their home directory. This leads to another problem. btnx requires root permissions to run, so it would have to be started as a daemon during boot (like it is now). But btnx has no way of knowing when a user logs in and when a user configuration needs to be loaded.
    Maybe an added layer of security where the base btnx daemon reads the mouse input handlers with root privileges, and forwards only the ones for the detected buttons. Then add a user-level interface allowing for simple juggling of key combinations, revoco, and end-user configuration switching, while in depth functions such as command execution can only be accomplished as root. Divorcing the daemon from direct user contact seems to me to be a good idea, while allowing for increased flexibility.
    EDIT: I think command execution should only be allowed based upon the UID of the user.
    Quote Originally Posted by daou View Post
    This would need something like dbus (or unix domain socket). So when a user logs in, they can launch an applet or other startup program to make btnx load the user's configuration through interprocess communication.


    Also, please consider creating a default UID that would be permanently inactive/null. This would require the user to consciously choose a good UID, not just blindly click through letting commands be executed as root.
    Last edited by blazoner; March 24th, 2008 at 05:50 AM.
    When the only peace your enemy understands is the "Peace of the dead," you have no choice but to make peace in those terms.

  2. #862
    Join Date
    Oct 2006
    Beans
    44

    Re: btnx: Send keyboard and mouse combination events with mouse buttons

    I am totally at a loss. Btnx no longer works with Banshee and Rhythmbox. I built my profile as root, the daemon is running with the events set, xmodmap maps the keys, and the events are set in Keyboard Shortcuts. I have verified that the events are correct through xev, but they don't do anything when I press the buttons on the mouse with the media player.

    All of the other buttons work well. I can raise and lower the volume and go backwards and forwards in Firefox and Nautilus. It is just that the multimedia keys are not being recognized by the media players. Daou, any idea what could be going on? I have the latest trunk running. Btnx worked for a while then Ubuntu bumped Banshee to 0.13.2.

    Thanks

  3. #863
    Join Date
    Jan 2007
    Beans
    85

    Re: btnx: Send keyboard and mouse combination events with mouse buttons

    milliman, could you try disabling those specific buttons? Previously, someone reported that some media buttons were being picked up directly by some apps. This might be the case here, and if so, having the keys enabled might conflict.

    I hope this helps.
    When the only peace your enemy understands is the "Peace of the dead," you have no choice but to make peace in those terms.

  4. #864
    Join Date
    Oct 2006
    Beans
    44

    Re: btnx: Send keyboard and mouse combination events with mouse buttons

    blazoner:

    Thanks for the replay. Disable the keys how? In the Keyboard Shortcuts or with xmodmap. I set them with xmodmap because they weren't originally being seen by any apps. Please inform as to which application.

    Thanks

    EDIT: I stopped remapping the keys with xmodmap and reset the shortcuts in Keyboard Shortcuts then my Play/Pause, Skip Forward, and Skip Backward buttons worked. Now if I can just get the Media button to work. xev says that pressing it is the same as button 2 which Compiz maps. I turned off the mapping and Compiz but it did not work. I am wondering if Nautilus starts the default media player when seeing the XF86AudioMedia key. I tried running a command as root and my UID but DBus does not start so I can't use my other buttons. Closer, but stumped.

    EDIT: I remapped the Media button in btnx-config to RightAlt-F12 and set the Keyboard Shortcut for Launch Media Player to Meta5-F12. Still did not work. I changed the default media player to Rhythmbox but nothing happened. I am beginning to wonder if the Keyboard Shortcuts have a bug.
    Last edited by milliman; March 23rd, 2008 at 02:20 AM.

  5. #865
    Join Date
    Jan 2007
    Beans
    85

    Re: btnx: Send keyboard and mouse combination events with mouse buttons

    Quote Originally Posted by milliman View Post
    Thanks for the replay. Disable the keys how? In the Keyboard Shortcuts or with xmodmap. I set them with xmodmap because they weren't originally being seen by any apps. Please inform as to which application.

    Thanks
    I meant buttons, not keys. Go into btnx-config and uncheck the "Enabled" check-box in the General section of Button properties. This will keep btnx from sending events of it's own when you press the buttons, allowing you to see what the player(s) will do with just the raw info from the mouse. This is easy to reverse by re-checking the option in btnx-config.

    EDIT: I stopped remapping the keys with xmodmap and reset the shortcuts in Keyboard Shortcuts then my Play/Pause, Skip Forward, and Skip Backward buttons worked. Now if I can just get the Media button to work. xev says that pressing it is the same as button 2 which Compiz maps. I turned off the mapping and Compiz but it did not work. I am wondering if Nautilus starts the default media player when seeing the XF86AudioMedia key. I tried running a command as root and my UID but DBus does not start so I can't use my other buttons. Closer, but stumped.
    Button 2 is a right-click. If your media button is producing this, generally the first steps would be to either remap your buttons with xmodmap, which in your case seemed to be disastrous, or to do something about the number of buttons that your xorg.conf is reporting to your WM.
    In the xorg.conf file is a line that says
    Code:
     Option "Buttons" "3"
    this is stating that your mouse only has 3 buttons to work with, and causes your WM to try to translate all button presses into the first 3 buttons.
    In my xorg.conf section, I have removed the entire line with no adverse effects. I have also seen others report some success with changing this number to the actual number of buttons on their particular mouse.
    EDIT: I remapped the Media button in btnx-config to RightAlt-F12 and set the Keyboard Shortcut for Launch Media Player to Meta5-F12. Still did not work. I changed the default media player to Rhythmbox but nothing happened. I am beginning to wonder if the Keyboard Shortcuts have a bug.
    How about remapping the media button directly as a command execution event? Just by typing the full path to your rhythmbox install.

    Hope all this helped!
    When the only peace your enemy understands is the "Peace of the dead," you have no choice but to make peace in those terms.

  6. #866
    Join Date
    Oct 2006
    Beans
    44

    Re: btnx: Send keyboard and mouse combination events with mouse buttons

    If I try to run a command like /usr/bin/banshee the command executes but the program does not work properly. If I run it as root, then it does not use my settings and music database. If I run it under my UID, then I receive a dbus error and the buttons don't work. I tried a shell script executing it with su but that did not work either. Any suggestions would be helpful.

  7. #867
    Join Date
    Jan 2007
    Beans
    85

    Re: btnx: Send keyboard and mouse combination events with mouse buttons

    Sounds like a Banshee problem. Unfortunately, that's beyond my experience.
    When the only peace your enemy understands is the "Peace of the dead," you have no choice but to make peace in those terms.

  8. #868
    Join Date
    Oct 2006
    Beans
    44

    Re: btnx: Send keyboard and mouse combination events with mouse buttons

    Blazoner:

    The button recognition with multimedia keys is most likely a Hardy problem. The command launching issue is really a cross between Banshee and btnx. Since the btnx daemon does not spawn a subprocess under the user's ID, it executes as root or from root without inheriting any of the user's session parameters. This causes programs that use dbus and other user spawned processes to fail. btnx should seriously consider launching the programs in the user's current session. This would fix mine and other people's problems.

    I still love the program. It is the only thing that makes my Logitech MediaPlay mouse work with Linux.

  9. #869
    Join Date
    Jan 2007
    Beans
    85

    Re: btnx: Send keyboard and mouse combination events with mouse buttons

    milliman,
    Actually, it sounds like a part of the problem I was attempting to address in this thread. I really think that divorcing the processes of button detection and reading input handlers from the other functions of btnx is an important step, especially in network environments where mass roll-outs of hardware and maintenance of security protocols are already in a precarious balance.
    Having all workstations with a specialty mouse setup running all of btnx at a root level of security seems like a nightmare ready to happen.
    Being able to drop in the btnx daemon as a root process that the user never has to deal with directly, but instead has an interface that said user can customize to do anything he/she wants to and has authorization for, seems a valid layer of security.
    Of course, this is all conjecture, and I'm no expert at any level, but it seems logical to me.
    When the only peace your enemy understands is the "Peace of the dead," you have no choice but to make peace in those terms.

  10. #870
    Join Date
    Oct 2006
    Beans
    44

    Re: btnx: Send keyboard and mouse combination events with mouse buttons

    blazoner:

    We are pretty much in agreement. It is one thing to install btnx on this box where it is my toy and I am the administrator, but this program will never fly in a corporate environment. I work with some pretty anal retentive IT people in the telecom industry where they do not give anyone admin access unless there are all sorts of approvals. They have good reasons most of the time for their behavior.

    btnx would never be installed in these enviornments unless under a generic profile that fits only one type of mouse. The architecture and security model should be reviewed with these situations in mind before it is included in any Linux distro.

    Having said that, btnx is one of the most vital applications on this machine. If someone comes in my office or the phone rings, I just hit the pause button or adjust the volume. I love it!

Page 87 of 128 FirstFirst ... 3777858687888997 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •