I am trying to make a Elementary OS app that I need to get user home folder. I tried
GLib.Environment.get_home_dir () and
Granite.Services.Paths.home_folder.get_path () but they both return
null. What is the proper way to get user's home folder for Elementary OS?
Granite.Services.Paths is now deprecated and uses
GLib.Environment.get_home_dir () internally anyway.
GLib.Environment.get_home_dir () is returning
null, I believe there is probably something wrong with your setup/install as this method works on my system.
I believe it uses the
HOME environment variable, so check this is set and isn't being overwritten by something else.