How to Add a Windows 7 Taskbar Link for Your Dropbox Folder
![]()
So, you want a taskbar button that'll bring up your Dropbox folder? I've got just the trick:
- Right-click on your desktop, then select "New" -> "Shortcut".
- When it asks for the "Location of the item" paste the following, but substitute "Dan" with your own username:
C:\Users\Dan\AppData\Roaming\Dropbox\bin\Dropbox.exe /home
- When it prompts for a "Name for this shortcut", enter "Dropbox".
- If everything went right, it should automatically take on Dropbox's icon.
- Right-click on the shortcut, and select "Pin to Taskbar".
- That's it!
Converting a Landscape Postscript File to PDF
Okular can be used to save a landscape-oriented postscript file as a pdf, while still retaining the vector graphics.
The short version: use Okular (a linux viewer included with KDE). File -> "Import Postscript as PDF", then File -> "Save as" -> somefile.pdf.
Of course, getting Okular up and running may be its own challenge. Personally, I like Fedora KDE, which you can install/run in a virtual machine like VMware or VirtualBox.
The long version:
- Create a postscript file that is 792 points wide by 612 points high.
- Open Okular.
- Go to File -> Import Postscript as PDF...
- Select your .ps file and click "Open".
- Go to File -> Save As...
- Name the file so it ends in .pdf
- Click "Save" and you're done!
You can now open your new .pdf in Adobe Reader to see your work in all its landscape vector-quality goodness.
Increasing the Resolution of a Linux VirtualBox Guest
After you first get Ubuntu running in VirtualBox, you may notice that it only allows you an 800x600 resolution. You may fix this by following these instructions:
- Click the desktop background of your new Ubuntu installation.
- Hold down the right Ctrl key and press "d".
- If a CD icon does not appear on the desktop, go to "Devices" on the VirtualBox menu, then select "Install Guest Additions...".
- If you still don't get a CD icon, restart the Ubuntu virtual machine.
- Select "Cancel" on the prompt that comes up (it might not appear).
- Double-click the CD icon on the Ubuntu desktop.
- Double-click autorun.sh, and select "Run in Terminal" on the prompt that appears.
- Enter your password, hit OK, let the script finish (about a minute) then restart your virtual machine.
- You can get rid of the CD icon now. Just right-click on it, and select "Unmount" or "Eject".
Now when you maximize your guest's (Ubuntu) window, it should fill the whole screen.
After I installed VirtualBox's Linux Guest Additions (the above procedure), the network connection from within the Ubuntu guest stopped working. To fix this, I had to left-click on the network connections icon in the upper-right corner of Ubuntu (immediately to the right of my username), then click on "Auto eth1".
Dropbox daemon
Dropbox is a fantastic service. It allows you to keep your files synchronized across multiple computers with different operating systems. Lots of features and the first two gigabytes are free!
The only hang-up for me was using the program on Fedora under KDE. Specifically, there was no daemon to allow the program to automatically load and run in the background. So I wrote one. Feel free to modify and redistribute as you like. Please just keep me attributed in the file header until the majority of the content is no longer mine.
To install, just download this file and run "sudo perl dropboxd install" in the directory where you downloaded this script. It will put a copy of itself in your /etc/init.d folder and set it to run when your system boots up. It'll keep dropbox going even when you're logged out.
Fixing Fedora 12′s Black Screen on Upgrade/Install
After upgrading from Fedora 10 to Fedora 12 via the anaconda installer, the computer would appear to be booting as usual but as soon as the login prompt was to to appear, I get a black screen instead. There's a flashing underscore to indicate cursor position, and I can type things but nothing works. Moving the mouse causes a gray rectangle/cursor thing to move accordingly. Sound familiar? Here's how got things back to normal:
Press cntrl-alt-F2
Enter your username and password.
Type:
sudo mv /etc/X11/xorg.conf /etc/X11/xorg.conf.bak sudo yum update sudo yum upgrade
Then reboot.
I had about 700 packages that needed updating, which I'm fairly sure was contributing to the problem. After the reboot, I get the usual graphical login prompt and my desktop comes up correctly. The xorg.conf file never reappeared though. Installing ATI's linux drivers only made the problem resurface, so beware.
Configuring WordPress-MU for Subdomain Domain Mapping
WordPress is a popular content management system for bloggers. However, it only allows you to have one blog per installation. Enter WordPress-MU, which is a modified version of WordPress that supports as many blogs as you like. However, these sites must all share the same domain name e.g. dnablogs.com with either subdomains (school.dnablogs.com, travel.dnablogs.com, etc) or directories (dnablogs.com/school, dnablogs.com/travel, etc) to differentiate between them. If you want separate domain names for each blog, you must install the WordPress-MU Domain Mapping plugin to let you do this. This isn't quick and easy, but what I needed to do, and outline below, is even more involved.
I have friends with several existing websites at URLs like tim.com or paul.com and they want to add blogs to them at blog.tim.com and blog.paul.com without effecting any of their current content. On my end, I have just dnasmith.com and don't want to allow WordPress-MU to take it over, or buy a new domain for dedicating to WordPress-MU. Instead, I'll explain how I installed WordPress-MU to the subdomain blogs.dnasmith.com and mapped blog.tim.com to blogs.dnasmith.com/tim.
Note: in the instructions below, change dnasmith.com and tim.com accordingly.
- Login to the control panel (e.g. GoDaddy) for your blog's domain (e.g. tim.com) and point a subdomain (e.g. blog.tim.com) to your server's IP address.
- Install WordPress-MU onto your server. On Fedora this can be done with 'sudo yum install wordpress-mu'.
- Set up WordPress-MU (http://dnasmith.com/wordpress-mu) according to the installation instructions - let it install however is easiest at this point.
- Goto WordPress-MU's "Site Admin" -> "Options" -> Last option on that page is a checkbox to enable plugins. Check it then click "Update Options".
- Download the WordPress-MU Domain Mapping plugin from [this link] which contains the two files mentioned below.
- Move sunrise.php to /usr/share/wordpress-mu/wp-content/sunrise.php
- Move domain_mapping.php to /usr/share/wordpress-mu/wp-content/mu-plugins/domain_mapping.php
- Open /usr/share/wordpress-mu/wp-config.php and change/uncomment these lines to match:
define('VHOST', 'no'); $base = '/'; define('DOMAIN_CURRENT_SITE', 'blogs.dnasmith.com' ); define( 'SUNRISE', 'on' ); - Open /etc/httpd/conf.d/wordpress-mu.conf and:
- Delete the first line, "Alias /wordpress-mu /usr/share/wordpress-mu"
- Change "RewriteBase /wordpress-mu/" to "RewriteBase /"
- At the top of the file, add a block like:
<VirtualHost *:80> ServerName blogs.dnasmith.com DocumentRoot /usr/share/wordpress-mu </VirtualHost> - After that block, add another one for each friend's site like:
<VirtualHost *:80> ServerName blog.tim.com DocumentRoot /usr/share/wordpress-mu </VirtualHost>
- Restart your web server.
sudo /etc/init.d/httpd restart
- Head back to your WordPress-MU Site Admin webpage, now http://blogs.dnasmith.com and add a blog for your friend.
- "Site Admin" -> "Blogs" -> Fill out the form -> "Add Blog"
- Visit the blog you just created. In the lower-right menu should be a "Site Admin" link - click on that.
- On the left menu, goto "Tools" -> "Domain Mapping". Enter blog.tim.com into the box, check the checkbox to make it the primary address and click "Add".
- There! All done!
Please leave comments below if these directions don't work properly or you have some other neat trick that could be useful here.
Sharing Databases in ARB
This tutorial assumes that you have just set up an ARB installation as described in Basic ARB Installation Instructions and Modifying an ARB Installation for Concurrent Users. On this page I'll explain how to configure ARB to allow all users access to a common database.
- The list and mappings for ARB databases are defined in the arb_tcp.dat file. The file included below sets a few paths in a manner that points all users to the exact same file.
- Get root:
sudo bash
- Replace your arb_tcp.dat file:
cd /usr/local/arb/lib wget http://dl.dropbox.com/u/84104/dnasmith/arb_tcp_group.dat mv arb_tcp.dat arb_tcp_single.dat ln -s arb_tcp_group.dat arb_tcp.dat
- Create the folder for shared databases:
mkdir /etc/arb
- Get root:
- Only users running ARB as root can save new databases to the /etc/arb folder. The arb_tcp.dat file you just installed defines two databases - "LSU_rRNA" and "SSU_rRNA" - which will be saved to /etc/arb. Create these now by following the instructions below.
- Get root (if you are not already):
sudo bash
- Get a ".arb" file ready - doesn't need to be the one below.
cd ~ wget http://www.arb-silva.de/fileadmin/silva_databases/release_100/ARB_files/LSURef_100_SILVA_01_08_09_opt.tgz tar -zxvf LSURef_100_SILVA_01_08_09_opt.tgz
- Build a PT server from the .arb file:
- Launch arb (as root):
arb
- In ARB, highlight the LSURef_100_SILVA_01_08_09_opt.arb file in the list and click "Open Selected".
- From the ARB menu, click "Probes", then "PT_SERVER Admin".
- In the pop-up box, highlight "LSU_rRNA.arb", then click "Build Server". The terminal window will track the progress of the build. If you used the above SILVA file, it'll take about 30 minutes.
- Once it's done, highlight the "LSU_rRNA.arb" again, and this time click "Stop server".
- Exit completely out of ARB.
- Launch arb (as root):
- Delete the original ".arb" file (optional):
rm ~/LSURef_100_SILVA_01_08_09_opt.arb
- Get root (if you are not already):
- Set the permissions on the shared database.
cd /etc/arb chmod 644 *.*
The above setup will allow everyone to open the LSU_rRNA database, but not write to it - only users running ARB as root can make changes to it. To allow everyone to write to it, change the "644" to "666" in the last line above. All the usual Unix permissions set-ups can be used here to manage finer grained rights management. Just keep in mind that if two users have the same shared database open at the same time, and both save their changes, only the last save will be kept.
Modifying an ARB Installation for Concurrent Users
This tutorial assumes that you have just set up an ARB installation as described in Basic ARB Installation Instructions. On this page I'll explain how to configure ARB to support multiple instances concurrently on the same computer.
- Get root.
sudo bash
- Move your arb folder from your home directory to a system directory:
mv ~/arb /usr/local chown -R root:root /usr/local/arb
- Backup, then replace the existing configuration file with the one I've included here:
cd /usr/local/arb/lib mv arb_tcp.dat arb_tcp.dat.bak wget http://dl.dropbox.com/u/84104/dnasmith/arb_tcp.dat
- Change the environmental variables to point to the new location of arb:
- Open your bash defaults file:
gedit /etc/bash.bashrc
- Change/add lines to match:
export ARBHOME=/usr/local/arb alias arb='$ARBHOME/SH/arb'
- Save the file and exit gedit
- Open your bash defaults file:
- Ensure the name server's template is distributed to all users' .arb_prop directories:
- Open the ARB-launching script:
gedit /usr/local/arb/SH/arb
- On the second line, insert the following one line:
echo 'SHORTS1{ IDENT {Escherichia}SHORT {Esche}}' > ~/.arb_prop/names.dat.template - Save the file and exit gedit
- Open the ARB-launching script:
That's it! Now, each user can save up to seven databases in arb which will not affect the other users in any way. You may increase this limit by adding more lines to the arb_tcp.dat file.
If you'd like to allow users access to "group" databases whether with read-only access or read-write privileges, please see the next section Sharing Databases in ARB.
Basic ARB Installation Instructions
ARB is an excellent software suite for phylogenetic analysis of 16S rRNA and other biological sequences.
Installing and setting it up however can sometimes be problematic. I've installed this software many times and will explain here how I've gotten it working when ARB's installation manual wasn't enough.
This walkthrough was put together immediately after I installed a fresh version of Ubuntu 10.10 (ubuntu-10.10-desktop-amd64.iso) into a VirtualBox virtual machine.
Basic Installation
- Start with Ubuntu! Grab the 64-bit version of release 10.04 (later releases might also work). This is the operating system that ARB was developed on and for. Starting with it will make your life much much easier.
- Can't install Ubuntu? Install VirtualBox, then install Ubuntu into a virtual machine. You can keep your existing Windows/Mac/etc just as it is while making ARB nice and comfy.
- See also Increasing the Resolution of a Linux VirtualBox Guest.
- Using VMware instead of VirtualBox is not recommended, as ARB is known to die in VMware with the error message:
/home/username/arb/bin/arb_ntree: 1: Syntax error: Unterminated quoted string
- Now that you've got a 64-bit Ubuntu environment, download and extract the tarball thusly:
cd ~ mkdir arb cd arb wget http://download.arb-home.de/build/latest/arb.64.ubuntu.tgz tar -zxvf arb.64.ubuntu.tgz
- The latest ARB release as of this writing (ARB 5.1) requires a modification to its directory structure. If you omit this step, ARB will give you the error message "/home/username/arb/lib/pts doesn't exist" when building a pt server. The following commands replace the ~/arb/lib/pts file with a folder of the same name, and will not hurt a correctly structured directory.
rm -f ~/arb/lib/pts mkdir ~/arb/lib/pts
- There is a second known error in the current version of ARB: in ~/arb/lib/arb_tcp.dat on line number 55, "-fstart" should be "-fstart=1". Make this change via gedit (displays your current line number in the lower-right corner). Save and exit when you're finished. Without this fix, you'll receive an ambiguous error message when you try to automatically rename imported sequences, or during any other event which requires a name server.
gedit ~/arb/lib/arb_tcp.dat
- To work, ARB will need a bunch of extra libraries. Install them using the command below. Note: the following is all one line.
sudo apt-get install libmotif3 libpng3 xloadimage gnuplot gv xfig libglew1.5
- Now, we need to create a few environmental variables so the computer (and ARB) know where to find ARB.
- Type this command:
sudo gedit /etc/bash.bashrc
- Add the following lines:
export ARBHOME=$HOME/arb alias arb='$ARBHOME/SH/arb'
- Save the file and exit gedit.
- Close/reopen your terminal windows.
- Type this command:
You should now have a functional ARB installation. Just type "arb" to launch the program. This setup will work fine if you only have one ARB user, or all the ARB users are okay with sharing a single ARB installation.
Do not run multiple instances of ARB at the same time. The configuration file for ARB (~/arb/lib/arb_tcp.dat) has hard-coded port numbers. This means if more than one ARB is launched at the same time, they will potentially conflict and crash.
If you want to configure an environment that supports concurrent ARB users, please see part two of this tutorial - Modifying an ARB Installation for Concurrent Users.
Please leave me a comment below if these instructions did not give you a working installation of ARB on Ubuntu. Be sure to include any error messages produced by ARB in message boxes or emitted to the terminal. I'll try to find a fix and update these instructions accordingly.
Hosting Multiple Blogs Using A Single WordPress Installation
After installing WordPress 3, find the wp-config.php file and change the line
$table_prefix = 'wp_';
to
$arr = explode(".", $_SERVER["SERVER_NAME"]);
$table_prefix = $arr[count($arr)-2] .'_';
Now, a blog at http://mysite.com will get the table_prefix "mysite_", a blog at http://othersite.org will get the table_prefix "othersite_", and so on.
Next, point all your blogs to where wordpress is installed, using VirtualHost directives. For example, inside /etc/httpd/conf/virtualhosts.conf, the above collection of sites would look like:
Listen 80 ServerName *:80 NameVirtualHost *:80 <VirtualHost *:80> ServerName mysite.com DocumentRoot /usr/share/wordpress </VirtualHost> <VirtualHost *:80> ServerName othersite.org DocumentRoot /usr/share/wordpress </VirtualHost> <VirtualHost *:80> ServerName www.mysite.com Redirect 301 / http://mysite.com </VirtualHost> <VirtualHost *:80> ServerName www.othersite.org Redirect 301 / http://othersite.org </VirtualHost>
Notice how the last two VirtualHost blocks are redirects. This is important to have in order to prevent confusing http://www.mysite.com with http://mysite.com, which to web servers are two different sites. Consolidating the two URLs will also improve your search engine ranking.
