Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Desktop file Path= directive changes working dir DE-wide #83

Open
drws opened this issue Sep 1, 2021 · 0 comments
Open

Desktop file Path= directive changes working dir DE-wide #83

drws opened this issue Sep 1, 2021 · 0 comments

Comments

@drws
Copy link

drws commented Sep 1, 2021

#75 fix, implemented in #76, unfortunately introduced a new bug. While the fix allows for a proper launching of certain applications, it unfortunately changes the mate-menu's execution context for every application until another launcher containing Path= directive is used. In my case majority of desktop files do not have it leading to launching applications in wrong working directiories after one with a Path= directive is used.

This can be easily demonstrated by launching an application with a desktop launcher containing Path= directive from mate-menu first and launching mate-terminal from mate-menu afterwards. It starts in path of the first launcher instead of shell default one (typically user's home directory)!

A better way to change working directory only for the spawned process probably needs to be implemented. Executing the launched application in a subshell comes to mind: (cd $WD_COMMAND; command) while removing the os.chdir() call in the execution environment. Alternatively (cd $WD_COMMAND && command)can be used for execution to fail if Path=-specified directory doesn't exist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant