====================================================================== MU-QTBROWSER v0.0.2 - Lightweight IPC-coupled & Tabbed Web Container ====================================================================== https://forum.puppylinux.com/viewtopic.php?t=17682 -------------------------------------------------------------------------------------------------------------------------------- 1. WHAT IS IT AND WHAT IS IT GOOD FOR? ---------------------------------------------------------------------- mu-qtbrowser is a modular, high-performance web container architecture specifically designed for lightweight Linux desktop environments like IceWM, Openbox, or Fluxbox (such as Linux Mint, antiX, MX Linux, or Puppy Linux). It offers two core paradigms tailored for low-RAM systems (e.g., 2 GB RAM devices): 1. **IPC-Coupled Suite (`mu-browser` + `mu-controller`)**: Decouples the heavy Chromium rendering engine from a lightweight Vala/GTK3 toolbar via UNIX domain sockets. 2. **Low-RAM Tabbed Variant (`mu-browser-tabs`)**: A pure, lightning-fast C++/Qt6 multi-tab browser supporting up to 10 tabs, automated session restore, and minimal memory overhead without IPC communication overhead. Additionally, `mu-browser` can be run standalone as a single-window web container. 2. ARCHITECTURE & TECHNOLOGIES ---------------------------------------------------------------------- - Backend (`mu-browser`): C++ / Qt6 (QWebEngineView) with internal QLocalServer for multi-instance IPC, custom context menu, X11 window layer positioning, and an interactive mini-editor to generate `.desktop` launchers on-the-fly. - Tabbed Browser (`mu-browser-tabs`): C++ / Qt6 multi-tab container (max 10 tabs) with automatic `session.json` persistence, integrated bookmark manager, and low-RAM footprint. - Controller (`mu-controller`): Vala / GTK3 native toolbar communicating via UNIX sockets. - Launcher Wrapper (`launch-mu-browser.sh`): Manages socket cleanup and startup sequence. 3. MAJOR ACHIEVEMENTS & FEATURES (v0.0.2) ---------------------------------------------------------------------- - Link Navigation & History Fix: Automatic JavaScript injection strips `target` attributes (`_blank`, `_new`) on load, preventing broken history states and ensuring first-click back/forward functionality. - Custom Qt Context Menu: Replaced default Chromium context menu with a reliable custom menu offering Back, Forward, Reload, Toolbar Toggle, and Exit. - Interactive Desktop Launcher Editor: One-click "📌 .desktop" button opens a dialog to customize window geometry, titles, frameless state, X11 layers, and save directly to the Desktop or `~/.local/share/applications`. - Low-RAM Tabbed Variant (`mu-browser-tabs`): Supports up to 10 tabs, shortcut keys (`Ctrl+T`, `Ctrl+W`), and automated session state recovery (`session.json`). - Persistent Bookmark Management: Full Qt-based GUI to add, edit, and delete bookmarks stored as clean JSON (`bookmarks.json`). - Multi-Instance Support: Dynamic unique UNIX domain socket naming (`--socket`) preventing IPC collision issues. - X11 Window Layers: Full support for desktop background, below, and above window types. 4. SHELL SCRIPT SUPPORT & COMMAND-LINE OPTIONS ---------------------------------------------------------------------- Both `mu-browser` and `mu-browser-tabs` feature extensive command-line argument support for fine-grained window control, positioning, and layering: * `--url ` or `-u `: Set the initial web address (default: `https://schinkenpizza.de`). * `--pos ` or `-p `: Specify window screen coordinates (e.g., `100,50`). * `--size ` or `-s `: Set initial window dimensions (e.g., `1280x720`). * `--frameless`: Launch in borderless/frameless window mode (`Qt::FramelessWindowHint`). * `--hide-toolbar`: Start with the top control toolbar hidden. * `--layer `: Set X11 window manager stacking layer hints. * `--socket ` (mu-browser only): Custom UNIX domain socket path or name for isolated IPC communication. ### Wrapper Script (`launch-mu-browser.sh`) The provided shell script automates the full IPC suite startup: 1. Cleans up stale UNIX domain socket files from `/tmp`. 2. Launches the C++/Qt6 backend (`mu-browser`) with background process management. 3. Waits for socket readiness. 4. Spawns the Vala/GTK3 frontend controller (`mu-controller`), ensuring that terminating either process gracefully closes the entire session. 5. BUILD AND INSTALLATION COMMANDS ---------------------------------------------------------------------- To compile all components (`mu-browser`, `mu-browser-tabs`, `mu-controller`): make To install binaries, wrapper script, and desktop entries system-wide (requires root): sudo make install To build a Debian package (`.deb`): make deb To build a Puppy Linux PET package (`.pet`): make pet To clean up build files: make clean 6. USAGE EXAMPLES ---------------------------------------------------------------------- Launch complete browser suite (Backend + GTK Controller): ./launch-mu-browser.sh Launch standalone Qt6 browser without GTK Controller: ./build/mu-browser --url "https://schinkenpizza.de" Launch low-RAM tabbed browser variant: ./build/mu-browser-tabs --url "https://schinkenpizza.de" Launch isolated frameless desktop layer instance (Backend): ./build/mu-browser --socket /tmp/browser1.sock --url "https://example.com" --pos 100,100 --size 800x600 --frameless --hide-toolbar --layer desktop Connect Vala controller to specific instance socket: ./mu-controller /tmp/browser1.sock 7. SHELL COMMAND CONTROL & IPC ---------------------------------------------------------------------- You can control any running mu-browser instance directly from the shell by passing the instance socket and a command or raw JSON payload to `mu-controller`: - Reload page: mu-controller /tmp/mu-browser-SOCKET_ID.sock reload - Navigate to URL: mu-controller /tmp/mu-browser-SOCKET_ID.sock '{"cmd":"navigate","url":"https://example.com"}' - Toggle control toolbar: mu-controller /tmp/mu-browser-SOCKET_ID.sock toggle-toolbar - Go back / forward: mu-controller /tmp/mu-browser-SOCKET_ID.sock back mu-controller /tmp/mu-browser-SOCKET_ID.sock forward - Quit browser instance: mu-controller /tmp/mu-browser-SOCKET_ID.sock quit 8. CHANGELOG ---------------------------------------------------------------------- v0.0.3 - fixed google login problem v0.0.2: - Added low-RAM tabbed browser variant (`mu-browser-tabs`) supporting up to 10 tabs, session restore (`session.json`), and shortcut keys (`Ctrl+T`, `Ctrl+W`). - Added built-in interactive Qt desktop launcher editor dialog with full window configuration options. - Added persistent bookmark management dialog with JSON storage (`bookmarks.json`). - Added explicit "Exit" option in the custom context menu for frameless and kiosk modes. - Fixed back button history behavior by stripping target attributes (`_blank`, `_new`, etc.) via JS injection. - Replaced native Qt context menu to resolve code view lockup issue. - Improved reload reliability via JS window location re-assignment. - Added Vala POSIX process monitoring (`--pkg posix`) to automatically close GTK controller on backend termination. - Added `mu-browser-standalone.desktop` and `mu-browser-tabs.desktop` entries. - Added multi-instance support via dynamic unique UNIX domain socket naming (--socket). - Added CLI parameters: --url, --pos, --size, --frameless, --hide-toolbar, --layer, --socket. - Added X11 window layer management (_NET_WM_WINDOW_TYPE_DESKTOP, BELOW, ABOVE). v0.0.1: - Initial release with basic IPC socket communication between Qt backend and GTK3 controller. 9. LICENSE ---------------------------------------------------------------------- This software is licensed under the **GNU General Public License v2.0 or later (GPLv2+)**. Developed collaboratively by Mark and Gemini. Enjoy lightweight web browsing! ======================================================================