mherrmann / mherrmann/fman

How to "Open with..." program with parameters

Open
#420 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

1 vote enhancement
Dominant language
Python
Stars
275
Forks
16
PR merge metrics
No merged PRs in 30d

Description

I want to open file with program, that uses parameters (e.g. "flatpak run org.videolan.VLC"). But such command cannot be added through app and when I manually edit "Apps (Linux).json" it shows:

Command 'OpenWith' raised error.

Traceback (most recent call last):
  File "fman/impl/plugins/command_registry.py", line 97, in _execute_command
  File "/opt/fman/Plugins/Core/core/commands/__init__.py", line 1906, in __call__
    ShowAppsForOpening(files).show()
  File "/opt/fman/Plugins/Core/core/commands/__init__.py", line 2002, in show
    self.on_selected(option)
  File "/opt/fman/Plugins/Core/core/commands/__init__.py", line 2053, in on_selected
    _open_files_with_app(self._files, option)
  File "/opt/fman/Plugins/Core/core/commands/__init__.py", line 1948, in _open_files_with_app
    Popen(**get_popen_kwargs_for_opening(files, with_=app_path))
  File "subprocess.py", line 676, in __init__
  File "subprocess.py", line 1289, in _execute_child
FileNotFoundError: [Errno 2] No such file or directory: '/usr/bin/flatpak run org.videolan.VLC'

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.

Research direction

The failure path is in core/commands/init.py, especially _open_files_with_app and get_popen_kwargs_for_opening; start there and inspect how Apps (Linux).json values reach Popen. Reproduce with the flatpak command and verify that an app entry containing parameters can open the selected file without the shown FileNotFoundError.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.