Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unprivilieged user #4

Open
vilinski opened this issue Dec 8, 2016 · 6 comments
Open

unprivilieged user #4

vilinski opened this issue Dec 8, 2016 · 6 comments

Comments

@vilinski
Copy link

vilinski commented Dec 8, 2016

Hi,
is it somehow possible to make it working with an unprivilieged user? Some apps (e.g. visual studio code ) won't work under root account

@queeno
Copy link
Owner

queeno commented Dec 8, 2016

It's just a docker container.. I believe you should be able to add a non-priviledged user via the terminal and su into the user and/or launch the app with that user

@vilinski
Copy link
Author

vilinski commented Dec 9, 2016

sure, but I thought it were possible to do with Dockerfile to get a vnc user session.
Tried it myself with no success so far

# add user
ENV user developer
ENV HOME /home/$user
RUN useradd -d $HOME -ms /bin/bash $user && \
    echo "$user:$user" | chpasswd && adduser $user sudo
RUN mkdir $HOME/.vnc
ADD xstartup $HOME/.vnc/xstartup
ADD passwd $HOME/.vnc/passwd
RUN chmod 600 $HOME/.vnc/passwd
RUN chown -R $user $HOME

# start vnc server
USER $user
CMD /usr/bin/vncserver :1 -geometry 1280x800 -depth 24 && tail -f $HOME/.vnc/*:1.log
vscode_1  | xauth:  file /home/developer/.Xauthority does not exist
vscode_1  |
vscode_1  | New 'X' desktop is dafe3263e851:1
vscode_1  |
vscode_1  | Starting applications specified in /home/developer/.vnc/xstartup
vscode_1  | Log file is /home/developer/.vnc/dafe3263e851:1.log
vscode_1  |
vscode_1  | 09/12/16 11:05:59 Copyright (C) 1999 AT&T Laboratories Cambridge
vscode_1  | 09/12/16 11:05:59 All Rights Reserved.
vscode_1  | 09/12/16 11:05:59 See http://www.tightvnc.com/ for information on TightVNC
vscode_1  | 09/12/16 11:05:59 Desktop name 'X' (dafe3263e851:1)
vscode_1  | 09/12/16 11:05:59 Protocol versions supported: 3.3, 3.7, 3.8, 3.7t, 3.8t
vscode_1  | 09/12/16 11:05:59 Listening for VNC connections on TCP port 5901
vscode_1  | Font directory '/usr/share/fonts/X11/Type1/' not found - ignoring
vscode_1  | Font directory '/usr/share/fonts/X11/75dpi/' not found - ignoring
vscode_1  | Font directory '/usr/share/fonts/X11/100dpi/' not found - ignoring
vscode_1  | sh: 1: /home/developer/.vnc/xstartup: not found

@cesarandreslopez
Copy link

Same issue here. Google Chrome and tor won't allow it to run in root mode. @vilinski Where you able to get this working?

@vilinski
Copy link
Author

it must be something obvious, but no, still no luck for me

@cesarandreslopez
Copy link

@vilinski I decided to go with my own repository and build this: https://github.com/cesarandreslopez/docker-ubuntu-mate-desktop-nomachine
It might be helpful. It runs on none root, and uses nomachine which is way better performance for remote sessiones.

@vilinski
Copy link
Author

@cesarandreslopez thanks for sharing! i will try it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants