Feeds:
Posts
Comments

MATLAB R2008b on Linux

If after installing Matlab on Linux you are experiencing troubles like

Unable to initialize com.mathworks.mwswing.MJStartupFatal Error on startup: Failure loading desktop class

or

… Java is not currently available

 

Here is the way I resolved the issue on my Debian Lenny :

 

I installed the JDK from the Oracle’s download page (following the instructions). I chose the directory  /usr/lib/jvm/ for the installation.

Then I created a symbolic link for Motif (as root) :

ln -s /usr/lib/jvm/jdk1.6.0_24/jre/lib/i386/motif21/ /usr/lib/jvm/jdk1.6.0_2/jre/lib/i386/motif12

And finally I set the environment variables :

export MATLAB_JAVA=/usr/lib/jvm/jdk1.6.0_24/jre/

export AWT_TOOLKIT=MToolkit

That’s all. Now I am able to launch Matlab :

<matlab_directory>/bin/matlab

Published the new version of my Console Disk Cataloguer in bash-script: cataloguer2.8

Almost the same functionality but a little refactorized and bug-fixed.

Any feedback will be wellcomed.

dclip

dclip is a lightweight clipboard manager that uses dmenu as frontend to show the stored selections and depends on xclip. It tries to unify the mess with different X selections.

I recommend nibble’s fork of dmenu that fixes a problem showing big selections:
$ hg clone http://nibble.develsec.org/hg/dmenu_nibble/

You can easily adapt dclip to your system by creating keybinds to its ‘copy’ and ‘paste’ commands.

For example in dwm, in order to copy with M+C+c and paste with M+C+v  you can add the following in your config.h:

/* commands */
static const char *dclipcmd[] = { "dclip", "paste", "-fn", font, "-nb", normbgcolor, "-nf", normfgcolor, "-s    b", selbgcolor , "-sf", selfgcolor, NULL };

and in the keys[] section:

{ MODKEY|ControlMask,       XK_c,           spawn,          SHCMD("exec dclip copy") },
{ MODKEY|ControlMask,       XK_v,           spawn,          {.v = dclipcmd } },

Hope you will enjoy it.

Imagine that you would like to save the videos on a YouTube playlist into a CD.
This tmpmedia_rec.sh script might help you.
You can use it with any flash player that’s create temporary files like /tmp/Flash*

Run the script while playing your media. Few seconds after each fully-loaded song/video you will listen a beep indicating that the file has been saved, in that moment you can “jump” to next media.

As an example, for a YouTube playlist called “funny” you can run the script like:

$ tmpmedia_rec.sh funny flv

and the files will be saved in the destination directory as: funny_<number>.flv

You can configure the script parameters at first lines of it.

Here it’s the last version of my Console Disk Cataloguer in bash script.

The best points of this programs in my opinion are:

1. Speed adding new disks (just a tree command and a gzip compression)

2. Size of the catalog file: For example, a catalog with 6 dvd’s stored containing 22500 files distributed in 2608 directories has a size of 290K

3. Portability of the generated catalogs. Independence of them from the cataloguer (plain text file browseable with any text editor)

And, of course, that it’s free software.

The options of this cataloguer are the following:

tecnoprawn@blog:~$ cataloguer
Usage: cataloguer </path/to/catalog.gz> <option> [parametes_of_the_option]
OPTIONS
Disk:
    -a <path/to/disk> <disk_name>       Adds a new disk to the catalog
    -d <disk_name>                      Deletes a disk
    -i <disk_name>                      Shows disk information (number of files and
                                        directories, size)
    -c <disk_name>                      Lists the content of the disk
    -r <old_name> <new_name>            Renames the disk
Catalog:
    -L                                  Lists all disks in the catalog
Search:
    -f <name>                           Find files and directories
    -F <name>                           Find only directories
cataloguer -?                           Prints this help

Any comment, patch or bug report will be apreciated.

Althought it has been tested on Debian (Lenny), many of this features, specially the kernel-related topics, should work in other GNU/Linux distributions.

Contents:

    0. Kernel
       0.1. Needed Kernel Modules
       0.2. Configuration
    1. CPU Frequency Scaling
    2. Suspend to RAM
    3. Suspend to Disk
    4. Acpi Events: Power & Sleep buttons
    5. Multimedia Keys
    6. Xorg.conf
       6.1. Synaptics Touchpad
       6.2. 1280x800 Resolution
       6.3. DRI (Direct Rendering Interface)
    7. Wireless Card (ipw2200)
    8. Saving Power/Battery
    9. External VGA
   10. Other Issues (PCMCIA, Wired LAN Card, Modem, Card Reader)
   11. Known Problems
      11.1. Fan
      11.2. Fn-keys Pictograms 
      11.3. Button Lid
   12. lspci -vvnn

Continue Reading »

In this article I will talk about how to manage a little MarkIII mobile robot using a GNU/Linux system.

PROGRAMMING. JAL

To program the robot we will use JAL (Just Another Language), a totally free high-level programming language, including its free-software compiler, that can be used with some PIC microcontroller of Microchip(TM), like the 16F877 in Mark-III robot.

Continue Reading »

This has been tested with a HP48G+ calculator and a laptop running Debian Lenny, but with few modifications it can be applied to other calculators and GNU/Linux distributions.

As laptop computers don’t have RS232 serial port we must buy an adapter USB-RS232_DE9. I have bought a Digitus© one for 17 Euros (a little bit expensive in my opinion).

For me, it has been also necessary to build a connection cable because my second-hand calculator haven’t had one.
Continue Reading »

Follow

Get every new post delivered to your Inbox.