====================================================================== MU-QTBROWSER v0.0.4g - 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.4g: Google-Login Fix (Gemini final) - FUNKTIONIERENDER STAND, NICHT MEHR AM UA SCHRAUBEN! - Google-Login Fix (Gemini final): Chrome/124.0.0.0 fuer alle Hosts, Firefox/130.0 NUR fuer alle Google-Domains (google.com, google.de, gstatic.com, googleapis.com, googleusercontent.com, inkl. accounts.*, myaccount.*, etc.), per QWebEngineUrlRequestInterceptor. - Client-Hints-Konflikt geloest: Fuer Google-Domains werden die Chrome Client-Hints geloescht (Sec-CH-UA, Sec-CH-UA-Mobile, Sec-CH-UA-Platform, Sec-CH-UA-Full-Version, Sec-CH-UA-Arch, Sec-CH-UA-Bitness, Sec-CH-UA-Model, Sec-CH-UA-Platform-Version = ""). Sonst sieht Google: "Firefox-Kennung mit Chrome-Signatur" -> "This browser or app may not be secure". Nur accounts.google.com abzufangen reicht nicht, Google leitet ueber Dutzende Subdomains um. - Interceptor wird in main() direkt nach Profil-Erstellung registriert, VOR dem ersten Laden. Reihenfolge ist wichtig. - KEIN Chrome/131, KEIN Sec-CH-UA-Spoofing, KEIN userAgentData-Spoofing. Diese "Verbesserungen" haben Google erst recht stutzig gemacht. - WICHTIG - NICHT MEHR MIT ANDEREN UAs TESTEN: Jeder UA-Wechsel in kurzer Zeit (gleiche IP, gleiches Geraet, gleicher Account, aber 102 / 131 / 124 / Firefox in wenigen Stunden) sieht fuer Google aus wie Bot / Account-Takeover. Google markiert Geraet/Account dann SERVERSEITIG, nicht nur in lokalen Cookies. Danach geht selbst die 0.0.2, die vorher noch ging, nicht mehr. - Erholung nach Markierung: Frisches Profil (--profile-dir /tmp/mu-fresh-test), 1x testen, dann Ruhe. Idealerweise 12-24h Pause vor dem Test. Storage loeschen allein reicht nicht (rm -rf ~/.local/share/mu-qtbrowser/storage + cache). Altes vergiftetes Profil nicht wieder benutzen. - Funktionierenden Stand sichern: main.cpp / main_tabs.cpp als *.GOOGLE-FUNKTIONIERT kopieren, Binaries sichern. Neue Tests nur mit separatem --profile-dir, nie mit dem guten Profil. - Back-Button-Fix bleibt: Nur Same-Host-Links verlieren ihr target (target="_new" / "_blank" auf schinkenpizza.de), Cross-Site-Popups (Logins) bleiben. Per loadFinished + runJavaScript, kein QWebEngineScriptCollection (baut auf Qt 6.4 nicht). - Qt 6.4 Kompatibilitaet: Kein QWebEngineSettings::globalSettings() (nur Qt 5), kein NotificationsEnabled (erst ab Qt 6.7). #include "main.moc" / "main_tabs.moc" steht ganz am Dateiende. - Falsche Zeile in CustomWebPage-Klasse entfernt: installSameHostTargetFixOnPage(page); darf NUR in Funktionen nach ->setNewPageFactory(...) stehen, nicht in der Klassen-Definition. v0.0.4 - 0.0.4f (Zwischenstaende, NICHT mehr verwenden): - 0.0.4: Gemeinsames Profil fuer beide Binaries, SpellCheck aus, renderer-process-limit=3, 32 MB Memory-Cache, kein Autoplay. target=_blank NICHT mehr pauschal entfernt (Logins brauchen Popups). - 0.0.4b: Qt 6.4-Fixes (s.o.). - 0.0.4c/d: Same-Host-target-Fix (Back-Button) + runJavaScript statt ScriptCollection. - 0.0.4e/f: FEHLERHAFTE Zwischenstaende (Chrome/131 + Sec-CH-UA- und userAgentData-Spoofing) - haben Google-Login gebrochen. Nicht verwenden. 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! ======================================================================