From 10d2e37e9de81eb54e195fe7bf942245a36778a7 Mon Sep 17 00:00:00 2001 From: Paul DeCarlo Date: Fri, 24 Aug 2018 17:00:31 -0500 Subject: [PATCH 1/5] Add Dockerfile and instructions to run Win95 as a container --- Dockerfile | 44 ++++++++++++++++++++++++++++++++++++++++++++ README.md | 5 +++++ 2 files changed, 49 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..a2addfe --- /dev/null +++ b/Dockerfile @@ -0,0 +1,44 @@ +# DESCRIPTION: Run Windows 95 in a container +# AUTHOR: Paul DeCarlo +# +# Made possible through prior art by: +# copy (v86 - x86 virtualization in JavaScript) +# felixrieseberg (Windows95 running in electron) +# Microsoft (Windows 95) +# +# ***Docker Run Command*** +# +# docker run -it \ +# -v /tmp/.X11-unix:/tmp/.X11-unix \ # mount the X11 socket +# -e DISPLAY=unix$DISPLAY \ # pass the display +# --device /dev/snd \ # sound +# --name windows95 \ +# toolboc/windows95 +# +# ***TroubleShooting*** +# If you receive Gtk-WARNING **: cannot open display: unix:0 +# Run: +# xhost + +# + +FROM node:10.9-stretch + +LABEL maintainer "Paul DeCarlo " + +RUN apt-get update && apt-get install -y \ + libgtk-3-0 \ + libx11-xcb-dev \ + libgconf2-dev \ + libnss3 \ + libasound2 \ + libxtst-dev \ + libxss1 \ + git \ + --no-install-recommends && \ + rm -rf /var/lib/apt/lists/* + +COPY . . + +RUN npm install + +ENTRYPOINT [ "npm", "start"] \ No newline at end of file diff --git a/README.md b/README.md index efddaf3..7bc2e97 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,11 @@ You'll likely be better off with an actual virtualization app, but the short ans @DisplacedGamers](https://youtu.be/xDXqmdFxofM) I can recommend that you switch to a resolution of 640x480 @ 256 colors before starting DOS games - just like in the good ol' days. +## Can it run in a container? +Of course! Currently this is only supported on Linux, simply install [Docker](http://docker.io) on your distro of choice and run the following: + + docker run -it -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=unix$DISPLAY --device /dev/snd --name windows95 toolboc/windows95 + ## How's the code? This only works well by accident and was mostly a joke. The code quality is accordingly. From 9f8040bb22bc679ba476f035ddf931f95d7c6a70 Mon Sep 17 00:00:00 2001 From: toolboc Date: Sat, 25 Aug 2018 10:35:09 -0500 Subject: [PATCH 2/5] Update Dockerfile --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index a2addfe..85a0935 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,7 +25,7 @@ FROM node:10.9-stretch LABEL maintainer "Paul DeCarlo " -RUN apt-get update && apt-get install -y \ +RUN apt update && apt install -y \ libgtk-3-0 \ libx11-xcb-dev \ libgconf2-dev \ @@ -41,4 +41,4 @@ COPY . . RUN npm install -ENTRYPOINT [ "npm", "start"] \ No newline at end of file +ENTRYPOINT [ "npm", "start"] From 91783e7d262790113a34a4022be57b644a5b9d5c Mon Sep 17 00:00:00 2001 From: toolboc Date: Sat, 25 Aug 2018 11:25:13 -0500 Subject: [PATCH 3/5] Add libcanberra-gtk3-module --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 85a0935..24b3d35 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,6 +27,7 @@ LABEL maintainer "Paul DeCarlo " RUN apt update && apt install -y \ libgtk-3-0 \ + libcanberra-gtk3-module \ libx11-xcb-dev \ libgconf2-dev \ libnss3 \ From 6c120633534050c601ab52271967ef2fa2053748 Mon Sep 17 00:00:00 2001 From: toolboc Date: Sat, 25 Aug 2018 11:45:18 -0500 Subject: [PATCH 4/5] Add note on xhost for allowing connections to X11 --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 7bc2e97..11500cb 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,8 @@ Of course! Currently this is only supported on Linux, simply install [Docker](h docker run -it -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=unix$DISPLAY --device /dev/snd --name windows95 toolboc/windows95 +Note: You may need to run `xhost +` on your system to allow connections to the X server running on the host. + ## How's the code? This only works well by accident and was mostly a joke. The code quality is accordingly. From e62a8cbed6b18dd58bc1afc6bb9fa00afa816735 Mon Sep 17 00:00:00 2001 From: Paul DeCarlo Date: Sat, 25 Aug 2018 17:45:36 -0500 Subject: [PATCH 5/5] Add detailed docker instructions to docs --- README.md | 6 +----- docs/docker-instructions.md | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 5 deletions(-) create mode 100644 docs/docker-instructions.md diff --git a/README.md b/README.md index 11500cb..73e0e2c 100644 --- a/README.md +++ b/README.md @@ -18,11 +18,7 @@ You'll likely be better off with an actual virtualization app, but the short ans 640x480 @ 256 colors before starting DOS games - just like in the good ol' days. ## Can it run in a container? -Of course! Currently this is only supported on Linux, simply install [Docker](http://docker.io) on your distro of choice and run the following: - - docker run -it -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=unix$DISPLAY --device /dev/snd --name windows95 toolboc/windows95 - -Note: You may need to run `xhost +` on your system to allow connections to the X server running on the host. +[Of course!](./docs/docker-instructions.md) ## How's the code? This only works well by accident and was mostly a joke. The code quality is accordingly. diff --git a/docs/docker-instructions.md b/docs/docker-instructions.md new file mode 100644 index 0000000..6cba61f --- /dev/null +++ b/docs/docker-instructions.md @@ -0,0 +1,25 @@ +# Running Windows 95 in Docker + +## Display using a volume mount of the host X11 Unix Socket (Linux Only): + +**Requirements:** +* Linux OS with a running X-Server Display +* [Docker](http://docker.io) + + docker run -it -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=unix$DISPLAY --device /dev/snd --name windows95 toolboc/windows95 + + +Note: You may need to run `xhost +` on your system to allow connections to the X server running on the host. + +## Display using Xming X11 Server over tcp Socket (Windows and beyond): + +**Requirements:** +* [Xming](https://sourceforge.net/projects/xming/) +* [Docker](http://docker.io) + +1. Start the Xming X11 Server +2. Obtain the ip of the host machine running the Xming server +3. Edit X0.hosts (Located in the install directory of Xming) by adding the ip of the host machine obtained in step 2 +4. Run the command below and replace the `` placeholder with the ip from step 2 + + docker run -it -e DISPLAY= --name windows95 toolboc/windows95