/usr/lib/perl5/vendor_perl/5.8.7/i586-linux-thread-multi/Tk # perl /usr/local/nagios/share/nagiosmap.pl
couldn’t connect to display “:0” at /usr/lib/perl5/vendor_perl/5.8.7/i586-linux-thread-multi/Tk/MainWindow.pm line 55.
I have had a look around this forum for how to fix it but no one says how they got it working.
When you connect to remote system using ssh, you have to enable x forwarding. It might be turned off on the ssh server, since some think it’s a security risk.
On sshd server check for
X11Forwarding yes
in the /etc/ssh/sshd_config file.