You are not logged in.

#1 2015-09-09 19:31:21

redsolja
Member
Registered: 2011-04-04
Posts: 43

Chromium as a no-login user

Hello,

After the latest developments about chrome(-ium) and its privacy, I want to run chromium as a user with /usr/bin/nologin as its shell.

I do the following

# useradd -m -s /usr/bin/nologin chromium
# su -s /bin/sh - chromium
$ export DISPLAY=:0.0
$ chromium
No protocol specified
[3324:3324:0909/212943:ERROR:browser_main_loop.cc(237)] Gtk: cannot open display: :0.0

I am not sure as to what to do next to solve my problem.

Offline

#2 2015-09-09 19:42:53

ugjka
Member
From: Latvia
Registered: 2014-04-01
Posts: 1,962
Website

Re: Chromium as a no-login user

Is your $DISPLAY right?

echo $DISPLAY

Offline

#3 2015-09-09 19:46:08

redsolja
Member
Registered: 2011-04-04
Posts: 43

Re: Chromium as a no-login user

as user $DISPLAY is :0

as the chromium (no-login) user the $DISPLAY is :0.0

But, as I show at my original paste, I explicitly set it when I change user.

Last edited by redsolja (2015-09-09 19:47:10)

Offline

#4 2015-09-09 20:16:08

ugjka
Member
From: Latvia
Registered: 2014-04-01
Posts: 1,962
Website

Re: Chromium as a no-login user

It's not just the problem with chrome, nothing works in fact with your method.

Offline

#5 2015-09-09 20:18:48

redsolja
Member
Registered: 2011-04-04
Posts: 43

Re: Chromium as a no-login user

I used to have another user set at the system and I was able to switch to that and run chromium and I still can. A possible solution might be to change the login shell of that user to nologin so that I use it just for that, but I would prefer a solution that I actually understand better.

Have you got anything specific to suggest?

Last edited by redsolja (2015-09-09 20:19:48)

Offline

#6 2015-09-09 20:51:13

ugjka
Member
From: Latvia
Registered: 2014-04-01
Posts: 1,962
Website

Re: Chromium as a no-login user

Try executing this before su

xhost +local:

Offline

Board footer

Powered by FluxBB