Classic confinement request for Chabighor

  • name: chabighor

  • description: Chabighor is an Electron desktop terminal application providing SSH connections, SFTP file management, a local terminal, tabs, split panes, and a master-password encrypted local vault.

  • snapcraft: The snapcraft.yaml is currently in a private source repository. I can provide the packaging configuration for review if required.

  • upstream: PRIVATE. Public downloads and issue tracker: https://github.com/miltonkhondokar/chabighor-downloads

  • upstream-relation: I am the developer and publisher of Chabighor. My Snap Store publisher username is iamsazzad.

  • supported-category: Terminal emulators.

  • reason: Chabighor includes a general-purpose local terminal that launches the user’s host shell. Users need to execute host-installed commands, scripts, and development tools, using their normal shell configuration, environment, and filesystem permissions.

    The intended functionality requires access to the host execution environment, rather than a shell limited to the snap’s runtime. Network and file-access interfaces alone would not provide this host shell environment.

    Chabighor also integrates with host-installed OpenSSH for X11 forwarding and separately installed RDP/VNC clients. SSH and SFTP networking alone are not the basis for requesting classic confinement; the primary requirement is the general-purpose local terminal.

    I have not yet completed a strict-confinement prototype or an interface-by-interface compatibility test. I would appreciate guidance if an existing interface combination can support this functionality under strict confinement.

  • I understand that strict confinement is generally preferred over classic.

  • I’ve tried the existing interfaces to make the snap work under strict confinement.

Submission details

  • Version: 0.12.2-beta.8

  • Revision: 3

  • Architecture: amd64

  • Intended channel: latest/beta

The upload currently reports: (NEEDS REVIEW) confinement 'classic' not allowed lint-snap-v2_confinement_classic

Please review whether Chabighor qualifies for classic confinement under the terminal emulator category. I can provide further technical details and complete publisher verification as required.

Thank you, K M Sazzad Hossain

This request has been added to the queue for review by the @reviewers team.

Hello @iamsazzad,

My sincere apologies for the delay on this request.

On review and based upon the provided justification, the general-purpose local terminal functionality does qualify under a supported category for classic. How central is this feature to what you consider is the core functionality of chabighor? Are you able to provide its other features under strict? It would be helpful if you could provide the relevant sections of your snapcraft.yaml!

I ask as I believe this may be a good candidate for pursuing a classicmode track. This allows users to make an active choice in taking on the risk of a classic snap or accepting the disabled feature while still able to use the snap. Would this be something you are willing to consider/pursue?

Additionally, as noted in Reviewing classic confinement snaps - Snap documentation, maintaining classic-confined snaps that live up to the promise of reliably working on any distro where snapd runs may require a significant maintenance effort. Can you describe your verification process and results for ensuring chabignor works cross-distro as a classic snap?

Thank you!

2 Likes

Hello @elisehdy,

Thank you for reviewing my request.

The local terminal is an important part of Chabighor’s intended workflow: users can work with their host shell alongside remote SSH sessions in the same application. It is not required for every SSH/SFTP session, but removing it would remove part of the intended functionality.

I would like to explore your suggestion of a classicmode track. Before committing to maintaining both variants, I need to establish which features can reliably work under strict confinement.

Classic Snap testing

I tested version 0.12.2-beta.8, locally installed with classic confinement, on Ubuntu 26.04.1 LTS amd64. I confirmed that the running executable was under /snap/chabighor/.

The following checks passed:

  • Application launch.

  • Local terminal opening and command execution.

  • SSH connection and remote command execution.

  • SFTP directory listing.

File upload/download and cross-distro testing have not yet been completed. These are basic functional checks, not a full compatibility assessment. I cannot currently claim verified support across distributions.

Packaging

The relevant sections of the submitted classic configuration are:

base: core24
grade: devel
confinement: classic
platforms:
  amd64:
    build-on: [amd64]
    build-for: [amd64]
apps:
  chabighor:
    command: bin/chabighor
parts:
  chabighor:
    plugin: dump
    source: snap-stage
    build-attributes: [enable-patchelf]
    build-packages: [patchelf]
    stage-packages:
      - libgtk-3-0t64
      - libnotify4
      - libnss3
      - libnspr4
      - libxss1
      - libxtst6
      - libatspi2.0-0t64
      - libuuid1
      - libsecret-1-0
      - libasound2t64
      - libgbm1
      - libdrm2
      - libxkbcommon0
      - libxshmfence1
      - fonts-dejavu-core
      - libegl1
      - libegl-mesa0
      - libgl1
      - libglx-mesa0
      - libgl1-mesa-dri

The launcher is:

#!/bin/sh
set -eu
export LD_LIBRARY_PATH="$SNAP/app:$SNAP/usr/lib/x86_64-linux-gnu:$SNAP/lib/x86_64-linux-gnu"
export LIBGL_DRIVERS_PATH="$SNAP/usr/lib/x86_64-linux-gnu/dri"
export GBM_BACKENDS_PATH="$SNAP/usr/lib/x86_64-linux-gnu/gbm"
export __EGL_VENDOR_LIBRARY_FILENAMES="$SNAP/usr/share/glvnd/egl_vendor.d/50_mesa.json"
export GIO_MODULE_DIR="$SNAP/usr/lib/x86_64-linux-gnu/gio/modules"
unset GIO_EXTRA_MODULES
exec "$SNAP/app/chabighor" --ozone-platform=x11 --disable-gpu "$@"

