Git Product home page Git Product logo

dmotte / desktainer-rootless Goto Github PK

View Code? Open in Web Editor NEW
8.0 1.0 3.0 403 KB

๐Ÿ–ฅ Remote desktop in a container (rootless version)

Home Page: https://hub.docker.com/r/dmotte/desktainer-rootless

License: MIT License

Dockerfile 48.29% Shell 51.71%
arm browser container debian desktop docker docker-compose http lxde no-root novnc remote rootless vnc webapp websockify x11 desktainer x11vnc remote-desktop

desktainer-rootless's Introduction

desktainer-rootless

icon

GitHub main workflow Docker Pulls

๐Ÿ’ป Remote desktop in a container (rootless version). This image is almost equivalent to dmotte/desktainer but it runs as a non-root user.

๐Ÿ“ฆ This image is also on Docker Hub as dmotte/desktainer-rootless and runs on several architectures (e.g. amd64, arm64, ...). To see the full list of supported platforms, please refer to the .github/workflows/main.yml file. If you need an architecture which is currently unsupported, feel free to open an issue.

Simple usage

The simplest way to try this image is:

docker run -it --rm -p6901:6901 dmotte/desktainer-rootless

Note: since some GUI applications may have issues with Docker's default seccomp profile, you may need to use --security-opt seccomp=unconfined

Then head over to http://localhost:6901/ to access the remote desktop.

Screenshot

For a more complex example, refer to the docker-compose.yml file.

You can also extend this image to create your own custom unprivileged user, and then leverage the --user Docker option to run the container as such.

Note: even if the container is running as an unprivileged user, you can still use docker exec -ituroot mycontainer bash to run commands as root inside it.

More info

For more info see the dmotte/desktainer project, which is very similar to this one.

The environment variables are the same, except MAINUSER_NAME and MAINUSER_PASS which have no effect. This behaviour is intended, since this runs as a non-root user.

desktainer-rootless's People

Contributors

dependabot[bot] avatar dmotte avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

desktainer-rootless's Issues

Segmentation fault on qnap

the problem to create fake display:

this error:

/startup.sh: line 62:     8 Aborted                 /usr/bin/Xvfb :0 -screen 0 "${RESOLUTION}x24" -nolisten tcp -nolisten unix
Starting LXDE
** Message: 13:15:03.462: main.vala:101: Session is LXDE
** Message: 13:15:03.462: main.vala:102: DE is LXDE

(lxsession:10): Gtk-WARNING **: 13:15:03.468: cannot open display: :0
Starting x11vnc
05/04/2023 13:15:05 passing arg to libvncserver: -rfbport
05/04/2023 13:15:05 passing arg to libvncserver: 5901
05/04/2023 13:15:05 x11vnc version: 0.9.16 lastmod: 2019-01-05  pid: 21
05/04/2023 13:15:05 XOpenDisplay(":0") failed.
05/04/2023 13:15:05 Trying again with XAUTHLOCALHOSTNAME=localhost ...

05/04/2023 13:15:05 ***************************************
05/04/2023 13:15:05 *** XOpenDisplay failed (:0)

*** x11vnc was unable to open the X DISPLAY: ":0", it cannot continue.
*** There may be "Xlib:" error messages above with details about the failure.

Some tips and guidelines:

** An X server (the one you wish to view) must be running before x11vnc is
   started: x11vnc does not start the X server.  (however, see the -create
   option if that is what you really want).

** You must use -display <disp>, -OR- set and export your $DISPLAY
   environment variable to refer to the display of the desired X server.
 - Usually the display is simply ":0" (in fact x11vnc uses this if you forget
   to specify it), but in some multi-user situations it could be ":1", ":2",
   or even ":137".  Ask your administrator or a guru if you are having
   difficulty determining what your X DISPLAY is.

** Next, you need to have sufficient permissions (Xauthority) 
   to connect to the X DISPLAY.   Here are some Tips:

 - Often, you just need to run x11vnc as the user logged into the X session.
   So make sure to be that user when you type x11vnc.
 - Being root is usually not enough because the incorrect MIT-MAGIC-COOKIE
   file may be accessed.  The cookie file contains the secret key that
   allows x11vnc to connect to the desired X DISPLAY.
 - You can explicitly indicate which MIT-MAGIC-COOKIE file should be used
   by the -auth option, e.g.:
       x11vnc -auth /home/someuser/.Xauthority -display :0
       x11vnc -auth /tmp/.gdmzndVlR -display :0
   you must have read permission for the auth file.
   See also '-auth guess' and '-findauth' discussed below.

** If NO ONE is logged into an X session yet, but there is a greeter login
   program like "gdm", "kdm", "xdm", or "dtlogin" running, you will need
   to find and use the raw display manager MIT-MAGIC-COOKIE file.
   Some examples for various display managers:

     gdm:     -auth /var/gdm/:0.Xauth
              -auth /var/lib/gdm/:0.Xauth
     kdm:     -auth /var/lib/kdm/A:0-crWk72
              -auth /var/run/xauth/A:0-crWk72
     xdm:     -auth /var/lib/xdm/authdir/authfiles/A:0-XQvaJk
     dtlogin: -auth /var/dt/A:0-UgaaXa

   Sometimes the command "ps wwwwaux | grep auth" can reveal the file location.

   Starting with x11vnc 0.9.9 you can have it try to guess by using:

              -auth guess

   (see also the x11vnc -findauth option.)

   Only root will have read permission for the file, and so x11vnc must be run
   as root (or copy it).  The random characters in the filenames will of course
   change and the directory the cookie file resides in is system dependent.

See also: http://www.karlrunge.com/x11vnc/faq.html
Starting noVNC
WebSocket server settings:
  - Listen on :6901
  - Web server. Web root: /usr/share/novnc
  - No SSL/TLS support (no cert file)
  - proxying from :6901 to 127.0.0.1:5901
192.168.1.20 - - [05/Apr/2023 13:15:42] 192.168.1.20: Plain non-SSL (ws://) WebSocket connection
192.168.1.20 - - [05/Apr/2023 13:15:42] 192.168.1.20: Path: '/websockify'
192.168.1.20 - - [05/Apr/2023 13:15:42] connecting to: 127.0.0.1:5901
192.168.1.20 - - [05/Apr/2023 13:15:42] Failed to connect to 127.0.0.1:5901

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.