Double-click on .py file results in wrong CWD assigned

Open
#3,499 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
c
Domain
desktop

Research direction

No source file or test is named. Start by tracing Nemo's double-click handling for Python files and how it sets the child process working directory, then reproduce the issue with a script that prints its CWD from a subdirectory. Done means the launched file uses its containing directory as the working directory, with a regression test covering the behavior.

Written by the indexing model from the issue text.

Description

Distribution

Mint 22 Cinnamon

Package version

6.2.9

Frequency

Always

Bug description

When double-clicking a Python file, it is run with the Home directory as its CWD, regardless of the location of the file. This causes issues when the file is bundled with several other assets

Steps to reproduce

Create a Python file that prints the current working directory, or opens a file relative to itself. Run it.

Expected behavior

The current working directory of a file explorer should be the currently open directory.

Additional information

No response

Dominant language
C
Stars
1.6k
Forks
368
Avg merge
4d 4h
Merged PRs (30d)
2

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from linuxmint/nemo

All issues in linuxmint/nemo

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.