April 6, 2013 at 05:28
In some systems (here, it was 64-bit Matlab on 64-bit Ubuntu 12.10) you may find an error about the version of libstdc++ being wrong. E.g. when using the system() or unix() commands.
Here’s what worked for me.
1) cd /usr/local/MATLAB/R2013a/sys/os/glnxa64
2) sudo mkdir obsolete
3) sudo mv libstdc* obsolete/
4) sudo ln -s /usr/lib/x86_64-linux-gnu/libstdc* ./
The specific error this fixed for me was calling gnucap from Matlab. I would get the error:
gnucap: /usr/local/MATLAB/R2013a/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.15′ not found (required by gnucap)
when running in Matlab
unix('gnucap -b foo.net')
or
system('gnucap -b foo.net')
By mhirsch
|
Posted in Linux, MATLAB / Octave
|
Tagged 64-bit
|
March 27, 2013 at 23:36
To access a Windows PC from Linux, some use port forwarding from an OpenSSH or other SSH server running as a service on the Windows PC, with RDP on port 3389 blocked by the Windows Firewall. SSH is used with port forwarding to get to RDP.
Trouble is, when connecting to multiple Windows PCs this way, the current version of xfreerdp will give this error, since you make the xfreerdp connection to localhost:
The host key for localhost has changed
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
While you must consider the security implications of this option for yourself, you can include the --ignore-certificate option in the xfreerdp command to bypass this error message.
Since your SSH connection should be already checked for man in the middle, it seems that unless your Windows PC is already hacked, the man-in-the-middle check may be somewhat less likely to be needed–but you must make this evaluation yourself.
Here’s what an example script would like look. Assume our windows PC public IPv4 address is 1.2.3.4, and has a Cygwin-based OpenSSH server running on port 22, with port 3389 blocked by the Windows firewall, and windows username “joe”.
#!/bin/sh
ssh -f -p 22 -L 3389:localhost:3389 joe@1.2.3.4 sleep 1;
xfreerdp -t 3389 -u joe --ignore-certificate localhost
By mhirsch
|
Posted in Computer Tips
|
March 22, 2013 at 02:07
This annoying error may be fixed in Cygwin by typing:
mkdir /usr/share/fonts/TTF
ln -s /cygdrive/c/Windows/Fonts/Arial.ttf /usr/share/fonts/TTF/Arial.ttf
By mhirsch
|
Posted in Cygwin
|
March 22, 2013 at 00:40
For those installations behind a firewall, here are the ports you need to forward (say, via SSH) to use Intel AMT KVM:
5900
16992
16994
Tested with Intel AMT version 8
If you use TLS, you may need to forward additional ports.
In any case, before making a major system decision, do your homework.
Reference:
http://software.intel.com/sites/manageability/AMT_Implementation_and_Reference_Guide/DOCS/Implementation%20and%20Reference%20Guide/default.htm?turl=WordDocuments%2Fmanageabilityports.htm
By mhirsch
|
Posted in Computer Tips
|
Tagged vPro
|
March 19, 2013 at 08:52
Thankfully, Matlab R2013a Student version is now 64-bit in Linux. The install is also more straightforward on a 64-bit Linux system, since it appears the special 32-64 bit libraries may not be required anymore.
Just purchase R2013a student version as usual, download the installer saying “I have JRE”, and type:
javaws download_agent
Tell it to create the shortcuts in /usr/local/bin when asked (check the checkbox)
When done, do:
sudo nano /usr/share/applications/matlab2013.desktop
and paste the following:
#!/usr/bin/env xdg-open
[Desktop Entry]
Type=Application
Icon=/usr/share/icons/matlab.png
Name=MATLAB R2013a
Comment= MATLAB - The Language of Technical Computing
Exec=matlab -desktop %U
Categories=Development;
By mhirsch
|
Posted in Linux, MATLAB / Octave
|
March 5, 2013 at 01:20
In Matlab, it is possible to read specific frame(s) from a FITS file.
That is, you can read frames one at a time from a large multi-frame FITS file in MATLAB.
Here’s an example that reads each frame of a 4096-frame FITS file, with each frame being 256×256 pixels
for i = 1:4096
currFrame = fitsread('myFile.fits','PixelRegion',{[1 256],[1 256],i);
imagesc(currFrame)
pause(0.05)
end
By mhirsch
|
Posted in MATLAB / Octave
|
Tagged FITS
|
March 3, 2013 at 22:50
Just a simple reminder (and easy to use).
To search your home directory and all subdirectories for a certain type of file, let’s say you’re searching for all MATLAB scripts (*.m) modified within last 60 days. Type in Terminal:
find ~ -name '*.m' -type f -mtime -60
By mhirsch
|
Posted in Computer Tips, Linux
|
February 13, 2013 at 21:29
To make OpenBox start when you type ‘startx’ in Cygwin, in Cygwin (one-time) type:
echo “exec openbox” > ~/.xinitrc
Reference:
http://blog.mattandanne.org/2012/02/cygwinx-with-openbox.html
By mhirsch
|
Posted in Linux
|
Tagged Cygwin
|
February 13, 2013 at 21:27
Upon freshly downloading and extracting FIJI for Windows 7 64-bit, I found that typing at the Command Prompt:
ImageJ-Win64.exe
would do nothing.
I found that typing (once)
ImageJ-Win64 –cp jars/javac.jar
fixed the problem–thereafter, I could just click on ImageJ-Win64 to start.
Reference:
https://groups.google.com/forum/?fromgroups=#!topic/fiji-users/1yNPbNM13l4
By mhirsch
|
Posted in Computer Tips, Windows 7 x64
|
Tagged ImageJ
|
February 8, 2013 at 15:49
I sometimes access an enterprise Windows system that always makes its network “cloud” files accessible via sshfs.
I don’t know the details of this server system, and one day I was in the field and needed my networked files in the cloud badly, but couldn’t SSHFS mount via the head end server from any computer via VPN, or even back in the office (LAN).
I also couldn’t ssh into the main head end server, but I could ssh into the individual cluster units. I could not sshfs mount from those cluster units, but I COULD see my files via ssh.
I found two ways of copying my files to my local PC:
(1) using a Windows guest virtual machine, I was able to mount the windows side of the network share (that I can typically always mount via sshfs)
(2) I could sftp and scp from one of the cluster nodes (not the head end node, since I couldn’t get in via ssh).
Probably a weird, incorrect workaround–but it got me my badly needed files in a pinch.
By mhirsch
|
Posted in Computer Tips
|