I've found several questions and answers to "How do I find the path to the users desktop", but in my mind they are all defunct (those I found at least). The reason is that if the user has a installation of Linux that is not English, he or she may well have the desktop somewhere other than in ~/Desktop
. E.g. for Swedish, I believe it is in ~/Skrivbord
. And who knows where the user decided to place his or her desktop?
For that reason the following won't do (or any variant of it):
os.sep.join((os.path.expanduser("~"), "Desktop"))
So the question is:
On linux, how do I, in python, get the true path to the user's desktop without presupposing English default directory structure?