calandoa / movescreen

Linux script to move windows across screens
254 stars 40 forks source link

it don't work #17

Open tellervo99 opened 2 months ago

tellervo99 commented 2 months ago

/usr/bin/env: ‘python’: No such file or directory

most functional pissthon software

calandoa commented 2 months ago

x

danielbaak commented 1 month ago

Is Python installed? If yes, it might only be available in the path as python3, you could symlink it to python in that case.

Alternatively you could explicitly pass the script to the python interpreter instead of attempting to execute the script (something like python ./movescreen).

poleguy commented 2 weeks ago

This has worked for years wonderfully. It stopped working for me recently on Ubuntu 22.04 You are absolutely correct. In a new window I tried and sure enough, no python any longer!:

poleguy@elgar:~$ /usr/local/bin/movescreen.py right
/usr/bin/env: ‘python’: No such file or directory
poleguy@elgar:~$ which python
poleguy@elgar:~$ 

My simple hack to fix was to change the shebang to call out python3:

!/usr/bin/env python3

I use this with a keyboard shortcut Ctrl+Super+Left and Ctrl+Super+Right and it keeps my hand off the mouse.

Thanks!

calandoa commented 2 weeks ago

Looks like Ubuntu discarded python exec for security reasons because Python 2 was totally discontinued : https://stackoverflow.com/questions/3655306/ubuntu-usr-bin-env-python-no-such-file-or-directory

I might change the shebang. Another solution could be : sudo apt install python-is-python3