Skip to content
This repository was archived by the owner on Sep 30, 2025. It is now read-only.
This repository was archived by the owner on Sep 30, 2025. It is now read-only.

Fix for terminator/terminal #347

Description

@tebulrich

Solution: Reliable Shell Access from DockStation “EXEC” on Ubuntu/Wayland

On Ubuntu (under Wayland), launching an interactive shell in a Docker container via DockStation’s EXEC function can fail with GTK/Wayland errors unless a terminal emulator is already running. This occurs due to session environment variables not being propagated when GUI apps launch child processes.

To solve this, I use a wrapper script that ensures the required environment is set and invokes the terminal emulator (Terminator, in this example) with arguments passed directly from DockStation. This approach is robust, works regardless of session state, and is easily adaptable to other emulators if needed.

Run this in your terminal:

sudo tee /usr/local/bin/dock-term.sh > /dev/null << 'EOF'
#!/usr/bin/env bash
# Ensure essential environment variables are present for GUI terminal apps
export DISPLAY="\$DISPLAY"
export WAYLAND_DISPLAY="\$WAYLAND_DISPLAY"
export DBUS_SESSION_BUS_ADDRESS="\$DBUS_SESSION_BUS_ADDRESS"
export GDK_BACKEND=x11  # Prefer X11 backend for stability under Wayland
# Launch Terminator; replace with your preferred emulator if needed
exec terminator -e "\$@"
EOF

then sudo chmod +x /usr/local/bin/dock-term.sh

Afterwards go to DockStation -> Preferences and in Terminal Path, you add /usr/local/bin/dock-term.sh

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions