mylinuxnotes

Wednesday 20090617

Installing ARB in Ubuntu Hardy LTS

Filed under: ARB, bioinformatics, howto, install, ubuntu — Tags: — jeff @ 9:47 pm

How to install ARB on Ubuntu Hardy LTS.  These are my notes of what worked on my system, and depending on what you already have installed, you may have additional requirements.  (Please feel free to make note of your experience in the comments, if you’d like to share!) This is a modified copy from my previous post for installing in Feisty Fawn.

Make sure you have the prerequisite packages installed:

  • transfig
  • xfig
  • xviewg
  • gv
  • libmotif3

Download the latest ARB for linux at www.arb-home.de.  The download directory contains three files; you need to put all of them in the same place: arb_install.sh, arb.tgz and zcat. No need to untar anything.

In the directory where you put these downloads,

$ sudo sh arb_install.sh

The script asks a bunch of installation questions, and it’s pretty self-explanatory about what it’s asking, so go nuts.  I used all the defaults for a stand-alone computer, except I used /opt/arb as the install directory instead of /usr/arb.

When the script exits, it mentions editing something in /etc (but it doesn’t say what).  In Feisty, you need to add the following lines to the /etc/bash.bashrc file (assuming you used /opt/arb as the installation directory like me–otherwise, you may have to replace “opt” below with “usr”):

ARBHOME=/opt/arb;export ARBHOME
LD_LIBRARY_PATH=${ARBHOME}/lib:${LD_LIBRARY_PATH}
export LD_LIBRARY_PATH
PATH=${ARBHOME}/bin:${PATH}
export PATH
alias arb=/opt/arb/bin/arb
echo “This shell is ARB-enabled.”  #Not necessary.  Just for fun.

It now seems to work!  You can delete the installation files.  Or, you can change your current installation by running arb_install.sh again.

Friday 20080314

Howto: Turn “Visual effects” (Compiz) on and off with a simple button

Filed under: compiz, gutsy, ubuntu — jeff @ 7:39 pm

Sometimes (ie when I’m using firefox in full-screen mode) I need to turn off compiz. It’s nice to be able to do it quickly, with a single button. Here’s how:

http://forlong.blogage.de/article/pages/Compiz-Switch

and get the deb package. Install it with dpkg -i.  All done!

Thursday 20080228

Howto: Get Free eBooks Sized Right for the ASUS Eee PC 701

Filed under: Uncategorized — Tags: , , — jeff @ 8:33 pm

There are a lot of good places to get ebooks, like Project Gutenburg, etc, but their formatting is ugly and difficult to read. As far as I can tell, there aren’t any great ebook readers for linux. Also, I have an Eee PC, which has a special size that makes it easy to hold sideways, like a book.  PDF readers, like Acrobat, rotate pages and display them fullscreen, which is nice.  A lot of eBooks are available in custom pdf format at manybooks.net.

Here’s the secret to combining manybooks.net with your Eee PC 701: Find a good book, and for the download format, select “custom pdf” from the pulldown menu. When you hit “download” you’ll get a bunch of options for customizing the output pdf file. I’ve found that these options work really well for me:

Size: 90 x 152 millimeters

Body Font: Times New Roman

Heading Font: Helvetica

Font size: 13 (I like anyway, 11 is definitely too small)

Spacing: 1.5 lines

Margins: set them all to 4 mm

And download!  It’s amazingly fast. Instantaneous on my low-end DSL connection.

Friday 20071026

Dell A920 Printer (aka Lexmark Z600) in Ubuntu Gutsy

Filed under: Dell A920, gutsy, printer — jeff @ 1:51 pm

After a fresh install of Gutsy, I don’t have the correct printer driver for our closed-piece-of-junk Dell A920 “All-In-One” printer (which is actually a Lexmark Z600-something with the dell logo stamped on it). If I remember correctly, in previous Ubuntus I just selected the Lexmark Z600 driver and everything worked fine. Now the driver is not there, and there are no easy point-and-click solutions. So, I googled the problem and found about twenty slightly different variants of the same solution. Many of them did not work in Gutsy, but this one did. This was my experience:

1. Installed alien (will need it to convert the .rpm drivers)

$ sudo aptitude install alien

2. Downloaded Lexmark’s RedHat CJLZ600LE-CUPS-1.0-1.TAR.gz driver for the Z600 series. Made a directory to put the tar.gz file in.

3. Used gksudo to run xterm (so I don’t have to keep typing sudo), and navigated to the directory containing the new file.

4. Ran the script with an option specifying the target directory (for some bizarre reason it doesn’t work if you don’t specify the target; the script made the target directory on its own):

# sh z600cups-1.0-1.gz.sh -target rpms

# cd rpms

# ls

5. Used alien to turn the rpms into debs

# alien z600cups-1.0-1.i386.rpm

