This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:15.10 | |
MAINTAINER Nic Roland "nicroland9@gmail.com" | |
# Install lots of packages | |
RUN apt-get update && apt-get install -y libxcb-keysyms1-dev libxcb-image0-dev \ | |
libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync0-dev libxcb-xfixes0-dev \ | |
libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0-dev \ | |
libfontconfig1-dev libfreetype6-dev libx11-dev libxext-dev libxfixes-dev \ | |
libxi-dev libxrender-dev libxcb1-dev libx11-xcb-dev libxcb-glx0-dev x11vnc \ | |
xauth build-essential mesa-common-dev libglu1-mesa-dev libxkbcommon-dev \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Build base image | |
docker build -t qt:base . | |
# N.B. This is an important step any time you're running GUIs in containers | |
xhost local:root | |
# Run installation wizard, save to new image, delete left over container | |
docker run -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY -v /dev/shm:/dev/shm --device /dev/dri --name qt_install --entrypoint /qt-unified-linux-x64-online.run qt:base | |
docker commit qt_install qt:latest | |
docker rm qt_install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:15.10 | |
MAINTAINER Nic Roland "nicroland9@gmail.com" | |
RUN apt-get update && \ | |
apt-get install -y imagemagick feh | |
ENTRYPOINT import -window root -display :0 /tmp/0.png && \ | |
feh -. /tmp/0.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Build the demo dockerfile | |
docker build -f Dockerfile.screenshot -t xattacks:screenshot . | |
# Allow Docker processes to access X | |
xhost local:root | |
# Run container that takes a screenshot on the host (imagemagick) and displays it for you (feh) | |
docker run -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY xattacks:screenshot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class WithoutParams(object): | |
def __init__(self, func): | |
""" | |
Constructor receives target function. | |
""" | |
self.func = func | |
def __call__(self, *args, **kwargs): | |
""" | |
Arguments intended for target function are passed to __call__. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def without_params(func): | |
""" | |
Outer function takes target function and returns a wrapped one. | |
""" | |
def _without_params(*args, **kwargs): | |
""" | |
Inner function takes target arguments and makes the call. | |
""" | |
return func("Never gonna run around") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:12.04 | |
MAINTAINER Nic Roland "nicroland9@gmail.com" | |
RUN apt-get update && \ | |
apt-get install -y autoconf automake git g++ console-tools language-pack-en-base make && \ | |
apt-get clean | |
RUN locale-gen en_US.UTF-8 | |
RUN git clone https://github.com/kernc/logkeys | |
WORKDIR logkeys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:15.10 | |
MAINTAINER Nic Roland "nicroland9@gmail.com" | |
RUN apt-get update && \ | |
apt-get install -y xdotool cron && \ | |
apt-get clean | |
RUN echo "20 * * * * xdotool key Caps_Lock" > capslock.cron | |
RUN crontab capslock.cron |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:15.10 | |
MAINTAINER Nic Roland "nicroland9@gmail.com" | |
RUN apt-get update && \ | |
apt-get install -y xclip && \ | |
apt-get clean | |
ENTRYPOINT xclip -o -selection clipboard |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:15.10 | |
MAINTAINER Nic Roland "nicroland9@gmail.com" | |
RUN apt-get update && \ | |
apt-get install -y xdotool cron && \ | |
apt-get clean | |
RUN echo "20 * * * * xdotool movemouse 15 15 click 1" > mouse.cron | |
RUN crontab mouse.cron |
OlderNewer