Posts

xmonad 0.8 with GNOME

Image
I have discovered xmonad , a tiling window manager that works well with GNOME. The drawback to WMs like ion and awesome is that they don't play nice with the GNOME panel. However, xmonad works very well with it. I have added a few things to my configuration to make things work the way I like. For example, the deskbar applet window is made floating. Gimp windows are floating and assigned to workspace 5. The modifier key is the windows key. Here is my config after the screenshot. Just save it in $HOME/.xmonad as xmonad.hs. import XMonad import XMonad.Actions.CopyWindow import XMonad.Hooks.ManageDocks import XMonad.Hooks.EwmhDesktops import qualified XMonad.StackSet as W import XMonad.Util.EZConfig myFocusFollowsMouse :: Bool myFocusFollowsMouse = False main = xmonad $ defaultConfig { focusFollowsMouse = myFocusFollowsMouse , manageHook = newManageHook manageHook defaultConfig , logHook ...

Custom text in figures with Latex

Image
Building on my last post, I am still talking about writing up engineering calculations with LaTeX. Since then, I have discovered XFig. It is like a mini CAD program that allows you insert LaTeX text into your figures which is then processed when the document is compiled. The basic procedure is explained on XFig's site. I use xfig to generate diagrams with custom LaTeX macros instead of numbers. This way, if the value changes, the changes are written out automatically by the spreadsheet and the figure is updated when the document is recompiled. Lovely. As an example, I have created the following figure below: Notice the LaTeX code in math mode in the figure. The macros are defined in the .tex file on the second and third lines. They begin with \newcommand: You can see the resulting values have been inserted into the figure in the final PDF document.

Custom variables with Latex and Excel

I often have to write up engineering calculations for my work. Often I use LaTeX because of its excellent handling of equations, references, and custom variables. My strategy is to do the calculations in Excel, then create custom variables in a variables.tex file that contain all the values from my spreadsheet that will appear in the write up. I do this because if there is an error in my calculation, I can just change the value in one place and it will be corrected everywhere in the document where it appears. Unfortunately, I sometimes have to deal with 50 or 100 values. Manually changing those even in only one place can quickly become time consuming, so I wrote the following Excel macro to automatically write the variables.tex file for me when I save the spreadsheet. Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) Const texFileName As String = "variables.tex" Dim FileNum As Integer Dim curLabel As String Dim curValue As String FileN...

WinXP Pro partition in VMWare Ubuntu 8.04 Hardy Heron

Before upgrading to Hardy Heron, I had successfully set up VMWare player to use the windows partition as its virtual disk. This saves disk space. The problem in Hardy seems to be that it treats IDE drive as SCSI and therefore confuses windows when it is booted in VMWare. The solution to this is to install the vmware SCSI drivers while booted into Windows natively. You can then follow the other guides out there.

Gnome 2.22

With the release of Ubuntu 8.04, I am enjoying improvments made to GNOME 2.22. Among my favorites can be found the international clock with weather. Also, I have started using Tracker search with the deskbar. After I turned on indexing in the GNOME preferences, I rebuilt the tracker index. I also assigned Alt-space as the keyboard shortcut for deskbar. Now I can enjoy most of the functionality found in OS X's spotlight feature in Ubuntu. It is so nice to be able to quickly launch apps, open files, or start e-mails with a quick Alt-space. I also make good use of the Negative plugin for Compiz instead of looking for dark gnome themes. My current favorite is the Mac4Lin theme and the negative plugin. GNOME continues to impress me. Evolution is making good progress. I have successfully connected it to my corporate exchange account and global address book. Things are looking up.

Evolution + dovecot + offlinemap

I think I have finally found the best way to use Evolution with Gmail IMAP on a laptop. I installed a local dovecot server that only listens on localhost and setup offlineimap to sync my local dovecot imap server with gmail's server. I then connect evolution to my local server and have offlineimap run as often as I want to sync. Now I have offline messages and evolution is very fast. Using offlineimap to store the messages in a folder did not work so well because evolution did not recognize the inbox folder as the actual inbox. In ubuntu, this process is pretty trivial. The following command will install offlineimap and dovecot: sudo apt-get install offlineimap dovecot Dovecot config I then changed two lines in dovecot. Since I am running a local server, I don't need ssl, and I don't want to listen on external interfaces so I edited /etc/dovecot/dovecot.conf as follows: protocols = imap listen = localhost offlineimap config Configuring offline imap is pretty easy. He...

