For ls it's true, because ~ is expanded by bash. Python works in a bit different way:
$ sudo python
>>> import os
>>> os.getenv("HOME")
'/root'
>>> import os.path
>>> os.path.expanduser("~")
'/root'
Yes, there are few environment variables preserved (like USERNAME), but sudo changes your working environment (you can easily check: compare `env` output with `sudo env` output).
So, for zeitgeist-daemon running as root it's home directory is /root and we should decide what to do in this kind of a situation. Should I report this directly to Zeitgeist and see if daemon guys can figure something out?
For ls it's true, because ~ is expanded by bash. Python works in a bit different way: expanduser( "~")
$ sudo python
>>> import os
>>> os.getenv("HOME")
'/root'
>>> import os.path
>>> os.path.
'/root'
Yes, there are few environment variables preserved (like USERNAME), but sudo changes your working environment (you can easily check: compare `env` output with `sudo env` output).
So, for zeitgeist-daemon running as root it's home directory is /root and we should decide what to do in this kind of a situation. Should I report this directly to Zeitgeist and see if daemon guys can figure something out?