1
0
Fork 0
mirror of https://github.com/kbumsik/VirtScreen.git synced 2025-03-09 15:40:18 +00:00

Config: Changed HOME_PATH from ~/.virtscreen to ~/.config/virtscreen

This commit is contained in:
Bumsik Kim 2018-05-23 16:00:29 -04:00
parent 2bd1ce68f8
commit 4e7d0f485a
No known key found for this signature in database
GPG key ID: E31041C8EC5B01C6

View file

@ -25,9 +25,16 @@ del os.environ['HOME'] # Delete $HOME env for security reason. This will make
os.environ['PATH'] = os.confstr("CS_PATH") # Sanitize $PATH
# Setting home path and base path
HOME_PATH = str(Path.home())
# https://www.freedesktop.org/software/systemd/man/file-hierarchy.html
# HOME_PATH will point to ~/.config/virtscreen by default
if 'XDG_CONFIG_HOME' in os.environ and os.environ['XDG_CONFIG_HOME']:
HOME_PATH = os.environ['XDG_CONFIG_HOME']
else:
HOME_PATH = str(Path.home())
if HOME_PATH is not None:
HOME_PATH = HOME_PATH + "/.config"
if HOME_PATH is not None:
HOME_PATH = HOME_PATH + "/.virtscreen"
HOME_PATH = HOME_PATH + "/virtscreen"
BASE_PATH = os.path.dirname(__file__)
# Path in ~/.virtscreen
X11VNC_LOG_PATH = HOME_PATH + "/x11vnc_log.txt"