ausbin / nsdo

run a command in a Linux network namespace
https://code.austinjadams.com/nsdo
MIT License
40 stars 6 forks source link

chromium does not work with nsdo #16

Open vstoykovbg opened 3 weeks ago

vstoykovbg commented 3 weeks ago

This was working:

#!/bin/bash
unset GTK_IM_MODULE
nsdo tornamespace1 chromium --temp-profile --incognito

But recently it does not:

[123989:123989:0926/205657.708350:ERROR:ozone_platform_x11.cc(244)] Missing X server or $DISPLAY
[123989:123989:0926/205657.708391:ERROR:env.cc(258)] The platform failed to initialize.  Exiting.

I found a workaround using Xephyr but it's not pretty.

nsdo tornamespace1 ./stage2.bash

stage2.bash:

#!/bin/bash

unset GTK_IM_MODULE
unset QT_IM_MODULE
unset XMODIFIERS

Xephyr -br -ac -noreset -screen 1600x900 :26 &

export DISPLAY=:26
sleep 1
DISPLAY=:26 fluxbox &

DISPLAY=:26 exec chromium --temp-profile --incognito 

Probably the problem is related with that chromium is from a snap package, not a classic install.

vstoykovbg commented 3 weeks ago

After installing chromium-browser with apt-get install and messing it up, then multiple attempts to uninstall and install it again with snap install chromium it finally works.

I don't know why. It works with chromium-browser package uninstalled and chromium installed with snap.