• Home
  • Releases
  • Submit Vuln
  • Press
  • About
  • PGP
  • Contact
    • Contact
    • Submit Vuln
    • VDP
  • Tutorials
    • All Posts
    • Photoshop on Linux
    • macOS on Linux
  • Supporters
  • Projects
  • Training
Sick Codes - Security Research, Hardware & Software Hacking, Consulting, Linux, IoT, Cloud, Embedded, Arch, Tweaks & Tips!
  • Home
  • Releases
  • Submit Vuln
  • Press
  • About
  • PGP
  • Contact
    • Contact
    • Submit Vuln
    • VDP
  • Tutorials
    • All Posts
    • Photoshop on Linux
    • macOS on Linux
  • Supporters
  • Projects
  • Training
No Result
View All Result
Sick Codes - Security Research, Hardware & Software Hacking, Consulting, Linux, IoT, Cloud, Embedded, Arch, Tweaks & Tips!
  • Home
  • Releases
  • Submit Vuln
  • Press
  • About
  • PGP
  • Contact
    • Contact
    • Submit Vuln
    • VDP
  • Tutorials
    • All Posts
    • Photoshop on Linux
    • macOS on Linux
  • Supporters
  • Projects
  • Training
No Result
View All Result
Sick Codes - Security Research, Hardware & Software Hacking, Consulting, Linux, IoT, Cloud, Embedded, Arch, Tweaks & Tips!
No Result
View All Result
Home Tutorials

Xfce inside Docker! Virtual Display Screen Inside Your Headless Container!

by Sick Codes
April 11, 2020 - Updated on June 24, 2020
in Tutorials
1
xfce inside docker container

xfce inside docker container

Want to have a virtual display running inside docker? You will need xvfb which is an ‘X virtual frame-buffer’ display server.

The following Dockerfile code installs xfce4 in a virtual screen.
[code]ARG DEBIAN_FRONTEND=noninteractive
ENV TZ=UTC
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt-get install keyboard-configuration -y
RUN apt install xfce4 xfce4-goodies -y
RUN apt install xvfb -y

ENV DISPLAY :99

WORKDIR /root
ADD . .
RUN chmod a+x display.sh

CMD { bash display.sh; }

[/code]
Because you still need a tty when running the docker file, run the Xfvb in a shell file at runtime. Here we are using DISPLAY number 99 for arbitrary reason.

docker run -t image
[code]export DISPLAY=:99
Xvfb :99 -screen 0 1000x1000x16 &
xrandr –query
sleep 5
nohup startxfce4 &
[/code]
Use xdotool to click the panel button (Add to script after startxfce4 has ran)
[code]apt install xdotool -y
xdotool mousemove 493 539 click 1[/code]
Use xdotool to press enter
[code]xdotool key KP_Enter[/code]
Verify the screen is “on” using
[code]xrandr –query[/code]
Or take a screenshot using scrot

Next Post
dotnet46 dockerfile run windows application

RUN Wine/Windows Inside Docker! Autoclick, winetricks, Save-As, DotNet45, .NET46!

firefox screenshot inside docker container

Take Terminal Screenshots Inside Docker Container! Scrot + imcat

How to Check if SELinux is Enabled or Disabled Ubuntu, CentOS

Comments 1

  1. Pingback: Take Terminal Screenshots Inside Docker Container! Scrot + imcat - Sick Codes - Linux, NetSec, VPS, Arch, Debian, CentOS Tweaks & Tips!

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

No Result
View All Result
  • Home
  • Releases
  • Submit Vuln
  • Press
  • About
  • PGP
  • Contact
    • Contact
    • Submit Vuln
    • VDP
  • Tutorials
    • All Posts
    • Photoshop on Linux
    • macOS on Linux
  • Supporters
  • Projects
  • Training

© 2017-2021 Sick.Codes

@sickcodes

@sickcodes

@sickcodes

Discord Server

sickcodes.slack.com

t.me/sickcodeschat

./contact_form