If it still fails after you've set "root_url" to the correct value in grafana.ini, you might want to check whether you can run phantomjs from the command line.
If you get "QXcbConnection: Could not connect to display / PhantomJS has crashed", then the explanation is here: Debian Bug #817277
To fix it, I installed xvfb (apt-get install xvfb
), and edited /usr/bin/phantomjs
so that the last line now looks like this:
exec "/usr/bin/xvfb-run" --server-args="-screen 0 640x480x16" "/usr/lib/phantomjs/phantomjs" "$@"
The solution described here
works for me.
I did the following on the internal host where Grafana is installed:
- Configured Apache (on port 80) as reverse proxy to Grafana (on port 3000)
- Setup the virtualhost to add/set the required headers to login automatically as user admin
Relevant section from /etc/grafana/grafana.ini:
enabled = true
;header_name = X-WEBAUTH-USER
;header_property = username
auto_sign_up = false
Apache config extract (you will need to enable mod_proxy, mod_proxy_http and mod_headers for this to work):
ProxyPass / http://localhost:3000/
ProxyPassReverse / http://localhost:3000/
RequestHeader set "X-WEBAUTH-USER" "admin"
On a separate Apache instance exposed to more networks I did the following:
- Configured Apache as reverse proxy to the internal instance
- Restricted access from specific IP addresses
- Setup a rule to redirect requests to the root of the website (and only those) to a specific dashboard
This is how the Apache config looks like (requires mod_proxy, mod_proxy_http and mod_alias; IP addresses, host names etc. changed)
Require ip 192.0.2.0/24
Require ip 203.0.113.0/24
Require ip 2001:0db8:85a4::/64
Require ip 2001:0db8:85a5::/64
RedirectMatch ^/$ /dashboard/db/mydashboard
ProxyPass / http://[2001:0db8:85a3::aaaa:8a2e:0370:7334]/
ProxyPassReverse / http://[2001:0db8:85a3::aaaa:8a2e:0370:7334]/
Using a public IPv6 address on the internal host allows the whole thing to work with just a few firewall rules, without the need to mess with NAT or a VPN.
Somehow, most of the time my Arduino-based EggBot clone
outputs one byte of undetermined garbage before saying "Ready". This caused gcode-sender.rb to fail with "invalid byte sequence in UTF-8 (ArgumentError)".
Eventually I found the solution in a post by Wayne Brissette here: https://www.ruby-forum.com/topic/4409620
. Basically you need to treat the string as binary instead of utf-8. This small change in the code that waits for the robot to be ready fixed the issue for me:
@@ -30,7 +30,7 @@
sp.read_timeout = 0 # Necessary for Windows.
while line = sp.gets
- break if line.match(/^Ready/)
+ break if line.force_encoding("BINARY").match(/^.?Ready/)
File.foreach(filename) do |line|
Recent changes introduced with iOS 10 prevent you from mounting an iPhone on a regular Ubuntu installation.
The PPA by Martin Salbaba used to fix the issue
, but it hasn't been updated in a while, and now when I connect my iPhone (running iOS 10.2.1) the pictures are no longer accessible, although the documents are still there.
This solution worked for me (Ubuntu 16.04):
- install libimobiledevice6 + dependencies from this PPA: https://launchpad.net/~martin-salbaba/+archive/ubuntu/ppa+libimobiledevice
(follow the instructions there)
- install newer libimobiledevice version according to the "recipe" by A.B. here: http://askubuntu.com/questions/598940/libimobiledevice-1-2-ios-8-support-for-ubuntu-14-04-trusty
- install ifuse according to the same method:
git clone https://github.com/libimobiledevice/ifuse.git
sudo apt-get install libfuse2 libfuse-dev
You can now mount your iPhone like this:
I assume the same procedure would work for an iPad too.