Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

%F token in Nemo actions does not expand to file path (expands to empty string)

Open
#3,774 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

Research direction

Reproduce the issue with ~/.local/share/nemo/actions/test-tokens.nemo_action and compare the action Exec expansion for %f, %F, %U, %d, and %D. Start by tracing Nemo's action-token handling, using /usr/share/nemo/actions/sample.nemo_action and NEMO_SCRIPT_SELECTED_FILE_PATHS as references; done means path and URI tokens expand to the documented values while %f remains correct.

Written by the indexing model from the issue text.

Description

Distribution

Linux Mint version: 22.3 "Zena"

Package version

Nemo version: 6.6.3

Frequency

Always

Bug description

The %F token is documented in /usr/share/nemo/actions/sample.nemo_action as:

# %F - insert path list of selection

However, when used in a custom action's Exec line, %F expands to an empty string. Only %f
produces a value, but it gives just the display name (filename without path), which matches
its own documentation (# %f or %N (deprecated) - insert display name of first selected file).

All other path/URI tokens (%U, %D, %d, %p, %P) also expand to empty strings.

Steps to reproduce
  1. Create ~/.local/share/nemo/actions/test-tokens.nemo_action:

    [Nemo Action]
    Active=true
    Name=Test Tokens
    Exec=bash -c 'echo "f=[%f] F=[%F] U=[%U] d=[%d] D=[%D]" >> /tmp/nemo-token-test.log'
    Selection=S
    Extensions=Any;

  2. Right-click any file -> Test Tokens

  3. Read /tmp/nemo-token-test.log

Actual result:
f=[filename.ext] F=[] U=[] d=[] D=[]

Expected behavior

Expected result:
f=[filename.ext] F=[/full/path/to/filename.ext] U=[file:///full/path/to/filename.ext] ...

Additional information

The NEMO_SCRIPT_SELECTED_FILE_PATHS environment variable is set correctly and can be read
from the script:

path=$(printf '%s' "$NEMO_SCRIPT_SELECTED_FILE_PATHS" | head -1)
Dominant language
C
Stars
1.6k
Forks
368
Avg merge
8d 7h
Merged PRs (30d)
1

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.