Installing Matlab on Archlinux

Download the Linux package from Mathworks.

  1. Before installing I’ve checked the Archlinux wiki:

https://wiki.archlinux.org/index.php/MATLAB

2. Just trying to execute the install script I was getting this error:

terminate called after throwing an instance of 'std::runtime_error'
  what():  Unable to launch the MATLABWindow application

3. I decided to install Matlab using the AUR package:

https://aur.archlinux.org/packages/matlab#comment-735882

4. Installed all dependencies from the AUR package

5. Still some problems…. So checking the comments from the AUR package, I found this comment:

While trying to install r2020a I had this error after executing ./install:

terminate called after throwing an instance of 'std::runtime_error'
  what():  Unable to launch the MATLABWindow application

I solved this by installing libselinux (in AUR).

For the record: I found the missing dependency by executing ./bin/glnxa64/MATLABWindow.

Besides, it works without gtk2 (perhaps it now depends on gtk3).

https://aur.archlinux.org/packages/matlab#comment-735882

6. After installing libselinux I could execute the install script.

Advertisement

Copying local files and folders with rsync

To copy the contents of one local folder into another, replacing the files in the destination folder. The parameter -a also makes the copy recursive and preserve the modification times, but additionally it copies the symlinks that it encounters as symlinks, preserve the permissions, preserve the owner and group information, and preserve device and special files. This is useful if you are copying the entire home folder of a user, or if you are copying system folders somewhere else.

rsync -rtav source/ destination/

From jveweb.net

#1 CD Command Hacks – Linux Hacks Series

CDPATH

Use CDPATH to define the base directory for command

$export CDPATH=~:/etc:/proc
$cd systemd
$pwd
/etc/systemd
From the book “Linux 101 Hackers”, Ramesh Natarajan.
MKDIR and CD in one shot

Add this function to your bash_profile

$vim .bash_profile 
function mkdircd () { mkdir -p "$@" && eval cd "\"\$$#\""; }
From the book “Linux 101 Hackers”, Ramesh Natarajan.

Toggle between the last two directories

$cd -

will bring you to the previous path you were. If you use it again, you are back in path you were the first.

From the book “Linux 101 Hackers”, Ramesh Natarajan.
Using the directory stack

You can use the directory stack to store directory paths, display and cd to it.

  • dirs: Display the directory stack
  • pushd: Push directory into the stack
  • popd: Pop directory fom the stack and cd to it
From the book “Linux 101 Hackers”, Ramesh Natarajan.

For more examples visit the blog of the geekstuff 

 

Could not load host key: /etc/ssh_host_ecdsa_key

I was getting this error in a Archlinux ARM fresh installation (Hummingboard).

I had already generated all the key, I thought:

chmod 700 ~/.ssh
ssh-keygen -t rsa
ssh-keygen -A

Then I was restarting the ssh server and nothing… still the same problem.

Apparently since 5.7, openssh supports RFC5656 and  sshd tries to load these keys by default. I have just generated the missing keys by hand:

  ssh-keygen -t ecdsa -f /etc/ssh_host_X_key -N ''

and ssh could start without problems.

Reference:

https://cygwin.com/ml/cygwin/2011-02/msg00144.html

The art of Searching in Mutt

I usually start searching/select in mutt using search “/”, “tag-pattern” “T” or limit view “l” commands, you can specify one or more patterns to make the commands apply to only desired matches.

These commands allow you to specify a pattern to match :

  • ~b – Search in the message body.
  • ~B – Search in the whole message.
  • ~f – Message originated from the USER
  • ~t  – Messages addressed to USER
  • ~Q – Messages which have been replied to.
  • ~s – Messages having SUBJECT
  • ~d – Messages in a Data range MIN-MAX  (e.g ~d <1w)
  • ~d – Messages tagged (fixme)

You need Pattern Modifier or Complex Patters, hier

Logical AND is performed by specifying more than one criterion

  • ! — logical NOT operator
  • | — logical OR operator
  • () — logical grouping operator

The search is case sensitive if the pattern contains at least one upper case letter, and case insensitive otherwise.

Sources:

http://www.mutt.org/doc/manual/

http://www.mutt.org/doc/manual/manual-4.html#ss4.2

http://www.rosipov.com/blog/effective-search-with-mutt/

https://www.gl.ciw.edu/static/users/rcohen/mutt/manual-6.html#ss6.1

http://superuser.com/questions/1013639/how-can-i-display-all-mail-from-one-specific-author-in-mutt

 

 

 

Mutt+LDAP

I use Mutt as email client since years and it works like a charm. When I’m working in a company  I wanted to be able to connect to the corporative address book an get the email address of the people just typing the first letter of the surname. Well, here it goes how I install and configure it:

1) Install lbdb package, and modify the files:

/etc/lbdb.rc

METHODS="m_ldap"
LDAP_NICKS="$NICK"

/etc/lbdb_ldap

%ldap_server_db = ( 
 'gsi' =&gt; ['ldap.server.com:$PORT_NUMBER',
 'cn=users,dc=$NIC,dc=de', 
 'mail cn givenname sn', 
 'mail cn givenname sn',
 '${mail}',
 '${givenname} ${sn}',
 '$NICK-L',
 '1']
);

2) install perl-ldap, nothing to configure.

3) start Mutt, and write the name/surname of the desired person, press CTRL+t  and you’ll a list of the matching email addresses.

Note: no references because I found the solution from more than 4 sources and none were got it right…