Skip to content

Commit

Permalink
Update script.py
Browse files Browse the repository at this point in the history
This should fix #27
  • Loading branch information
bilelmoussaoui committed Jun 9, 2015
1 parent 74507ba commit c478f4d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion script.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@
script_folder = "scripts"
db_ext = ".txt"
userhome = os.path.expanduser("~")
username = pwd.getpwuid( os.getuid() )[ 0 ]
if os.getuid() != 0:
username = pwd.getpwuid( os.getuid() )[ 0 ]
else:
username = os.getenv("SUDO_USER")
useros = platform.linux_distribution()
useros = useros[0].strip('"')
theme = Gtk.IconTheme.get_default()
Expand Down

0 comments on commit c478f4d

Please sign in to comment.