pkkid / x11pygrid

Quickly move windows around the an X11 desktop
GNU General Public License v2.0
324 stars 41 forks source link

Pygrid keybinding doesn't work in a startup script #18

Open owenthereal opened 4 years ago

owenthereal commented 4 years ago

I have the following autostart script in ~/.config/autostart/pygrid.desktop:

cat ~/.config/autostart/pygrid.desktop 
[Desktop Entry]
Type=Application
Exec=/usr/bin/python3 /home/owen/code/pygrid/pygrid.py
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name[en_CA]=Pygrid
Name=Pygrid
Comment[en_CA]=
Comment=

None of the keybindings work. But if I run ./pygrid.py in a terminal, everything works as expected. What do I miss?

pkkid commented 4 years ago

This should be fine. Maybe you can send the output of the call to a log file and see what it's saying. Change the exec line to the following to and see if there are error messages you can capture and fix.

Exec=/usr/bin/python3 /home/owen/code/pygrid/pygrid.py >> /home/owen/pygrid.log 2>&1
rvega commented 4 years ago

Same issue here... The log file you suggested comes out empty. As a workaround, I added the following line to ~/.profile but the .desktop file would be great because I would be able to launch it with the usual GUI tools.

/path/to/pygrid/pygrid.py &

Delawen commented 4 years ago

Same with me. The log is empty and the startup script doesn't work. But the .profile trick worked.

$ python3 --version
Python 3.7.3
$ python --version
Python 2.7.16
$ uname -a
Linux 4.19.0-11-amd64 #1 SMP Debian 4.19.146-1 (2020-09-17) x86_64 GNU/Linux