LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Containers
User Name
Password
Linux - Containers This forum is for the discussion of all topics relating to Linux containers. Docker, LXC, LXD, runC, containerd, CoreOS, Kubernetes, Mesos, rkt, and all other Linux container platforms are welcome.

Notices


Reply
  Search this Thread
Old 10-22-2022, 08:28 PM   #1
mackowiakp
Member
 
Registered: Jun 2014
Location: Poland/Gdynia
Distribution: Mageia 9, SH4, Debian
Posts: 367

Rep: Reputation: 8
Run Xfce4 on VNC server in docker container


Installed in Docker Container UBUNTU rubensa/ubuntu-tini-x11 (latest) on QNAP NAS. I have defined ENTRYPOINT as

Code:
/sbin/tini -- /docker-entrypoint.sh
The contents of the docker-entrypoint.sh file:

Code:
#!/bin/sh
/etc/init.d/ssh start
/etc/init.d/cron start
/bin/date > /dev/shm/date
exec "$@"
The container is running and the command sequence defined in docker-entrypoint.sh executes correctly.
VNC server also starts with the following command sequence (from root):

Code:
rm -rf /tmp/.X*
rm -f /root/.vnc/*.log
rm -f /root/.vnc/*.pid
Xtightvnc :1 -depth 24 -geometry 1280x720 &
export DISPLAY=:1
Result:

Code:
root@Ubuntu:/# 23/10/22 03:06:48 Xvnc version TightVNC-1.3.10
23/10/22 03:06:48 Copyright (C) 2000-2009 TightVNC Group
23/10/22 03:06:48 Copyright (C) 1999 AT&T Laboratories Cambridge
23/10/22 03:06:48 All Rights Reserved.
23/10/22 03:06:48 See http://www.tightvnc.com/ for information on TightVNC
23/10/22 03:06:48 Desktop name 'x11' (Ubuntu:1)
23/10/22 03:06:48 Protocol versions supported: 3.3, 3.7, 3.8, 3.7t, 3.8t
23/10/22 03:06:48 Listening for VNC connections on TCP port 5901
Font directory '/usr/share/fonts/X11/Speedo/' not found - ignoring

However, when you try to run xface using commands (from root):

Code:
export DISPLAY=":1"
startxfce4 &
it ends up with a sequence of errors:

Code:
[1] 408
root@Ubuntu:/# /usr/bin/startxfce4: X server already running on display :1

(xfce4-session:408): xfce4-session-WARNING **: 03:18:32.521: Failed to spawn ssh-agent: Failed to close file descriptor for child process (Operation not permitted)

(xfce4-session:408): xfce4-session-WARNING **: 03:18:32.524: failed to call dbus-update-activation-environment. Output was (null), error was Failed to close file descriptor for child process (Operation not permitted)

(xfce4-session:408): xfce4-session-WARNING **: 03:18:32.530: Failed to spawn gpg-agent: Failed to close file descriptor for child process (Operation not permitted)

(xfce4-session:408): xfce4-session-WARNING **: 03:18:32.540: Unable to launch "xfwm4": Failed to close file descriptor for child process (Operation not permitted)

(xfce4-session:408): xfce4-session-WARNING **: 03:18:32.544: Unable to launch "xfsettingsd": Failed to close file descriptor for child process (Operation not permitted)

(xfce4-session:408): xfce4-session-WARNING **: 03:18:32.547: Unable to launch "xfce4-panel": Failed to close file descriptor for child process (Operation not permitted)

(xfce4-session:408): xfce4-session-WARNING **: 03:18:32.550: Unable to launch "Thunar": Failed to close file descriptor for child process (Operation not permitted)

(xfce4-session:408): xfce4-session-WARNING **: 03:18:32.554: Unable to launch "xfdesktop": Failed to close file descriptor for child process (Operation not permitted)

(xfce4-session:408): xfce4-session-WARNING **: 03:18:32.583: Unable to launch "xiccd" (specified by autostart/xiccd.desktop): Failed to close file descriptor for child process (Operation not permitted)

(xfce4-session:408): xfce4-session-WARNING **: 03:18:32.597: Unable to launch "xfce4-screensaver" (specified by autostart/xfce4-screensaver.desktop): Failed to close file descriptor for child process (Operation not permitted)

(xfce4-session:408): xfce4-session-WARNING **: 03:18:32.631: Unable to launch "/usr/lib/x86_64-linux-gnu/xfce4/notifyd/xfce4-notifyd" (specified by autostart/xfce4-notifyd.desktop): Failed to close file descriptor for child process (Operation not permitted)

(xfce4-session:408): xfce4-session-WARNING **: 03:18:32.665: Unable to launch "start-pulseaudio-x11" (specified by autostart/pulseaudio.desktop): Failed to close file descriptor for child process (Operation not permitted)

(xfce4-session:408): xfce4-session-WARNING **: 03:18:32.677: Unable to launch "/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1" (specified by autostart/polkit-gnome-authentication-agent-1.desktop): Failed to close file descriptor for child process (Operation not permitted)

(xfce4-session:408): xfce4-session-WARNING **: 03:18:32.681: Unable to launch "xfsettingsd" (specified by autostart/xfsettingsd.desktop): Failed to close file descriptor for child process (Operation not permitted)

(xfce4-session:408): xfce4-session-WARNING **: 03:18:32.696: Unable to launch "xdg-user-dirs-update" (specified by autostart/xdg-user-dirs.desktop): Failed to close file descriptor for child process (Operation not permitted)

(xfce4-session:408): xfce4-session-WARNING **: 03:18:32.699: Unable to launch "xfce4-power-manager" (specified by autostart/xfce4-power-manager.desktop): Failed to close file descriptor for child process (Operation not permitted)
The first error message states that DISPLAY:1 is already taken. The rest of the errors are - as I understand it - a consequence of the former.

Can anyone help me and write what I am doing wrong?
 
Old 10-23-2022, 12:56 PM   #2
jmgibson1981
Senior Member
 
Registered: Jun 2015
Location: Tucson, AZ USA
Distribution: Debian
Posts: 1,141

Rep: Reputation: 392Reputation: 392Reputation: 392Reputation: 392
I was able to get this going inside of a docker but not with x11, rather xvfb i think. Sucks for any kind of graphics though. Useful for small stuff though. I hacked it out when I had some crazy idea about running steam and using it as a remote play source but it failed without graphics acceleration in the Xvfb.

https://gitlab.com/jmgibson1981/home...steamboxdebian

Last edited by jmgibson1981; 10-23-2022 at 01:21 PM.
 
Old 10-23-2022, 09:46 PM   #3
mackowiakp
Member
 
Registered: Jun 2014
Location: Poland/Gdynia
Distribution: Mageia 9, SH4, Debian
Posts: 367

Original Poster
Rep: Reputation: 8
I dont care about HW graphic acceleration. All I need is basic functionality of GUI like Thunderbird for example.
 
Old 10-24-2022, 06:21 PM   #4
jmgibson1981
Senior Member
 
Registered: Jun 2015
Location: Tucson, AZ USA
Distribution: Debian
Posts: 1,141

Rep: Reputation: 392Reputation: 392Reputation: 392Reputation: 392
then xvfb would be the easiest method. the entrypoint.sh has the stuff to get it launched.
 
  


Reply

Tags
docker, startxfce4, ubuntu, vnc



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Difference between docker.io, docker-cd, and Docker Desktop LXer Syndicated Linux News 0 08-15-2022 05:39 PM
LXer: How to Store Docker Container Data In Docker Volumes LXer Syndicated Linux News 0 03-08-2022 12:45 AM
LXer: You are here: Home / Tips / How to Run Docker Containers How to Run Docker Containers LXer Syndicated Linux News 0 01-29-2020 03:00 PM
LXer: Inside the Open Container Project: How Docker plans to unite the container market LXer Syndicated Linux News 0 06-23-2015 04:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Containers

All times are GMT -5. The time now is 07:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration