mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-19 21:06:09 +00:00
Desktop: keep Firefox out of Work Offline, and probe the network in debug runs
Firefox decides whether it is online by dumping the routing table over netlink, which Android denies to apps; it sees no default route, switches to Work Offline and every page fails while the network is fine. A defaults file staged into Firefox's pref directory turns that off, and drops the process sandboxes that have nothing to set up under proot. Debug runs now log a name lookup and a fetch over IPv4 and IPv6 from inside the session.
This commit is contained in:
1 parent
36b0bea470
commit
3d4cfededf
4 files changed
+31
No files matched your search
@@ -14,6 +14,16 @@ run() {
|
||||
}
|
||||
# The output at the app's real size, in case rc.xml's mode did not take.
|
||||
[ -n "${BL_WIDTH:-}" ] && wlr-randr --output WL-1 --custom-mode "${BL_WIDTH}x${BL_HEIGHT}" 2>&1 | sed 's/^/[wlr-randr] /'
|
||||
# In debug runs, ground truth on the network from inside the session: name lookup, then a
|
||||
# fetch over IPv4 and over IPv6, so a browser's "no internet" can be placed.
|
||||
if [ -f "$HOME/.steamdeck-desktop-debug" ]; then
|
||||
(
|
||||
echo "[net] getent: $(getent hosts example.com 2>&1 | head -2 | tr '\n' ' ')"
|
||||
for f in 4 6; do
|
||||
echo "[net] curl -$f: $(curl -$f -sS -m 8 -o /dev/null -w '%{http_code} %{remote_ip}' https://example.com 2>&1)"
|
||||
done
|
||||
) &
|
||||
fi
|
||||
swaybg -m fill -i /usr/share/backgrounds/steamdeck.png &
|
||||
# Desktop icons (pcmanfm-qt manages the desktop surface) and the panel with the app menu.
|
||||
run pcmanfm-qt pcmanfm-qt --desktop --profile lxqt
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
// Firefox defaults for the SteamDeck desktop, staged by the app into
|
||||
// /usr/lib/firefox/defaults/pref/. A user's own prefs.js still wins.
|
||||
|
||||
// Firefox judges "online" by dumping the routing table over netlink, which Android denies to
|
||||
// apps; seeing no default route it switches itself to Work Offline and every page fails while
|
||||
// the network is fine. Let it just try.
|
||||
pref("network.manage-offline-status", false);
|
||||
pref("browser.offline", false);
|
||||
// No user namespaces on Android kernels and a ptrace'd process tree: the process sandboxes
|
||||
// have nothing to set up and only add failure modes.
|
||||
pref("security.sandbox.content.level", 0);
|
||||
pref("media.cubeb.sandbox", false);
|
||||
pref("security.sandbox.socket.process.level", 0);
|
||||
// Handheld-sized chrome, and nothing phoning home on first run.
|
||||
pref("browser.shell.checkDefaultBrowser", false);
|
||||
pref("datareporting.policy.dataSubmissionEnabled", false);
|
||||
pref("browser.aboutwelcome.enabled", false);
|
||||
pref("browser.startup.homepage", "about:blank");
|
||||
pref("layout.css.devPixelsPerPx", "1.25");
|
||||
Reference in new issue
Block a user