# alien z600llpddk-2.0-1.i386.rpm

# ls

6. Installed the debs with dpkg. Note: For some reason the names of the .deb files are slightly different from the names of the rpm files (an underscore instead of a dash, and a 2 instead of a 1 on the end of the version numbers!) This confused me for a second, because I was cut-and-pasting file names from previous commands.

# dpkg -i z600cups_1.0-2.i386.deb

# dpkg -i z600llpddk_2.0-2_i386.deb

7. Done with the terminal, it’s GUI from here on in!! My printer was plugged into the USB port and was recognized by Gutsy as a Dell A920, but no working driver was assigned to it yet. To do this, I clicked on System > Administration > Printing to bring up the Printer configuration window. On the left, there was an item called A920 under Local Printers. Selected the A920 and then clicked the “Change” button to the right of Make and Model. Selected Lexmark, and clicked Forward>; then selected the new Z600 driver that was now available in the list and clicked Forward>; then clicked Forward> again, leaving the Copy settings over option checked, and tada it works! I also clicked the Make Default button to make this my default printer. Printed test page and it worked flawlessly.

I haven’t tried the built-in scanner in Gutsy yet but I’m assuming it will not work. Never has.

Thursday 20071018

LAMP Before Lunch

Filed under: Drupal, LAMP, MediaWiki, howto — jeff @ 3:31 pm

I got a lab server up and running in a couple of hours. Ubuntu is awesome! The functionality includes: LAMP, a Drupal website on the front end, a MediaWiki site for organizing the lab’s SOPs and other documents, and an SSH server so lab members can use linux bioinformatics software remotely, and stream X onto their Windoze and Mac desktops. I’m recording this here because there were a lot of unnecessary or contradictory instructions available online.

All you need: Static IP/domain name assigned (thanks to the department’s IT support), an old otherwise-useless desktop PC (a 400 MHz Dell with 256 Mb memory), and the Ubuntu (Feisty) Desktop CD (I wanted X off the bat, so didn’t use the server CD).

1. Install and update Ubuntu (took ~30 minutes)

2. Install the server software

$ sudo aptitude install apache2 firestarter openssh-server php5-mysql libapache2-mod-php5 mysql-server

3. Set up the firewall

$ sudo firestarter

Use the GUI wizard to set up iptables to allow incoming traffic on ports 22 and 80 (before you run firestarter, ALL of your ports are open by default).

4. Set up mysql to have a root password (don’t forget the semicolon at the end of every line when you are in the mysql> prompt):

$ sudo mysql -u root
mysql> UPDATE mysql.user SET Password=PASSWORD(‘your_new_password‘) WHERE User=’root’;
mysql> FLUSH PRIVILEGES;
mysql> quit

5. Install MediaWiki and Drupal.

$ sudo aptitude install mediawiki drupal-5.1

The installation will take care of all the basic database configuration. You will be asked to provide the install scripts with the mysql administrative password that you just created, and you will also be asked to create some new passwords. The email server will ask you how to set it up. Do as you wish, but personally I left email unconfigured (ie broken). This breaks the email-confirmation features of Drupal and MediaWiki, but it also is a safeguard against unwanted external users having access to an email server. :)

Now you can setup mediawiki at http://localhost/mediawiki and Drupal at http://localhost/drupal

The first thing I did was disable anonymous user account creation in both systems, since we have a small group and it’s okay if an administrator has to set up an account for new people.

Also, when someone visits the URL, at the moment they see an ugly Apache default blank screen. Yuck. To automatically forward visitors to the drupal homepage, create this file:

$ sudo gedit /var/www/index.html

And put the following code into the file:

<html>
<head>
<META http-equiv=“refresh” content=“0; URL=drupal”>
</head>
</html>

Now, when a browser visits http://YOUR.SERVER/ it will be redirected to http://YOUR.SERVER/drupal. And, of-course, if you want someone visiting your site to know how to get to the wiki, you can provide them with a link to http://YOUR.SERVER/mediawiki in your Drupal website.

Configuring and customizing Drupal is cake using your web browser. For MediaWiki, you will have to delve into the LocalSettings.php file (located in the /usr/share/mediawikiX.X directory), unless you’re okay with the default settings.

Tuesday 20070925

howto: install ARB in Ubuntu Feisty

Filed under: ARB, bioinformatics, howto — jeff @ 3:48 pm

Make sure you have the prerequisites (most notably, in Feisty, the libstdc++2.10-glibc2.2 package, which I had to do some digging to figure out):

  • transfig
  • xfig
  • xviewg
  • gv
  • libstdc++2.10-glibc2.2 (in the universe repository)

Download the latest ARB for linux at www.arb-home.de.  The download directory contains three files; you need to put all of them in the same place: arb_install.sh, arb.tgz and zcat. No need to untar anything.

In the directory where you put these downloads,

$ sudo sh arb_install.sh

The script asks a bunch of installation questions, and it’s pretty self-explanatory about what it’s asking, so go nuts.  I used all the defaults for a stand-alone computer, except I used /opt/arb as the install directory instead of /usr/arb.

When the script exits, it mentions editing something in /etc (but it doesn’t say what).  In Feisty, you need to add the following lines to the /etc/bash.bashrc file (assuming you used /opt/arb as the installation directory like me–otherwise, you may have to replace “opt” below with “usr”):

ARBHOME=/opt/arb;export ARBHOME
LD_LIBRARY_PATH=${ARBHOME}/lib:${LD_LIBRARY_PATH}
export LD_LIBRARY_PATH
PATH=${ARBHOME}/bin:${PATH}
export PATH
alias arb=/opt/arb/bin/arb
echo “This shell is ARB-enabled.”  #Not necessary.  Just for fun.

It now seems to work!  You can delete the installation files.  Or, you can change your current installation by running arb_install.sh again.

Wednesday 20070919

Adobe Acrobat in Feisty

Filed under: adobe acrobat — jeff @ 6:07 pm

… is gone. (?) I just went to adobe.com to get it, instead, and the installation was a breeze. Strange that there couldn’t be a script to run the install through apt, like there is for Flash. I don’t mind looking for one program when I set up a computer, but if too many other common programs become like this, ubuntu will start to be more and more of a pain in the butt.  Plus, it’s messy to have to install and update programs myself, instead of letting apt handle it.  Linux has me so spoiled.  :)

howto backup to a usb drive, and sync two computers, w rsync

Filed under: backup, howto, rsync, usb drive — jeff @ 3:36 pm

Step 1.) Know where the usb drive is mounted. I used gparted to format mine with one big ext3 partition named “LinuxBackup” so it gets automounted at /media/LinuxBackup (in Ubuntu).

Step 2.) Create a folder on your usb drive where you want the backup to go.

Step 3.) Install the required program: rsync

Ready to go:

$ rsync -rupogt –delete /SOURCE/DATA/DIRECTORY/ /media/DRIVENAME/SUBFOLDER

Note: the SUBFOLDER on the drive must exist. Also, if I remember correctly there is some significance to there being a following “/” at the end of the source folder name. Your own needs may vary from mine, so look up the rsync options and adjust accordingly. For example, I use the –delete option, which deletes all files and folders on the destination which do not exist in the source. If you don’t use this option, and you rename or move a directory on your computer, you will end up with two copies of the same files, one of them under the old name! BEWARE: the –delete option will also destroy previously backed-up files that you have since deleted on your source computer, and they will be lost forever. Always think before doing this. There is little chance of recovering deleted files from the destination. This is especially pertinent when going the other way, from drive-to-computer. If the destination computer folder contains newer files that aren’t on the usb drive source, the –delete option will destroy them!

For my system, I have a usb drive named LinuxBackup, and two computers: one at work, and one at home. When I’m done working at home I put in the usb drive and run

$ rsync -rupogt –delete ~/Documents/ /media/LinuxBackup/Documents

to put the newest copy of my Documents folder on my usb drive. Then, when I get to work, I load the newest copy of the Documents onto my work computer by running

$ rsync -rupogt –delete /media/LinuxBackup/Documents/ ~/Documents

This would be much easier if I wasn’t firewalled on both ends, since rsync is designed to do this over the internet using ssh. Oh well, the usb drive works well enough. And I have three copies of the data instead of two, which is 50% safer, right?

howto BLAST

Filed under: bioinformatics, blast, howto — jeff @ 3:11 pm

In ubuntu, the BLAST package is called blast2

sudo aptitude install blast2

This installs a whole bunch of blast commands for local and remote searching.  For example, you can search NCBI with a list of fasta entries as queries (sequentially) using the remote NCBI server to do the work:

blastcl3 -p blastp -m 3 -v 10 -b 10 -i infile.fasta -o outfile.txt

Where, here I’m just looking for a few quick top hits.  -p is the important option, where you define the search engine.  In this example I’m using blastp to search protein.  I think the default database is ncbi nr.

And here’s an example of searching a local database using your own cpu:

blast2 -p blastp -m 3 -v 10 -b 10 -i infile.fasta

and an outfile isn’t defined, so it just goes to standard out, ready for pipes.

howto join pdf files

Filed under: ghostscript, howto, pdf — jeff @ 2:32 pm

from an article at newsforge

This command line combines file1.pdf with file2.pdf, to create finished.pdf.  One additional bonus is that if files 1 and 2 weren’t compressed properly, the final finished file will be and it’s always nice to save disk space.

gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=finished.pdf file1.pdf file2.pdf

kthxbie

Older Posts »

Blog at WordPress.com.