[DOCKER] Handbrake GUI + Automation via CLI


Recommended Posts

  • Replies 252
  • Created
  • Last Reply

Top Posters In This Topic

just to test,

 

I tried to convert my boinc docker to the webrdp by using sparkly's

 

First I created a test base image: https://github.com/aptalca/docker-webrdp-base and https://registry.hub.docker.com/u/aptalca/docker-webrdp-base/dockerfile/ (basically removed all handbrake related processes)

 

Then I created a boinc docker that installs boinc, and creates an autostart file with the boinc manager start command: https://github.com/aptalca/docker-rdp-boinc/tree/development and https://registry.hub.docker.com/u/aptalca/docker-rdp-boinc-dev/dockerfile/

 

But unfortunately I am getting a blank screen when I open the WebUI

Link to comment

just to test,

 

I tried to convert my boinc docker to the webrdp by using sparkly's

 

First I created a test base image: https://github.com/aptalca/docker-webrdp-base and https://registry.hub.docker.com/u/aptalca/docker-webrdp-base/dockerfile/ (basically removed all handbrake related processes)

 

Then I created a boinc docker that installs boinc, and creates an autostart file with the boinc manager start command: https://github.com/aptalca/docker-rdp-boinc/tree/development and https://registry.hub.docker.com/u/aptalca/docker-rdp-boinc-dev/dockerfile/

 

But unfortunately I am getting a blank screen when I open the WebUI

 

can you break out the boinc installation routine for me and i'll try....

Link to comment

Boinc has separate client and manager

 

Client runs all the time in the background and manager is the gui to control the client

 

Easiest way to install is to download their script from here: http://boinc.berkeley.edu/dl/boinc_7.2.42_x86_64-pc-linux-gnu.sh

 

Copy it to the config folder, when run, the script creates a folder BOINC and puts all install and data files in that folder.

 

the run_client script under BOINC/ starts the client and the run_manager runs the GUI

 

 

when I open the WebUI of my install, I get a blank screen and the following lines keep repeating in the log:

 

Fri May 1 15:06:33 2015
VNCSConnST: Client pixel format depth 16 (16bpp) little-endian rgb565
guacd[319]: INFO:	Using fallback PATBLT (server is ignoring negotiated client capabilities)
guacd[319]: INFO:	Using fallback PATBLT (server is ignoring negotiated client capabilities)
guacd[319]: INFO:	Using fallback PATBLT (server is ignoring negotiated client capabilities)
guacd[319]: INFO:	Using fallback PATBLT (server is ignoring negotiated client capabilities)
May 1 15:06:33 d2bec288fc97 guacd[319]: Using fallback PATBLT (server is ignoring negotiated client capabilities)
May 1 15:06:33 d2bec288fc97 guacd[319]: Using fallback PATBLT (server is ignoring negotiated client capabilities)
May 1 15:06:33 d2bec288fc97 guacd[319]: Using fallback PATBLT (server is ignoring negotiated client capabilities)
May 1 15:06:33 d2bec288fc97 guacd[319]: Using fallback PATBLT (server is ignoring negotiated client capabilities)

Link to comment

Boinc has separate client and manager

 

Client runs all the time in the background and manager is the gui to control the client

 

Easiest way to install is to download their script from here: http://boinc.berkeley.edu/dl/boinc_7.2.42_x86_64-pc-linux-gnu.sh

 

Copy it to the config folder, when run, the script creates a folder BOINC and puts all install and data files in that folder.

 

the run_client script under BOINC/ starts the client and the run_manager runs the GUI

 

 

when I open the WebUI of my install, I get a blank screen and the following lines keep repeating in the log:

 

Fri May 1 15:06:33 2015
VNCSConnST: Client pixel format depth 16 (16bpp) little-endian rgb565
guacd[319]: INFO:	Using fallback PATBLT (server is ignoring negotiated client capabilities)
guacd[319]: INFO:	Using fallback PATBLT (server is ignoring negotiated client capabilities)
guacd[319]: INFO:	Using fallback PATBLT (server is ignoring negotiated client capabilities)
guacd[319]: INFO:	Using fallback PATBLT (server is ignoring negotiated client capabilities)
May 1 15:06:33 d2bec288fc97 guacd[319]: Using fallback PATBLT (server is ignoring negotiated client capabilities)
May 1 15:06:33 d2bec288fc97 guacd[319]: Using fallback PATBLT (server is ignoring negotiated client capabilities)
May 1 15:06:33 d2bec288fc97 guacd[319]: Using fallback PATBLT (server is ignoring negotiated client capabilities)
May 1 15:06:33 d2bec288fc97 guacd[319]: Using fallback PATBLT (server is ignoring negotiated client capabilities)

 

running as nobody ?

Link to comment

Should be

 

My firstrun.sh installs boinc and starts the client as nobody with the following:

 

su -c "cd /config && ./boinc_7.2.42_x86_64-pc-linux-gnu.sh" -s /bin/sh nobody
su -c "/config/BOINC/run_client --daemon" -s /bin/sh nobody

 

when I exec into the container I see that the client is running as nobody

 

my autostart for openbox has the following

 

xsetroot -solid black -cursor_name left_ptr
/config/BOINC/run_manager

 

EDIT***

 

Oh wait, I think I forgot to change ownership of autostart to nobody

Link to comment

i'm building this on my docker build vm

 

FROM phusion/baseimage:0.9.16
MAINTAINER sparklyballs <[email protected]>

# Set correct environment variables
ENV DEBIAN_FRONTEND=noninteractive HOME="/root" TERM=xterm LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8

# set ports
EXPOSE 8080 3389

# Use baseimage-docker's init system
CMD ["/sbin/my_init"]

# Add required files that are local
ADD src/ /root/

# set config volume
VOLUME /config

# Set the locale
RUN locale-gen en_US.UTF-8 && \

# Configure user nobody to match unRAID's settings
usermod -u 99 nobody && \
usermod -g 100 nobody && \
usermod -m -d /nobody nobody && \
usermod -s /bin/bash nobody && \
usermod -a -G adm,sudo nobody && \
echo "nobody:PASSWD" | chpasswd && \

# folders for user nobody
mkdir /nobody && \
mkdir -p /nobody/.config/openbox && \
mkdir /nobody/.cache && \

# update apt and install dependencies
echo 'deb mirror://mirrors.ubuntu.com/mirrors.txt trusty main universe restricted' > /etc/apt/sources.list && \
echo 'deb mirror://mirrors.ubuntu.com/mirrors.txt trusty-updates main universe restricted' >> /etc/apt/sources.list && \
add-apt-repository ppa:no1wantdthisname/openjdk-fontfix && \
apt-get update -qq && \
apt-get install -qy --force-yes --no-install-recommends wget unzip vnc4server x11-xserver-utils openbox xfonts-base xfonts-100dpi xfonts-75dpi libfuse2 xrdp openjdk-7-jre libossp-uuid-dev libpng12-dev libfreerdp-dev libcairo2-dev tomcat7 && \

# fix startup files etc....
mv /root/00_config.sh /etc/my_init.d/00_config.sh && \
mv /root/service/* /etc/service/ && \
rm -rf /root/service && \
chmod -R +x /etc/service/ /etc/my_init.d/ /etc/xrdp/startwm.sh && \

# fix up config files etc....
mv /root/xrdp.ini /etc/xrdp/xrdp.ini && \
mv /root/sesman.ini /etc/xrdp/sesman.ini && \
mkdir -p /etc/guacamole && \
mv /root/guacamole.properties /etc/guacamole/guacamole.properties && \
mv /root/noauth-config.xml /etc/guacamole/noauth-config.xml && \
mv  /root/rc.xml /nobody/.config/openbox/rc.xml && \
mv /root/autostart /nobody/.config/openbox/autostart && \
chown nobody:users /nobody/.config/openbox/rc.xml && \
chown -R nobody:users /config /nobody /usr/bin/handbrake && \

# install tomcat and guacamole
mkdir -p /var/cache/tomcat7 && \
mkdir -p /var/lib/guacamole/classpath && \
mkdir -p /usr/share/tomcat7/.guacamole && \
mkdir -p /usr/share/tomcat7-root/.guacamole && \
mkdir -p /root/.guacamole && \
dpkg -i /root/guacamole/guacamole-server_0.9.6_amd64.deb && \
ldconfig && \
cp /root/guacamole/guacamole-0.9.6.war /var/lib/tomcat7/webapps/guacamole.war && \
cp /root/guacamole/guacamole-auth-noauth-0.9.6.jar /var/lib/guacamole/classpath && \
rm -rf root/guacamole && \
ln -s /etc/guacamole/guacamole.properties /usr/share/tomcat7/.guacamole/ && \
ln -s /etc/guacamole/guacamole.properties /usr/share/tomcat7-root/.guacamole/ && \
ln -s /etc/guacamole/guacamole.properties /root/.guacamole/ && \
rm -Rf /var/lib/tomcat7/webapps/ROOT && \
ln -s /var/lib/tomcat7/webapps/guacamole.war /var/lib/tomcat7/webapps/ROOT.war && \
ln -s /usr/local/lib/freerdp/guacsnd.so /usr/lib/x86_64-linux-gnu/freerdp/ && \
ln -s /usr/local/lib/freerdp/guacdr.so /usr/lib/x86_64-linux-gnu/freerdp/ && \

#install boinc
mkdir -p /config && \
wget http://boinc.berkeley.edu/dl/boinc_7.2.42_x86_64-pc-linux-gnu.sh && \
chmod +x boinc_7.2.42_x86_64-pc-linux-gnu.sh && \
./boinc_7.2.42_x86_64-pc-linux-gnu.sh && \
chown -R nobody:users /config && \

# clean up
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
/usr/share/man /usr/share/groff /usr/share/info \
/usr/share/lintian /usr/share/linda /var/cache/man && \
(( find /usr/share/doc -depth -type f ! -name copyright|xargs rm || true )) && \
(( find /usr/share/doc -empty|xargs rmdir || true ))

 

with your autostart BTW.

Link to comment

figured it out

 

2 problems:

 

1) I forgot to chown nobody:users autostart

2) missing some dependencies (libnotify4 and libwxgtk2.8-dev)

 

Oh, this is glorious :)

 

Thanks so much and sorry for kind of hijacking the thread.

 

bottom line is, the base image is working really well. in the boinc container, all I had to do was install the main app, drop in the autostart and figure out the volume and port mappings

Capture2.JPG.5f62a25cd4c52a48489caa1949f934f9.JPG

Link to comment

figured it out

 

2 problems:

 

1) I forgot to chown nobody:users autostart

2) missing some dependencies (libnotify4 and libwxgtk2.8-dev)

 

Oh, this is glorious :)

 

Thanks so much and sorry for kind of hijacking the thread.

 

bottom line is, the base image is working really well. in the boinc container, all I had to do was install the main app, drop in the autostart and figure out the volume and port mappings

 

i'm thinking of a base image use

 

install a few related apps on a theme , edit the xrdp.ini and have a picker between them.

Link to comment

figured it out

 

2 problems:

 

1) I forgot to chown nobody:users autostart

2) missing some dependencies (libnotify4 and libwxgtk2.8-dev)

 

Oh, this is glorious :)

 

Thanks so much and sorry for kind of hijacking the thread.

 

bottom line is, the base image is working really well. in the boinc container, all I had to do was install the main app, drop in the autostart and figure out the volume and port mappings

 

i'm thinking of a base image use

 

install a few related apps on a theme , edit the xrdp.ini and have a picker between them.

 

or the guacamole menu, don't know which is easier for users.

Link to comment

My personal opinion is that docker is suppose to be one app per container. I say we keep it that way. If people want a full blown desktop then they should do it themselves.  In order to do what you want you will need multiple xrdp.ini entries with multiple xvnc runnings one for each application. You will need to edit the display and increase by 1 for each app. In terms of the auto start, you will need to do an if statement in order to determine which display is being launched and which app needs to be launched in turn.

Link to comment

My personal opinion is that docker is suppose to be one app per container. I say we keep it that way. If people want a full blown desktop then they should do it themselves.  In order to do what you want you will need multiple xrdp.ini entries with multiple xvnc runnings one for each application. You will need to edit the display and increase by 1 for each app. In terms of the auto start, you will need to do an if statement in order to determine which display is being launched and which app needs to be launched in turn.

 

 

i have ideas all the time, not all of them are good, lol.

Link to comment

PS I see someone had asked about x265. I also see this is based on phusion, an ubuntu base. Right? Handbrake 10.1 supports x265 (older versions too, but just not rev 5474)

 

https://launchpad.net/~stebbins/+archive/ubuntu/handbrake-releases

 

Of course I have no idea how you guys are doing this magic, so I don't know if there are reasons you can't use the latest ubuntu release. So feel free to tell me to shut up and enjoy the fruits of your labor  :-X

Link to comment

PS I see someone had asked about x265. I also see this is based on phusion, an ubuntu base. Right? Handbrake 10.1 supports x265 (older versions too, but just not rev 5474)

 

https://launchpad.net/~stebbins/+archive/ubuntu/handbrake-releases

 

Of course I have no idea how you guys are doing this magic, so I don't know if there are reasons you can't use the latest ubuntu release. So feel free to tell me to shut up and enjoy the fruits of your labor  :-X

 

 

already using that ppa, lemme check out whether it's actually pulling from there or ubuntu repo.

 

 

Link to comment

GRRR,

 

apt-get install -y handbrake

 

installs the old version.....

 

changed to apt-get install -y handbrake-gtk

 

checked with apt-get policy and the -gtk version is the latest package.

 

rebuilding now, hopefully it doesn't fail on dependencies, but i shouldn't think so.

Link to comment

;) yeah I didn't just pick 5474 out of thin air hehe But thanks so much for the quick response. This was a matter of life or death. National Importance. We've got top men, TOP MEN working on it.  That last part is no joke, thanks again :)

 

who are these top men and do they take requests ?

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.