From d875325ceebf3115261a2296b99d7cef45624c7e Mon Sep 17 00:00:00 2001 From: Alex Grintsvayg Date: Tue, 5 Jul 2016 15:20:30 -0400 Subject: [PATCH] better non-root fix, restore version var --- lbrynet/__init__.py | 1 + packaging/ubuntu/postinst_append | 6 +----- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/lbrynet/__init__.py b/lbrynet/__init__.py index c1857d897..a4aacb556 100644 --- a/lbrynet/__init__.py +++ b/lbrynet/__init__.py @@ -5,3 +5,4 @@ logging.getLogger(__name__).addHandler(logging.NullHandler()) log.setLevel(logging.ERROR) __version__ = "0.3.2" +version = tuple(__version__.split('.')) diff --git a/packaging/ubuntu/postinst_append b/packaging/ubuntu/postinst_append index 2b3200504..e082aad14 100755 --- a/packaging/ubuntu/postinst_append +++ b/packaging/ubuntu/postinst_append @@ -16,11 +16,7 @@ case $? in esac if [ $RUN = 1 ]; then - if [ -n $SUDO_USER ]; then - sudo --user="$SUDO_USER" xdg-open "lbry://lbry" - else - xdg-open "lbry://lbry" - fi + /bin/su - "$(logname)" -c 'xdg-open "lbry://lbry"' else zenity --info --text="LBRY Installed\n\nNo problem. You can run LBRY later by going to