mirror of
https://github.com/kbumsik/VirtScreen.git
synced 2025-03-09 15:40:18 +00:00
Setup.py: Fixed wrong desktop entry path
This commit is contained in:
parent
ca5af0235a
commit
605f906371
4 changed files with 13 additions and 11 deletions
8
Makefile
8
Makefile
|
@ -7,15 +7,13 @@ python-wheel:
|
||||||
/usr/bin/python3 setup.py bdist_wheel --universal
|
/usr/bin/python3 setup.py bdist_wheel --universal
|
||||||
|
|
||||||
python-install:
|
python-install:
|
||||||
sudo /usr/bin/python3 setup.py install
|
/usr/bin/pip3 install . --user
|
||||||
|
|
||||||
python-uninstall:
|
python-uninstall:
|
||||||
sudo /usr/bin/pip3 uninstall virtscreen
|
/usr/bin/pip3 uninstall virtscreen
|
||||||
sudo rm /usr/share/applications/virtscreen.desktop
|
|
||||||
sudo rm /usr/share/pixmaps/virtscreen.png
|
|
||||||
|
|
||||||
python-clean:
|
python-clean:
|
||||||
sudo rm -rf build dist virtscreen.egg-info virtscreen/qml/*.qmlc
|
rm -rf build dist virtscreen.egg-info virtscreen/qml/*.qmlc
|
||||||
|
|
||||||
pip-upload: python-wheel
|
pip-upload: python-wheel
|
||||||
twine upload dist/*
|
twine upload dist/*
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
#!/usr/bin/env xdg-open
|
|
||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Encoding=UTF-8
|
Encoding=UTF-8
|
||||||
Type=Application
|
Type=Application
|
||||||
Name=VirtScreen
|
Name=VirtScreen
|
||||||
Comment=Make your iPad/tablet/computer as a secondary monitor on Linux
|
Comment=Make your iPad/tablet/computer as a secondary monitor on Linux
|
||||||
Exec=virtscreen
|
Exec=bash -c "export PATH=$PATH:$HOME/.local/bin; virtscreen"
|
||||||
Icon=virtscreen
|
Icon=virtscreen
|
||||||
Terminal=false
|
Terminal=false
|
||||||
StartupNotify=false
|
StartupNotify=false
|
||||||
|
|
6
setup.py
6
setup.py
|
@ -180,8 +180,10 @@ setup(
|
||||||
data_files=[
|
data_files=[
|
||||||
# Desktop entries spec:
|
# Desktop entries spec:
|
||||||
# https://www.freedesktop.org/wiki/Specifications/desktop-entry-spec/
|
# https://www.freedesktop.org/wiki/Specifications/desktop-entry-spec/
|
||||||
('/usr/share/applications', ['data/virtscreen.desktop']),
|
('share/applications', ['data/virtscreen.desktop']),
|
||||||
('/usr/share/pixmaps', ['data/virtscreen.png']),
|
# $XDG_DATA_DIRS/icons
|
||||||
|
# https://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html#directory_layout
|
||||||
|
('share/icons', ['data/virtscreen.png']),
|
||||||
# ('share/man/man1', ['man/virtscreen.1'])
|
# ('share/man/man1', ['man/virtscreen.1'])
|
||||||
], # Optional
|
], # Optional
|
||||||
|
|
||||||
|
|
|
@ -20,8 +20,11 @@ from netifaces import interfaces, ifaddresses, AF_INET
|
||||||
# -------------------------------------------------------------------------------
|
# -------------------------------------------------------------------------------
|
||||||
# Sanitize environment variables
|
# Sanitize environment variables
|
||||||
# https://wiki.sei.cmu.edu/confluence/display/c/ENV03-C.+Sanitize+the+environment+when+invoking+external+programs
|
# https://wiki.sei.cmu.edu/confluence/display/c/ENV03-C.+Sanitize+the+environment+when+invoking+external+programs
|
||||||
del os.environ['HOME'] # Delete $HOME env for security reason. This will make
|
|
||||||
|
# Delete $HOME env for security reason. This will make
|
||||||
# Path.home() to look up in the password directory (pwd module)
|
# Path.home() to look up in the password directory (pwd module)
|
||||||
|
if 'HOME' in os.environ:
|
||||||
|
del os.environ['HOME']
|
||||||
os.environ['PATH'] = os.confstr("CS_PATH") # Sanitize $PATH
|
os.environ['PATH'] = os.confstr("CS_PATH") # Sanitize $PATH
|
||||||
|
|
||||||
# Setting home path and base path
|
# Setting home path and base path
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue