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

Lazycast broken by bullseye's removal of python2 #102

Open
shodanx2 opened this issue Dec 9, 2021 · 4 comments
Open

Lazycast broken by bullseye's removal of python2 #102

shodanx2 opened this issue Dec 9, 2021 · 4 comments

Comments

@shodanx2
Copy link

shodanx2 commented Dec 9, 2021

Working on a fix,
Managed to install python2 but not the dependant libraries, even with pip2 installed, dbus fails to install

@barhun
Copy link
Contributor

barhun commented Jan 1, 2022

The steps I followed to make it run on python3:

  • Run the command sudo apt-get install -y python3-dbus in a terminal.
  • Replace the statement import gobject in mice.py with from gi.repository import GObject as gobject
  • Replace the shebangs with either #!/usr/bin/env python or #!/usr/bin/env python3
  • In python scripts, use print function calls instead of print statements

@JpTiger
Copy link

JpTiger commented Feb 18, 2022

Any chance you (or someone else who's already done it ) would be willing to upload the modified mice.py to the repo with those changes? I tried doing it myself and I'm still getting errors about python2 when running all.sh, which makes me think I'm probably doing it wrong, and that others following these directions likely will, too.

EDIT: Just realized that bullets 3-4 don't just apply to mice.py but ALL the python scripts

@barhun
Copy link
Contributor

barhun commented Mar 3, 2022

  • To decode strings from hex, replace the expression capandhostmessage.decode('hex') in mice.py with bytes.fromhex(capandhostmessage).decode('utf-8')
  • In python scripts, to encode strings in hex, use .encode('utf-8').hex() instead of .encode('hex')

Note: I'm not sending a PR since I'm still not sure whether there might be other changes required to make this repo fully compatible with python3.

@barhun
Copy link
Contributor

barhun commented Mar 16, 2022

Opened the PR #106.

@homeworkc homeworkc pinned this issue Jan 17, 2023
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