When attempting to plot graphs in python 2.7 using matplotlib or Octave the program stalls and needs to be closed. Octave gives the following errors on startup:
No protocol specified octave: unable to open X11 DISPLAY octave: disabling GUI features No protocol specified
If I run plot(x,y) the program stalls and on pressing Ctrl-C the following appears.
gnuplot: unable to open display ':0' gnuplot: X11 aborted.
I have tried many online suggestions such as setting X11Forwarding to yes (which it already was), and running startx which leaves me with a blank screen with a cross cursor and changing DISPLAY to numerous things, among others.
UPDATE: When I run xinit I get the following:
(EE) Fatal server error: (EE) Server is already active for display 0 If this server is no longer running, remove /tmp/.X0-lock and start again. (EE) (EE) Please consult the The X.Org Foundation support at http://wiki.x.org for help. (EE) XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":0" after 7 requests (7 known processed) with 0 events remaining.
Not sure why I would need this or if it helps. Also in octave if I run 'setenv("DISPLAY")' then try to run a plot it still stalls but on canceling the terminal shows a blank screen with the forward, back and quit commands.
This is a new system and haven't had these problems with octave or python before.
OS: Ubuntu 16.10 Processor: AMD A10-8700P Radeon R6