Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xlib.error.BadAccess install bug #12

Open
SimonDedman opened this issue Feb 21, 2019 · 5 comments
Open

Xlib.error.BadAccess install bug #12

SimonDedman opened this issue Feb 21, 2019 · 5 comments

Comments

@SimonDedman
Copy link

Hey Michael,

Looking to install pygrid, thanks for the clear instructions. Hitting a wall immediately though:

$ ./pygrid.py
Writing default config: /home/simon/.config/pygrid.json
PyGrid running. Press CTRL+C to cancel.
X protocol error:
<class 'Xlib.error.BadAccess'>: code = 10, resource_id = 492, sequence_number = 15, major_opcode = 33, minor_opcode = 0
X protocol error:
<class 'Xlib.error.BadAccess'>: code = 10, resource_id = 492, sequence_number = 16, major_opcode = 33, minor_opcode = 0
X protocol error:
<class 'Xlib.error.BadAccess'>: code = 10, resource_id = 492, sequence_number = 17, major_opcode = 33, minor_opcode = 0
X protocol error:
<class 'Xlib.error.BadAccess'>: code = 10, resource_id = 492, sequence_number = 18, major_opcode = 33, minor_opcode = 0
X protocol error:
<class 'Xlib.error.BadAccess'>: code = 10, resource_id = 492, sequence_number = 19, major_opcode = 33, minor_opcode = 0
X protocol error:
<class 'Xlib.error.BadAccess'>: code = 10, resource_id = 492, sequence_number = 20, major_opcode = 33, minor_opcode = 0
X protocol error:
<class 'Xlib.error.BadAccess'>: code = 10, resource_id = 492, sequence_number = 21, major_opcode = 33, minor_opcode = 0
X protocol error:
<class 'Xlib.error.BadAccess'>: code = 10, resource_id = 492, sequence_number = 22, major_opcode = 33, minor_opcode = 0
X protocol error:
<class 'Xlib.error.BadAccess'>: code = 10, resource_id = 492, sequence_number = 23, major_opcode = 33, minor_opcode = 0

For info:

$ Xorg -version
/usr/lib/xorg/Xorg.wrap: Only console users are allowed to run the X server
$ apt-cache show xserver-xorg | grep Version
Version: 1:7.7+19ubuntu8
$ python -V
Python 2.7.15+
$ apt-cache show python-xlib | grep Version
Version: 0.23-2
$ lsb_release -a
LSB Version:	core-9.20170808ubuntu1-noarch:printing-9.20170808ubuntu1-noarch:security-9.20170808ubuntu1-noarch
Distributor ID:	Ubuntu
Description:	Ubuntu 18.10
Release:	18.10
Codename:	cosmic
$ printf 'Desktop: %s\nSession: %s\n' "$XDG_CURRENT_DESKTOP" "$GDMSESSION"
Desktop: XFCE
Session: xubuntu

Any thoughts? Run as sudo?

Thanks!

@npetzall
Copy link

npetzall commented Feb 28, 2019

Just got the same error and it's because the keys are already bound.

You either need to remove the current bindings or change ~/.config/pygrid.json

I'm on a laptop without numpad so I use super + alt as modifieras and then number 0 to 9.

So my keys looks like this

"keys": {
    "accelerator": "<Mod1><Mod4>",
    "commands": {
      "0": "maximize",
      "1": "bottomleft",
      "2": "bottom",
      "3": "bottomright",
      "4": "left",
      "5": "middle",
      "6": "right",
      "7": "topleft",
      "8": "top",
      "9": "topright"
    }
  }

I'm also on Xubuntu.

@SimonDedman
Copy link
Author

Good intel Nils, & looking very sharp in your wedding gear there mate!

I'll give it a try this weekend. Cheers!

@pkkid
Copy link
Owner

pkkid commented Mar 1, 2019

Thanks for the feedback. If this works for you this weekend, let me know and I'll look ad adding a better error message for future users.

@SimonDedman
Copy link
Author

Trying this now. Michael one thing for future updates of the readme file, it would be nice to explain how the default shortcuts (alt+ctrl+numpads) translate to the accelerator which Nils changed (crtl mod1 mod2 as default, mod1 mod4 for Nils' edit. Maybe these are python's names for specific keys? Or ubuntu standards? Either way it would be nice to help the user understand what these are.

Next thing is that I don't have anything bound to alt+crtl+numpads according to my keyboard application shortcuts (though I have a dim memory of there being other key bindings stored somewhere else as well maybe...?). I changed to Nils' settings and it worked fine but still kinda odd.

@SimonDedman
Copy link
Author

SimonDedman commented May 1, 2019

Similarly: it would be good to point users to a list of acceptable key names. Again, IDK if these are python or linux or what, so if I want to change from numpad to arrows, IDK what arrow names are. Possibly these: http://infohost.nmt.edu/tcc/help/pubs/tkinter/web/key-names.html ? Would be good to point to something like this in the readme.
Though Left Right Up Down Prior Next don't work on my laptop with no numpad...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants