shell icon indicating copy to clipboard operation
shell copied to clipboard

[BUG] Btop fails to start through application menu

Open Vectabyte opened this issue 1 year ago • 6 comments

Step 1. Before you submit

  • [x] I have read the above instructions and am sure that this is supposed to be posted here.
  • [x] I've successfully updated to the latest versions following the updating guide.
  • [x] I've successfully updated the system packages to the latest.
  • [ ] I've ticked the checkboxes without reading their contents

Step 2. Version info

Version info
Packages:
    caelestia-shell 1.3.2-1
    caelestia-cli 1.0.1-1
    caelestia-meta r151.cadf1e2-1

Caelestia:
    Last commit: c850be99bdef2b524434d8958e47468fd2f1438b
    Commit message: hypr: update music rule to include Cider (#179)  

Shell:
     caelestia-shell 1.3.2, revision 547b9bfcdd97c683211817a6ffcc7b6af7ae5cdc, distrubuted by: AUR (package: caelestia-shell)

Quickshell:
    quickshell 0.2.1, revision 00858812f25b748d08b075a0d284093685fa3ffd, distributed by: AUR (package: quickshell-git)
                         

Step 3. Describe the issue

Currently i face the issue of starting btop through the application menu. Entering the command "btop" in the shell works completely fine.

I tried to change the settings in the .config/caelestia/cli.json

        "sysmon": {
            "btop": {
                "enable": true,
                "match": [{ "class": "btop", "title": "btop", "workspace": { "name": "special:s>
                "command": ["foot", "-a", "btop", "-T", "btop", "fish", "-C", "exec", "btop"]
            }
        },
        "sysmon": {
            "btop": {
                "enable": true,
                "match": [{ "class": "btop", "title": "btop", "workspace": { "name": "special:s>
                "command": ["foot", "-a", "btop", "-T", "btop", "fish", "-C", "exec btop"]
            }
        },

Both changes without succes even tho the following command works in the shell:

foot -a btop -T btop fish -C "exec btop"

I was able to create a workaround by changing the .desktop file under: /usr/share/applications/btop.desktop

I changed

Exec=btop
Terminal=true

to

Exec=foot -a btop -T btop fish -C "exec btop"
Terminal=false

Is this an expected setting / workaround? What is the default .desktop setting? Is this a real bug or was my .desktop setting just wrong? There where no further information in any logs i found including journalctl. There was no visible action when i tried to start the app previously, just nothing at all.

Logs
No running instances for "/etc/xdg/quickshell/caelestia/shell.qml"
  INFO: Launching config: "/etc/xdg/quickshell/caelestia/shell.qml"
  INFO: Shell ID: "16ee85225c9ea7a19fa3635391847b72" Path ID "16ee85225c9ea7a19fa3635391847b72"
  INFO: Saving logs to "/run/user/1000/quickshell/by-id/fuwk254t/log.qslog"
  WARN: QFont::fromString: Invalid description '(empty)'
  INFO: Configuration Loaded
  WARN qt.svg: Cannot open file '/opt/jetbrains-toolbox/toolbox.svg', because: No such file or directory
  WARN qt.svg: Cannot open file '/opt/jetbrains-toolbox/toolbox.svg', because: No such file or directory
  WARN qt.svg: Cannot open file '/opt/jetbrains-toolbox/toolbox.svg', because: No such file or directory
  WARN qt.qpa.wayland.textinput: virtual void QtWaylandClient::QWaylandTextInputv3::disableSurface(wl_surface*) Try to disable surface 0x7f4a28d1dbe0 with focusing surface 0x7f4a28cffa20
  WARN qt.svg: Cannot open file '/opt/jetbrains-toolbox/toolbox.svg', because: No such file or directory
  WARN qt.svg: Cannot open file '/opt/jetbrains-toolbox/toolbox.svg', because: No such file or directory
  WARN qt.svg: Cannot open file '/opt/jetbrains-toolbox/toolbox.svg', because: No such file or directory
  WARN scene: QML Wrapper at @modules/drawers/Panels.qml[80:5]: Binding loop detected for property "implicitHeight":
qs:@/qs/modules/dashboard/Wrapper.qml:51:13
  WARN scene: @modules/dashboard/Media.qml[227:17]: Unable to assign [undefined] to bool
  WARN scene: @modules/dashboard/Media.qml[326:17]: Unable to assign [undefined] to MenuItem_QMLTYPE_414*
  WARN qt.svg: Cannot open file '/opt/jetbrains-toolbox/toolbox.svg', because: No such file or directory
  WARN qt.svg: Cannot open file '/opt/jetbrains-toolbox/toolbox.svg', because: No such file or directory
  WARN qt.svg: Cannot open file '/opt/jetbrains-toolbox/toolbox.svg', because: No such file or directory
  WARN qt.qpa.wayland.textinput: virtual void QtWaylandClient::QWaylandTextInputv3::disableSurface(wl_surface*) Try to disable surface 0x7f4a18c4c3a0 with focusing surface 0x7f4a28cffa20

Reminder

  • [x] I agree that it's usually impossible for others to help me without my logs.

Vectabyte avatar Oct 14 '25 22:10 Vectabyte

try:

hyprctl dispatch exec app2unit -- foot -a btop -T btop fish -C "exec btop"

This should be the exactly command the CLI uses to launch btop. If this get errors (or do nothing at all), run only from app2unit forward

Markus328 avatar Oct 15 '25 12:10 Markus328

oh, your problem is thourgh application Menu. Mostly sure your error is due app2unit. Try running the command I sent you earlier but without hyprctl dispatch exec

Markus328 avatar Oct 15 '25 13:10 Markus328

Currently i face the issue of starting btop through the application menu. Entering the command "btop" in the shell works completely fine.

I tried to change the settings in the .config/caelestia/cli.json

        "sysmon": {
            "btop": {
                "enable": true,
                "match": [{ "class": "btop", "title": "btop", "workspace": { "name": "special:s>
                "command": ["foot", "-a", "btop", "-T", "btop", "fish", "-C", "exec", "btop"]
            }
        },
        "sysmon": {
            "btop": {
                "enable": true,
                "match": [{ "class": "btop", "title": "btop", "workspace": { "name": "special:s>
                "command": ["foot", "-a", "btop", "-T", "btop", "fish", "-C", "exec btop"]
            }
        },

Both changes without succes even tho the following command works in the shell:

foot -a btop -T btop fish -C "exec btop"

I was able to create a workaround by changing the .desktop file under: /usr/share/applications/btop.desktop

I changed

Exec=btop
Terminal=true

to

Exec=foot -a btop -T btop fish -C "exec btop"
Terminal=false

Is this an expected setting / workaround? What is the default .desktop setting? Is this a real bug or was my .desktop setting just wrong? There where no further information in any logs i found including journalctl. There was no visible action when i tried to start the app previously, just nothing at all.

Nothing wrong with your setup. The original btop++ .desktop file (Exec=btop, Terminal=true) actually didn't work when launched via Caelestia's launcher.

Best practice for changing .desktop files is to leave the original alone and make a copy to ~/.local/share/applications/ then edit away.

This simple edit works:

[Desktop Entry]
Type=Application
Version=1.0
Name=btop++
GenericName=System Monitor
GenericName[it]=Monitor di sistema
Comment=Resource monitor that shows usage and stats for CPU, etc
Comment[it]=Monitoraggio delle risorse: mostra utilizzo e statistiche per CPU, dischi, rete e processi
Icon=show-gpu-effects
Exec=foot btop
Terminal=false
Categories=System;Monitor;ConsoleOnly;
Keywords=system;process;task
Path=
StartupNotify=false

nuknes avatar Oct 15 '25 13:10 nuknes

oh, your problem is thourgh application Menu. Mostly sure your error is due app2unit. Try running the command I sent you earlier but without hyprctl dispatch exec

Running the command in the cli works without issue. That is kinda weird. I changed the .desktop back to test this so currently i have the "broken" setup.

@nuknes that setup works. Thank you for the tip to make a copy to .local. Should the caelestia installation make this copy on its own? Or is there something wrong with my system to suddenly not work as expected anymore?

Vectabyte avatar Oct 15 '25 19:10 Vectabyte

@nuknes that setup works. Thank you for the tip to make a copy to .local. Should the caelestia installation make this copy on its own? Or is there something wrong with my system to suddenly not work as expected anymore?

I don't think it has anything to do with Caelestia and there's certainly nothing wrong with your system. Btop provides its own .desktop file on install with Exec=btop Terminal=true.

But Terminal=true, relies on a background service to look up and launch the default terminal emulator. I didn't dig into why it didn't and just used a quick simple .desktop fix, bypassed the lookup process by explicitly telling the system to run btop inside of foot.

Edit to add: You should revert the changes you made to your settings in .config/caelestia/cli.json as that works correctly and is for toggling btop as system monitor in a special workspace, nothing to do with your issue of launching btop from Launcher.

nuknes avatar Oct 16 '25 02:10 nuknes

Thank you for the help! I reverted the changes and just go with the workaround of having a second .desktop file in ~/.local/share/applications/

Vectabyte avatar Oct 16 '25 07:10 Vectabyte