Skip to content

RENAMED_SCRATCHPAD_PATCH: AppImage Fails to Launch #445

@n1ck3

Description

@n1ck3

Hi,

First of all, thank you for the incredible work you've done with dwm-flexipatch. If it weren't for this project, I probably wouldn’t be using dwm due to the challenges of managing multiple patches. 🙏

I’m facing an issue with the RENAMED_SCRATCHPAD_PATCH while trying to set up two applications as scratchpads: bitwarden-desktop (installed via AUR) and plexamp (AppImage).

Bitwarden Setup

The bitwarden-desktop scratchpad works perfectly:

  • Keybinding: I can toggle the scratchpad if it's running.
  • Keybinding: It launches bitwarden if it's not running.

Plexamp Setup

However, the plexamp scratchpad setup is not functioning as expected:

  • My configuration for plexamp matches that of bitwarden, with only the command differing.
  • Keybinding: I can toggle the scratchpad if plexamp is already running.
  • Keybinding: It does not launch when plexamp isn’t running.

Error Logs

When attempting to launch plexamp with the keybinding, I see the following error in the dwm logs:

terminate called after throwing an instance of 'std::runtime_error'
what():  Headless detection failed: unexpected exit code from xhost

Troubleshooting Steps

Here are the steps I’ve taken to troubleshoot the issue:

  1. Binding the AppImage to launch with a regular non-scratchpad key: works.
  2. Creating a launch script (plexamp.sh) and executing it in a shell: works.
  3. Binding the scratchpad command in config.h to execute the plexamp.sh script: The script runs, but the AppImage doesn’t launch.
  4. Testing with another AppImage: same result and error as plexamp.

Configuration Snippets

Here are the relevant excerpts from my config.h:

Scratchpad Commands

...
#if RENAMED_SCRATCHPADS_PATCH
static const char *plexspcmd_p[] = {"p", "/home/nicke/Applications/Plexamp-4.12.0_b485663b1703b7f9c635b26577fd4f95.AppImage", NULL};
static const char *bitwardenspcmd_b[] = {"b", "bitwarden-desktop", NULL};
...

Rules

...
#if RENAMED_SCRATCHPADS_PATCH
RULE(.instance = "plexamp", .scratchkey = 'p', .isfloating = 1)
RULE(.instance = "bitwarden", .scratchkey = 'b', .isfloating = 1)
...

Keybindings

...
#if RENAMED_SCRATCHPADS_PATCH
{ MODKEY|ShiftMask,             XK_p,          togglescratch,          {.v = plexspcmd_p } },
{ MODKEY|ShiftMask,             XK_b,          togglescratch,          {.v = bitwardenspcmd_b } },
...

I would appreciate any guidance or suggestions to resolve this issue. Thank you again for your wonderful work and support!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions