📜 ⬆️ ⬇️

Run Hiri on Arch Linux via Docker

What to do if you don’t have exactly the same Linux as the creator of the software you need, and using the virtual machine is too expensive? Use Docker! And if this is a graphical application? The answer is the same - use Docker!

Since the new job uses Microsoft Exchange for mail exchange, I configured Evolution mailer in my Arch. Functionally, everything seems to be there, but it doesn’t hold out to MS Outlook.

I decided to look for other programs that can work with MS Exchange from Linux and came across an unknown to me earlier Hiri. Judging by the screenshots, it may be something interesting, but under Arch the program did not start. Running Hiri with env LIBGL_DEBUG = verbose showed that she didn’t like my versions of the Arch libraries.

Since I only needed to “look at it” and just recently picked Docker, I decided to try a little Docker on the topic of launching GUI applications. As a result, it can be considered that everything worked out for me, although there is still a cant - Hiri does not display pictures in letters. I think some QT is missing in the container.
')
And so, first you need to create a Dockerfile file in which we will write:

FROM debian RUN apt-get update && apt-get install -y sudo wget libxcursor1 libxss1 libasound2 libxcomposite1 libxtst6 libxaw7 libxft2 \ libxcb-keysyms1 \ libxcb-image0 \ libxcb-shm0 \ libxcb-icccm4 \ libxcb-sync1 \ libxcb-xfixes0 \ libxcb-shape0 \ libxcb-randr0 \ libxcb-render-util0 \ libfontconfig1 \ libfreetype6 \ libx11-6 \ libxext6 \ libxfixes3 \ libxi6 \ libxrender1 \ libxcb1 \ libx11-xcb1 \ libxcb-glx0 \ xauth \ libglu1-mesa \ libxkbcommon0 \ libxcb-xkb1 \ libxslt1.1 \ libgstreamer-plugins-base0.10 # Set timezone RUN echo "Asia/Novosibirsk" > /etc/timezone # Replace 1000 with your user / group id RUN export uid=1000 gid=1000 && \ mkdir -p /home/user && \ echo "user:x:${uid}:${gid}:User,,,:/home/user:/bin/bash" >> /etc/passwd && \ echo "user:x:${uid}:" >> /etc/group && \ echo "user ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/user && \ chmod 0440 /etc/sudoers.d/user && \ chown ${uid}:${gid} -R /home/user # Install Hiri RUN wget https://feedback.hiri.com/downloads/Hiri.tar.gz -O /tmp/Hiri.tar.gz --progress=dot:giga && \ cd /opt/ && \ tar oxf /tmp/Hiri.tar.gz && \ rm -f /tmp/Hiri.tar.gz && \ chmod -R go-w hiri USER user ENV HOME /home/user WORKDIR /home/user CMD /opt/hiri/hiri.sh 

It is necessary to replace the Asia / Novosibirsk timezone with a suitable one. If this is not done, the calendar will show the time incorrectly, despite the setting of the timezone in the profile.

Now in the directory with Dockerfile run the command

 docker build -t hiri . 

This will create an image called hiri. Now create a working container named hiri from this image:

 docker run -ti -e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix --name=hiri hiri 

The container will be created and Hiri will start immediately. When you exit Hiri, you can launch the container using the command

 docker start hiri 

Attention! To restart, do not run docker run again! In this case, you will receive the original configuration without personal settings.

In order not to do your own work on creating a container, you can immediately download it and run it with docker-hub:

 docker run -e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix --name=hiri ktak007/hiri 

In general, Hiri seemed like a pretty program, but to start using, I didn’t have enough opportunity to connect Google calendars.

Source: https://habr.com/ru/post/402781/


All Articles