问题
I am having trouble getting Rails autotest notifications to work on the Engine Yard Vagrant environment. On the Mac, I normally get the notifications via Growl. However, on the virtual environment (which runs Ubuntu) that doesn't work.
I tried running Linux notification setups such as libnotify+autotest-notification, but I get the following error:
libnotify-Message: Unable to get session bus: /bin/dbus-launch terminated abnormally with the following error: Autolaunch error: X11 initialization failed.
** (notify-send:1004): CRITICAL **: dbus_g_proxy_connect_signal: assertion `DBUS_IS_G_PROXY (proxy)' failed
** (notify-send:1004): CRITICAL **: dbus_g_proxy_connect_signal: assertion `DBUS_IS_G_PROXY (proxy)' failed
** (notify-send:1004): CRITICAL **: dbus_g_proxy_call: assertion `DBUS_IS_G_PROXY (proxy)' failed
Another path would be to have Growl receive the notifications remotely, but I don't even know where to begin with that...
Any suggestions?
回答1:
The web server won't have access to the desktop for notifications. This is generally a good thing, for security reasons.
In the Growl installer dmg
is a program growlnotify
, which can be tweaked into building on most Posix-ish systems and can send remote notifications. You will also have to configure Growl to receive remote notifications (System Prefeences > Other > Growl > Network).
来源:https://stackoverflow.com/questions/5286120/autotest-notifications-on-ubuntu-virtual-environment