eryksun added the comment:

Steve, I think you're right that it's simpler and more reliable to add a 
command-line option that sets IDLE's working directory to the current user's 
home directory. 

Terry, the default behavior in Linux, at least in Ubuntu, is to start IDLE with 
the working directory set to the user's home directory. 

The Linux equivalent of a Windows .lnk shortcut is an XDG .desktop file [1]. A 
desktop application entry sets the working directory using the "Path" key, such 
as Path=/absolute/path (or also, and maybe only in Ubuntu Unity, 
Path=relative/path) in the main "Desktop Entry" or in a "Desktop Action" (i.e. 
right-click menu action). Environment variables are not supported. 

If "Path" isn't defined, I can only say from experience what Ubuntu's Unity 
shell does, since the spec doesn't define a default behavior. In this case, the 
child process inherits Unity's working directory. Since it's a plugin for the 
Compiz window manager, the child inherits the working directory of Compiz. This 
is the current user's $HOME directory, which Compiz inherits indirectly from 
the user-mode init process. I confirmed the behavior by attaching gdb to compiz 
and executing `call chdir("/home")`, and then continued compiz and opened IDLE 
to verify that the working directory was inherited as "/home". 

[1]: http://standards.freedesktop.org/desktop-entry-spec/latest

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25450>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to