Fixing hibernation (suspend to disk) in Ubuntu 8.04 Hardy Heron for a Dell d800 using nvidia proprietary drivers.

Following a tip I found on on blog.paulbetts.org , I was able to get my Dell D800 with nVidia Quadro FX Go1000 to hibernate and resume correctly. The tip is reproduced below: In the Device section: Section "Device" ... Driver "nvidia" ... Option "NvAGP" "1" ... EndSection Then I included in /etc/modprobe.d/blacklist the following line: blacklist intel_agp. HIBERNATE_MODE=platform After a reboot, hibernation now works like it should.

Test post

r dtyrrrrryrftrt rtrttrtrrtrr r r rrrr r rrrr rr r rrrrrrrfr [ kjjkh fxxffffgfgvvvgggvbgbghhhnnnnmjjjhghhhjkjk,m lkklkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk kkkkkkkkkkkiuuuuuuuuuuuuyuyiuijjhewwwwwwwwwwwwwwwwwww wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwf v,lkmnmjmmmmmmmmmmmnnnmnmmm,.

FreeBSD 7

I recently got a Dell latitude d800 laptop that is for my own use. I am excited to be returning to FreeBSD after quite a while away. It seems like everytime I set it up, I am always looking for the colors I like, so I am going to post them here. export CLICOLOR=YES export LSCOLORS="DxGxFxdxCxDxDxhbadExEx"

Festival with pulseaudio in Ubuntu 8.04 Hardy Heron

I was having difficulty getting festival to work in the latest Ubuntu. I found quite a few places that said to add the following three lines to my $HOME/.festivalrc file: (Parameter.set 'Audio_Command "aplay $FILE") (Parameter.set 'Audio_Method 'Audio_Command) (Parameter.set 'Audio_Required_Format 'snd) Those lines did not work for me, but when I changed aplay to paplay in the first line, it started working.

Convert between Word and Latex

I use LaTeX to produce most of my documents, but occasionally I need to send someone something in Word format. Often I just use latex2rtf, but sometimes it does not do a good job. I recently ran into another alternative. It is called GrindEQ . It is not free, but it seems to do a pretty decent job. GrindEQ also has a tool to convert from Word to LaTeX. You can download an evaluation copy that will launch 10 times. It seems to work pretty well for what I have tried.

Parallels 3.0 vs VMWare Fusion 1.1

I thought I would add to the discussion of Parallels vs VMWare Fusion. For those who don't know, both of these programs run on Intel Macs and provide a way of running other operating systems alongside Mac OS X. Most commonly, this is used to run Windows programs on the Mac. Until recently, I had no interest in trying Parallels because I knew VMWare was coming out soon. I have used VMWare in the past and have been impressed. However, recently I installed Parallels 3.0 to troubleshoot something at work. The install lasted less than a day on my system because it the software my company develops did not work with Parallels 3.0 running on Leopard, but worked flawlessly in VMWare Fusion 1.1 running on Leopard. I currently work for Aquaveo, LLC which develops the XMS family of programs for water resources engineers. I did not make benchmarks of Parallels vs VMWare because Parallels simply did not work right. I am still a fan of VMWare because I have had no problems with it at all ...

Terminal in Leopard

I just figured out how to save terminal settings in Leopard so I can use spotlight to launch a terminal with an ssh session started automatically. You pick Shell->New Remote Connection and set up your connection. In the line below the username box, for ssh you would type ssh user@server. Then click the connect button. When the new terminal window comes up, Select Shell->Export Settings and save the file somewhere. Now you can use launch an ssh session by opening that file.

Fast DNS servers

Recently, my wife has been complaining that the internet is significantly slower on my MacBook than on here linux PC. She was right. The MacBook was substantially slower, but it was only slower at home. At work and school, pages load very quickly so I suspected that perhaps the DNS server had something to do with it. Sure enough, once I changed the DNS server to OpenDNS, the pages were loading faster than ever. Both of these machines use a wireless connection, but my wife's desktop has a static IP address while my laptop is set to automatic, so it gets whatever the router gives it for DNS. I created a Home location in the Network Preferences with a static IP and the OpenDNS servers for name resolution. Now I can have fast internet everywhere :)

Booting Linux to a Ram Disk

Yeah! I just got a linux machine to copy the whole system into a ramdisk and then boot from it. Talk about fast! Read on to find out how I did it. Introduction: My friend who owns A Byte Better Computers (www.byte-better.com) just built himself a new machine to play spades with. It has a 2.6 GHz Core 2 Duo, 4 x 500 GB SATA2 hard drives with 16 MB cache on each (2 TB total), DVD+R DL CD burn everything drive, floppy, and currently has 4 GB of RAM, soon to be upgraded to 8 GB. It currently runs Windows XP on one drive,and Gentoo linux on a second drive. The other two drives are for data. We thought about several RAID options, but for now they are all separate drives. So we thought to ourselves "We have this great system, how can we make it even faster? Ah! Run the OS from RAM!" So we decided to try it. While we were installing the OSes on the big box, I was using my laptop to build a prototype to work out the bugs. After a lot of research, much trial-and-error, and...

Include PDF in latex document

Sometimes I use Excel or NeoOffice/OpenOffice.org to create tables I want to include in latex documents. I try to get latex code for the table using Calc2Latex or the Excel2LaTeX , but when that doesn't work so well, I print the table to a pdf an include that pdf in the pdflatex document. [UPDATE] I recently discovered that the graphicx package can include pdf files as pictures. Also useful. [/UPDATE] This is what you can use for concatenating PDFs: (shamelessly stolen from http://ansuz.sooke.bc.ca/software/pdf-append.php) begin quote If you have LaTeX installed, you probably have pdftex and a package called pdfpages, and you can use those together with a hand-written driver file to append PDFs. This approach is more work than I'd really prefer, but it's the only one I found that actually did work in my situation, after spending a lot more time on the problem than I ought to have (and not being paid by the hour, so it hurt). If I were doing this task many times I cou...

Switch from Opera to Camino

So I have switched from Opera to Camino. Why? Well, the killer feature in Camino is the ability to use Google Spreadsheets, which we use at my work. It seems that only the Gecko rendering engine does it correctly on the Mac. I also tried OmniWeb 5.5 . I thought it was a very nice browser, but Camino does everything I need and performs very well. I have used Firefox on the Mac, but I prefer the interface of Camino. Other people will like other things. On a separate note, Sherlock is a pretty neat tool for searching things on the web that comes with OS X and Path Finder is great Finder replacement.
It has been quite a while since my last post. I have discovered some great software. The Fink project is quite nice as it allowed me to easily install octave (a matlab clone) with gnuplot and aquaterm . Transmit is a very nice FTP client for the mac, but it is a bit expensive. Also, shapeshifter is pretty fun if you want to play with themes , but I always come back to Aqua because it is very hard to find other themes that are really useable. I hate having my interface get in the way, which is why I liked the ion window manager so much on my FreeBSD machine. Oh yeah, I got that RAM upgrade I mentioned a few posts back. Now running at 2 GB of RAM. The system is really smooth! I can run Windows XP in VMWare and OS X together with no performance loss. Let's see, I use vobcopy and Handbrake to get Movies onto my computer. Handbrake is the best ripper I have used so far. It even has presets for Apple TV, iPod video, and others.

Removed QuickSilver

In a previous post, I mentioned that I installed QuickSilver. I have since removed it because I found that the spotlight feature of OS X 10.4 works well amazingly well.

Recover forgotten dial-up or PPPoE passwords in Windows

I used this tool to recover a forgotten password for the HiNet.net DSL service on Windows XP. It is supposed to work on other versions of windows as well. You can find it at http://www.nirsoft.net/utils/dialupass2.html I have been liking the MacBook. The keyboard is great, and I have never used a better touchpad. Their driver is great. There is an option that allows you to ctrl-click by cliking with two fingers on the pad. It makes using windows possible without a real mouse.