Create the path to socket portably and such that when script is used
with multiple sessions by the same user or various users each session
gets its own socked which other users can not access.
This is achieved by using UID and DISPLAY in the path name, using the
tempfile module from stdlib to get the path for /tmp, and creating the
socket under a directory which was created with #o700 perms.
Create the path to socket portably and such that when script is used with multiple sessions by the same user or various users each session gets its own socked which other users can not access.
This is achieved by using UID and DISPLAY in the path name, using the tempfile module from stdlib to get the path for /tmp, and creating the socket under a directory which was created with #o700 perms.