3

After ssh -Y [email protected], is it possible to run gnuplot and open the output picture on local machine? Here is what I get now:

$ echo $TERM
xterm-256color
$ echo $DISPLAY

$ gnuplot

        G N U P L O T
        Version 4.6 patchlevel 4    last modified 2013-10-02
        Build System: Linux x86_64

        Copyright (C) 1986-1993, 1998, 2004, 2007-2013
        Thomas Williams, Colin Kelley and many others

        gnuplot home:     http://www.gnuplot.info
        faq, bugs, etc:   type "help FAQ"
        immediate help:   type "help"  (plot window: hit 'h')

Terminal type set to 'unknown'
gnuplot> plot sin(x)
gnuplot>

Nothing appears. If I set terminal png, I did get something back but not in a opened window as a picture:

gnuplot> set terminal png
Terminal type set to 'png'
Options are 'nocrop font "/usr/share/fonts/truetype/liberation/LiberationSans-Regular.ttf,12" fontscale 1.0 size 640,480 '
gnuplot> plot sin(x)
▒PNG

IHDR▒,▒2PLTE▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒@▒▒Ai▒▒▒ ▒@▒▒▒0`▒▒@▒▒▒▒▒ԥ**▒▒@▒▒333MMMfff▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒22▒▒▒▒U▒▒▒▒▒݂▒▒▒▒▒▒▒▒▒d▒"▒".▒W▒▒p▒͇▒▒▒▒▒▒▒▒▒▒▒P▒▒▒▒E▒▒r▒z▒挽▒k▒▒
                                                                      ▒▒ܠ▒ ▒▒▒▒▒ݠݐP@Uk/▒▒▒@▒@▒▒`▒▒`▒▒▒▒▒@

output of ssh: (I changed some of the content just because of the privacy policy)

$ ssh -Y [email protected]
WARNING : Unauthorized access to this system is forbidden and will be
prosecuted by law. By accessing this system, you agree that your actions
may be monitored if unauthorized usage is suspected.

   ***DO NOT RUN RESOURCE-INTENSIVE PROCESSES ON THE SHELL SERVERS***
foo@bar's password:
=======================================================

Linux vm-bar.com 3.13.0-61-generic #100-Ubuntu SMP Wed Jul 29 11:21:34 UTC 2015 x86_64
Last login: Wed Oct 28 19:33:23 2015 from **.**.**.**
$
wlnirvana
  • 524
  • 2
  • 6
  • 12
  • Post what do the `ssh -Y [email protected]` print after authentication. The X11 forwarding probably failed, since you don't have `$DISPLAY` variable. – Jakuje Oct 28 '15 at 19:43
  • @Jakuje see above – wlnirvana Oct 28 '15 at 19:50
  • so no failure? One basic question. Do you have Xorg installed on the remote system? – Jakuje Oct 28 '15 at 20:42
  • ^^^ +1, you will also need gnuplot-x11 to be installed rather than plain gnuplot I think; then you can run `show term` from the gnuplot command line to see if it's actually set to a GUI output type; `set term` should list the available types (look for the `x11` or `wx` terms) – steeldriver Oct 28 '15 at 21:07
  • It turns out that xorg is not installed on my local cygwin. I just reboot to my linux and `$DISPLAY` is `vm-bar.com:12.0`. Although I can start `gvim` now, `gnuplot` still says terminal unknow. `set term` has no `x11` or `wx` or `qt` option. I suppose that might be the problem? – wlnirvana Oct 28 '15 at 21:40

0 Answers0