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
10
Makefile
10
Makefile
|
@ -7,15 +7,13 @@ python-wheel:
|
|||
/usr/bin/python3 setup.py bdist_wheel --universal
|
||||
|
||||
python-install:
|
||||
sudo /usr/bin/python3 setup.py install
|
||||
/usr/bin/pip3 install . --user
|
||||
|
||||
python-uninstall:
|
||||
sudo /usr/bin/pip3 uninstall virtscreen
|
||||
sudo rm /usr/share/applications/virtscreen.desktop
|
||||
sudo rm /usr/share/pixmaps/virtscreen.png
|
||||
|
||||
/usr/bin/pip3 uninstall virtscreen
|
||||
|
||||
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
|
||||
twine upload dist/*
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
#!/usr/bin/env xdg-open
|
||||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Type=Application
|
||||
Name=VirtScreen
|
||||
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
|
||||
Terminal=false
|
||||
StartupNotify=false
|
||||
|
|
6
setup.py
6
setup.py
|
@ -180,8 +180,10 @@ setup(
|
|||
data_files=[
|
||||
# Desktop entries spec:
|
||||
# https://www.freedesktop.org/wiki/Specifications/desktop-entry-spec/
|
||||
('/usr/share/applications', ['data/virtscreen.desktop']),
|
||||
('/usr/share/pixmaps', ['data/virtscreen.png']),
|
||||
('share/applications', ['data/virtscreen.desktop']),
|
||||
# $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'])
|
||||
], # Optional
|
||||
|
||||
|
|
|
@ -20,8 +20,11 @@ from netifaces import interfaces, ifaddresses, AF_INET
|
|||
# -------------------------------------------------------------------------------
|
||||
# Sanitize environment variables
|
||||
# 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)
|
||||
if 'HOME' in os.environ:
|
||||
del os.environ['HOME']
|
||||
os.environ['PATH'] = os.confstr("CS_PATH") # Sanitize $PATH
|
||||
|
||||
# Setting home path and base path
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue