title: send notification from virtual machine (docker container) to host machine
body: <br>
  I m trying to make notify-send passing messages to host and create a notification on my desktop from my local-machine. <br>But its not that simple :(.
  <p>My Operation system is Ubuntu and vm machine's Debian.</p>
  <p>I know that containers communicating with &quot;bridge&quot; in docker or via &quot;volume&quot;</p>
  <ol>
  <li>My approche was to install dbus-monitor,libnotify-bin on virtual machine</li>
  <li>Write to file called <code>notofications</code> via demon who intercept notify-send messages.</li>
  <li>Than have some sort of deamon on host machine which &quot;watch&quot; that file and everytime a new line of text is being added to that from virtual machine, deamon triggers launch a command <code>notify-send &quot;that line&quot;</code></li>
  </ol>
  <br>
  Usecase:<br>
  I work with docker container workspace.
  <p>I m developing websites and I found it pretty annoying that when I m &quot;live building&quot; script and it fails I dont get a notification.
  So I wanted to get one with having same environment accross my teamates using <code>ddev</code></p>
  <p>Problem:<br>
  To intercept and write to file I tried to use dbus but:<br>
  my dbus-monitor script:</p>
  <pre><code>#!/bin/bash
  
  file=notifications
  
  dbus-monitor &quot;interface='org.freedesktop.Notifications'&quot; |\
   grep --line-buffered &quot;string&quot; |\
   grep --line-buffered -e method -e &quot;:&quot; -e '&quot;&quot;' -e urgency -e notify -v |\
   grep --line-buffered '.*(?=string)|(?&lt;=string).*' -oPi |\
   grep --line-buffered -v '^\s*$' |\
   xargs -I '{}' echo {} &gt;&gt; $file
  </code></pre>
  <p>seemss not to work without display configuration. And I have no idea how to fix that.</p>
  <pre><code>Failed to open connection to session bus: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
  </code></pre>
  <p>In order to work I need to find solution to somehow &quot;watch&quot;
  <code>notify-send</code> command and intercept the message. Please help :)</p>