Skip to content

[FEAT] Support for Auto-starting GUI Applications #380

@Norby99

Description

@Norby99

Is this a new feature request?

  • I have searched the existing issues

Wanted change

I would like to request a feature or documentation for properly auto-starting GUI applications (specifically Python scripts using Tkinter) when Webtop starts.

Reason for change

Currently, it's very difficult to reliably auto-start GUI applications that require X11/display server to be fully initialized. Standard Linux methods don't work properly:

  • ~/.bashrc: Executes before the display server is ready, causing Tkinter applications to fail with display errors
  • Systemd services: Same issue - services start before X11 is available
  • ~/.config/autostart/*.desktop: Inconsistent behavior, sometimes the display isn't fully ready even with this method
  • Sleep delays in scripts: Unreliable and creates race conditions

Use Case

When opening Webtop in the browser, I want to automatically launch a Python application using Tkinter (or any other GUI framework) that should be ready for the user immediately upon connection.

This is useful for:

  • Kiosk-mode applications
  • Educational environments
  • Development environments with specific tools
  • Custom dashboards or monitoring tools

Additional Context

I've tried various workarounds including sleep delays, checking for X11 sockets, and XFCE autostart, but none are reliable across restarts or different configurations.

Proposed code change

One or more of the following would help:

  1. Environment variable: Provide a WEBTOP_DISPLAY_READY marker or similar that scripts can check

  2. Built-in delay mechanism: A configuration option in docker-compose.yml to specify GUI autostart scripts with built-in proper timing:

    environment:
      - GUI_AUTOSTART=/path/to/script.py
  3. Documentation: Clear documentation on the recommended way to auto-start GUI applications, including:

    • Timing considerations
    • How to properly wait for X11

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Issues

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions