Installing Octave on raspberry pi - linux

I'm using Linux Debian on Raspberry PI and have installed Octave. Here is Octave startup :
pi#pi1 ~ $ octave
octave: X11 DISPLAY environment variable not set
octave: disabling GUI features
GNU Octave, version 4.0.0
Copyright (C) 2015 John W. Eaton and others.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. For details, type 'warranty'.
Octave was configured for "arm-unknown-linux-gnueabihf".
Additional information about Octave is available at http://www.octave.org.
Please contribute if you find this software useful.
For more information, visit http://www.octave.org/get-involved.html
Read http://www.octave.org/bugs.html to learn how to submit bug reports.
For information about changes from previous versions, type 'news'.
When attempt to run Octave GUI such as :
plot(3,3) the output is displayed on command line :
Message "octave: disabling GUI features" (as part of startup output above) indicates cannot use GUI features.
What version of Linux should I install on PI and version of Octave in order to GUI plot such as :

As I can guess from your first screenshot, you are using putty from a windows machine to ssh into your raspberry pi. You have to enable X11 forwarding in Putty (Connections->SSH->X11) and install a X11 server on the windows side like Xming (http://sourceforge.net/projects/xming/). Or the easiest way: Plug a monitor to your RaspberryPI and use GNU/Linux and Octave directly.

Connect a screen and execute command
startx
to start X server, then open a terminal and try installing from the terminal. If you don't have a screen then do X11 forwarding as mentioned by #Andy.

Related

How to open a VS Code IDE from Linux subsystem on Windows?

I'm running a Linux subsystem with an Ubuntu terminal inside Windows 10 - I wanted to make use of the functionalities of both operating systems without partitions or virtual machines.
In an Ubuntu terminal on Linux, I use the command 'code .' to open up the VS Code IDE but it doesn't seem to work when the terminal is part of a subsystem on Windows.
I can open up the IDE from Windows 10 and set my path into the Linux system but I remember reading some guidance that it's okay to save files from the Linux onto the Windows side but not vice versa.
Any solutions are much appreciated, thanks in advance!
If you wish to invoke windows binaries from WSL (Windows Subsystem for Linux) like for the example you want to run visual-studio-code, you can do so by setting your visual-code's installation directory into your %PATH% system variable and invoking it using this way
$ [application-name].exe notice the .exe is important.
And this interoperability is added in the Fall Creator Update of windows.
You can follow this documentation from Microsoft for more help.

Raspberry PI remote debug GTK error

I'm using NetBeans IDE 8.0.2 on my Win7 machine to develop Raspberry Pi opencv C++ application.
I'm building & debugging the application remotely on the Raspberry Pi from my Win7 machine.
At run time the application fails with "Gtk-WARNING **: cannot open display:" error when reaches the line:
imshow("source", src);
When I'm running the exact same application from the Raspberry Pi and not remotely via SSH everything works as expected.
Is there any way that I can configure NetBeans to open GTK windows at the Raspberry Pi?
The solution is to add DISPLAY=:0 Environment variable.
At File menu select Project Properties (yourprojectname) to open Project Properties window.
At Categories: click Run and then click Environment, add variable name DISPLAY with value :0
Good luck
I haven't actually tried this with the Rasberry Pi, but assuming it is like other linux systems perhaps this will get you started.
To have the Gtk program display on your windows system will need a version of X Windows ( the linux/unix graphics server) for Windows the operating system. You can get it as one of the packages in Cygwin. (http://x.cygwin.com/) Get cygwin https://cygwin.com/index.html during setup select the xinit package. You also either need to enable port-forwarding in ssh or set the DISPLAY variable on the Rasberry Pi to your windows host:0.
To have the Gtk program display on the Rasberry Pi when started from Windows you just need to allow remote hosts to open windows.
Try the command :
xhost +
in the Rasberry Pi shell before trying to have the program started from windows.
Another option would be to start the program on the Rasberry Pi with gdbserver and then attach to the already running program with Netbeans.
You will need to install the gdbserver plugin for Netbeans.
An alternative to getting the X window manager working on Windows would be to get a remote desktop running on both machines. VNC is a popular client and server for this. This would allow you to run the window for Netbeans and use the system as if it were your desktop from another location.
There is even a download specifically for Raspberry pi here:
https://www.realvnc.com/download/vnc/latest/

Black Console after automated Debian UEFI install

I try to build a reproducible automated build environment based on Debian 8.1 Jessie.
I created a boot iso image based on a netinstall image and put a preseed.cfg file in int for automatic installation.
I managed to get it bootable with BIOS and UEFI and can install a KDE Developer Debian in VMWare Workstation 11 fully automated.
I have also a server iso image to install a debian Server with Jenkins, both with BIOS and UEFI Boot.
But after the installation, the Version with UEFI Boot shows a black Screen when started.
I can blindly log in, start the gui with "startx" and see my installed xfce desktop. When i quit xfce the console is usable and visible.
I tried suggested bootparameters "nomodeset" and "vga=Linux" that i found with google to no avail.
I also tried to debug the boot prozess, to find out which command leads to a blank screen, but i did not find the right place to delay the processes at bootup so i can see when the messages dissapear (quiet bootparameter was removed :-)
I also tried to reset the console to no avail.
Can anybode point me to a tool that does the same "switching" like X so the console is useable?
Can anybody give me some hints how to debug the bootprocess to find out which command is causing this behaviour?
I dont want to install X because this should be a headless server system later.
I managed to get my system to boot using the kernel command line modprobe.blacklist=vmwgfx, or placing 'blacklist vmwgfx' in /etc/modprobe.d/*.conf
I assume it is some bug in the vmwgfx module, however as this workaround works for me I have no immediate need to investigate further.

how to run Emacs when SSH-ing from Linux to Mac OS X (with XForwarding)?

At work I get a choice of two laptops to use, Windows or Mac. Being a linux guy, I thought the MacBook Pro will be a good fit.
So I bring the MacBook Pro laptop home, and realize it doesn't have a right-ctrl key. And the bottom panel is annoying as hell. So I say, no problem, I'll sort all that out later, for now I'll use it as a server and remotely ssh into it from my crispy Xfce workstation environment. Well...
I've spent about a day trying to figure out:
How to ssh into the mac from my Fedora workstation, run emacs and have it show up (XForwarded) on my linux workstation ? You know like this:
I've installed XQuartz and changed /etc/sshd_config and /private/etc/sshd_config with:
X11Forwarding yes
XAuthLocation /opt/X11/bin/xauth
Mind you, xeyes works, and so does xclock, yay !!!
Apparently X forwarding is working okay, since other gui apps are showing up remotely. But as for Emacs, foggetaboutit.
The default Emacs from /usr/bin/emacs just runs it in -nw mode. Then I've installed the latest Emacs 24.3 (into /Applications/Emacs.app/Contents/MacOS/Emacs). This time, if I'm physically logged into the laptop (i.e. from the laptop keyboard) running Emacs from ssh shows up on the laptop's screen !!! WTF? If I logout of the laptop, then I get:
_RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL.
I'm at my wits ends. Any ideas why other X apps work? Anything special about Emacs?
The Emacs.app binary is built to use Mac OS X's window system (we call it "ns" around here), which has nothing to do with X11, so you can't forward it over the network to another host. Instead, you want to install another Emacs on your Mac, which is built to use the X11 window system (so you can use it locally via Xquartz (which lets X11 clients use the native Mac OS X display), or you can use it remotely like any other X11 client).
The easiest way is probably to built it yourself: get the emacs-24.3.tar.gz source code and compile it with ./configure --with-x; make.
With Mac Ports x11 or gtk variant has to be selected, like this:
sudo port install emacs +x11
or that:
sudo port install emacs +gtk

Remote IDE on Red Hat Enterprise Linux Server release 5.5

I have this version of Linux server:
-bash-3.2$ cat /proc/version
Linux version 2.6.18-194.11.1.el5 (mockbuild#hs20-bc2-3.build.redhat.com) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)) #1 SMP Tue Jul 27 05:45:06 EDT 2010
-bash-3.2$ cat /etc/*release*
cat: /etc/lsb-release.d: Is a directory
Red Hat Enterprise Linux Server release 5.5 (Tikanga)
Currently, I am writing c program on the Linux side, I will need the server power to execute my program. I prefer IDE, but since my machine is Windows and what not, I have to compile the program remotely on the server. Sometimes, it's such a pain that I cannot run a stacktrace after the program crashes. And the thing is I want is to achieve higher productivity.
I can only access this server with PuTTY or the like, and I do not have the rights to install any software. And updating the software in the server is also not possible.
I see that the server got programs like Matlab that can output to XMing on the client side. (Ex. I can run Matlab as a GUI from the server side and have it display on my client device)
I see that some people suggest me for Eclipse, but the IDE is way too slow. In fact, it lowers productivity.
So is there any recommendation or a scheme that will allow me to compile, execute and debug my program remotely on the server with better ease-of-use, given the bold criteria above?
You cannot install as root, but maybe you can manually install applications in your user directory? With that and X11 forwarding you should be set (except a bit of latency).
Also, if you have gdb on the remote (which you probably do since you also have the compiler) you can see stack traces with it after enabling core dumps (ulimit -c unlimited), by opening the binary and the core file: gdb -c , then bt.

Resources