Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions rare/utils/paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,8 +324,15 @@ def create_desktop_link(app_name: str, app_title: str = "", link_name: str = "",
logger.info(f"Creating shortcut for {app_title} at {shortcut_path}")

if platform.system() in {"Linux", "FreeBSD"}:
executable = get_rare_executable()
executable = shlex.join(executable)

if os.environ.get("SNAP"):
executable = "snap run rare"
elif os.environ.get("container") == "flatpak":
executable = "flatpak run io.github.dummerle.rare"
else:
executable = get_rare_executable()
executable = shlex.join(executable)

if not for_rare:
executable = f"{executable} launch {app_name}"

Expand Down