Local terminal support currently depends on host Python 3. Optional integrations also depend on host OpenSSH and separately installed RDP/VNC clients. I recognise that these dependencies need further verification across distributions.

Strict prototype

Since my original post, I have built and tested a separate strict prototype. It declares the following plugs, all of which were connected during testing:

plugs:
  - home
  - network
  - network-bind
  - browser-support
  - desktop
  - desktop-legacy
  - x11
  - wayland
  - opengl
  - audio-playback

After removing enable-patchelf from the strict configuration and performing a clean rebuild, startup still fails with:

FATAL:sandbox/linux/services/credentials.cc:131
Check failed: . : Permission denied (13)

The corresponding kernel log reports:

apparmor="DENIED"
operation="userns_create"
class="namespace"
profile="snap.chabighor-strict-test.chabighor"
comm="chabighor"
requested="userns_create"
denied="userns_create"

This blocks startup before I can test SSH/SFTP under strict confinement. I am not treating this as evidence that those features require classic.

Could you advise on the supported approach for resolving this Electron sandbox issue under strict confinement? Also, is there a recommended distribution test matrix for the classic review?

Thank you, K M Sazzad Hossain

Add --no-sandbox to the last line of your launcher and it will work…

The electron sandbox is less restrictive than the snap sandbox and you don’t want to stack the two sandboxes.

2 Likes

Hello @ogra and @elisehdy,

Thank you for the suggestion. Adding --no-sandbox allowed the strict prototype to launch.

I then encountered a GTK image-loading crash when connecting. After generating a pixbuf loader cache and temporarily supplying the missing MIME database in the snap’s user data directory, I was able to log in over SSH and browse the remote directory through SFTP. These workarounds still need to be incorporated into the packaging; GTK schema warnings and D-Bus denials remain.

The local terminal also opens, but reports:

run-parts: failed to open directory /etc/profile.d: Permission denied

Inside that terminal, I confirmed:

SNAP=/snap/chabighor-strict-test/x3
SNAP_NAME=chabighor-strict-test

So the local shell opening does not yet demonstrate the intended host-shell experience. Access to the normal shell configuration is already restricted.

These results suggest a strict variant for SSH/SFTP is feasible, although file transfers and broader acceptance testing are still pending. I would like to explore the proposed classicmode track for the full host-terminal functionality.

Could you advise on the next steps for that arrangement?

Thank you!

If you try strict confinement I’d suggest using the gnome extension instead of shipping all the gnome stack yourself.

You should be able to drop all the stage-packages except for libsnpr4 and libnss3 … the same goes for most of the interface plugs and the exports in your launcher script …

That will make your snap significantly smaller and you do not have to bother about gtk libs, fonts, themes, pixbuf loader setup etc

You can check what an extension adds to your existing snapcraft.yaml during build by running snapcraft expand-extensions in the toplevel of your source tree …

And indeed strict snaps do not need to use patchelf at all so I’d drop that too (beyond saving the ugly binary patching of everything it also speeds up your build)

If you actually need read access to the hosts /etc/profile.d a system-files interface should be able to grant you that …

2 Likes

Hello @ogra and @elisehdy,

Thank you for your guidance. I have now tested a separate strict-confinement build following your suggestions.

The packaging changes were:

  • Added the GNOME extension with core24.

  • Reduced stage-packages to libnspr4 and libnss3.

  • Removed the explicit patchelf configuration and the custom GTK/graphics environment exports from the launcher.

  • Added a desktop entry.

On Ubuntu 26.04.1 LTS, amd64, I verified:

  • Application launch using --no-sandbox.

  • SSH connections and SFTP directory listing.

  • SFTP upload and download.

  • Refusal to overwrite an existing destination file.

The GNOME extension resolved the earlier GTK/pixbuf startup and dialog problems. During download testing, I also changed the experimental build to select a destination folder. Downloads initially still failed because portal-info returned DesktopFile=.; after adding the desktop entry, portal-info returned chabighor-strict-test_chabighor.desktop and downloads succeeded.

Some D-Bus access-denied messages remain. These results do not establish that every feature works under strict confinement.

The general-purpose local terminal remains an important part of Chabighor’s intended functionality. The strict local shell encountered access restrictions, including /etc/profile.d. I have not yet tested the suggested system-files interface or established equivalent host-shell functionality under strict.

I am willing to explore the proposed strict/default and classicmode track arrangement, with unsupported features disabled in the strict build.

My native Snap testing so far is limited to Ubuntu 26.04.1 LTS on amd64; cross-distro verification remains outstanding.

Store revision 3 is still the original classic build awaiting review. The experimental strict build has only been installed locally and has not been uploaded.

Could you advise on the next steps for the classicmode track and the additional verification you would like before proceeding?

Thank you, K M Sazzad Hossain

Beyond a quick smoke test I don’t think you need to bother too much about cross distro testing with a strictly confined snap, the chances that host libraries leak into your environment are close to zero under strict …