The world according to Robin

A techno-related blog with tips and tricks, and the occasional rave about… anything!

After upgrading to Ubuntu 10.4 LTS (Lucid Lynx) I was having a problem with my Ubuntu One profile. Clicking the Me Menu at the top right corner and choosing Ubuntu One showed an empty profile (unknown name, email, etc.). I was able to log in to my Ubuntu One website and thinking the problem was related to duplicate machines, I removed all listed machines, thinking I could simply add my machine afterwards. However, this was easier said than done. The Ubuntu One instructions told me to click the “Add Your Computer” button, which was nowhere to be found. Luckily, the Ubuntu One FAQ had the solution:

  1. Close the Ubuntu One Preferences application window (if it’s already open).
  2. Open your Terminal (located in Applications >> Accessories) and type the following:
u1sdtool -q; killall ubuntuone-login; u1sdtool -c

This should force a web browser to open and and you should be able to see a button for adding a computer to Ubuntu One. After adding my computer, my problem was fixed, and the Ubuntu One application preferences on the Me Menu showed correct user details. Apparently the above is a temporary measure and the Ubuntu One team will implement a more permanent fix for this problem soon.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Matlab and X11 in OS X

No comments

Edit 10 May 2010: After installing OS X 10.6, Matlab 2010a works out of the box with no X11 hassle.

Matlab requires X11 to be installed in Mac OS X 10.5.8 to run properly (or at least in a GUI). Although Apple ships their operating system with X11, there seems to be some problems related to the version of X11 they are using. Specifically, when trying to open Matlab, the splash screen appears for a few seconds before the application simply exits.

A solution that has worked for me is to use the latest, community-driven, and open-source version of X11 (XQuartz X11 2.5.0) developed by the XQuartz project. After installation, Matlab should work properly again. Note that whenever you perform a system update, you will have to reinstall the XQuartz release. This is due to the system update overwriting your X11 application.

The above solution works for my setup:

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Some friends and I

No comments

A photo taken a few years back when I visited a couple of friends overseas.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Welcome to my blog, an informal account of mostly techno-related stuff but anything I find worth writing about will be posted here.

If you are looking for my professional details, CV, research, and publications, please see my main site at www.robinbye.com.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Batch convert EPS to PDF

No comments

In Mac OS X, the application Preview will automatically open your EPS files as PDFs and offer you to save it as PDF when you are done. However, sometimes it does not manage to convert to PDF properly. You may then resort to the command ps2pdf.

To batch convert several EPS files in your current directory, do the following at a command line prompt:

FILES="*.eps"
for f in $FILES; do ps2pdf -dEPSCrop $f; done

This will convert all your EPS files to PDF and ensure that they are cropped properly. If you actually prefer to use an entire A4 (or letter size) page for your figure, leave out the -dEPSCrop flag.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

There are a few reasons you may need to add a style (*.sty) file to your LaTeX distribution manually instead of using the repositories. First, you may have obtained a newer version than the one that exists in the repos. Second, the style file may not even exist in the repos.

The following works for a TexLive installation in OS X (and possibly other UNIX systems):

sudo mv foo.sty /usr/local/texlive/texmf-local/tex/latex/foo/

where foo is the style file you want to add. Afterwards, make sure you run

sudo texhash

to ensure that TexLive discovers your added file.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Opera Unite (release 10 beta) is the latest version of the Opera browser (stable release 9.64). It integrates a web server tool, which allows you to share content on your computer directly instead of uploading to (sometimes costly) remote servers.

The Unite API is available and users are encouraged to write their own applications. Opera has provided a few applications already to demonstrate the possibilies of Unite: The Fridge (for visitors to leave messages on post-it notes), the Web Server (you can share your web directory), File Sharing (access to a directory and subdirectories/files), the Lounge (a chat room), Photo Sharing (includes a simple album browser and possibility to download entire photos),  and a Media Player (visitors can play music on your computer directly in their browser). 

Importantly, visitors do not need to be Unite users to use your Unite applications.

As the number of applications grow when users submit their application, Opera Unite can very well be the next big thing in cloud computing.

You may want to try locksley90’s Unite page!

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Dropbox is a program for syncing directories and files across your computers. When you add or remove something on one computer, the changes are updated to all your other computers. This way you always have the latest version of your files both a work and at home.

Moreover, a web interface allows you to access your Dropbox directory on any computer with internet access. Thus, if you sit down at some random internet cafe while on vacation, you can still access, upload, and modify your files! This is very useful for keeping a backup copy of your passport, tickets, or other valuable files.

The free version of Dropbox gives you 2 GB of storage, however, by using the link below both you and I get an extra 250 MB 🙂

https://www.getdropbox.com/referrals/NTEyMTMzNTQ5

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

To export Simulink models/block diagrams to eps or other image formats is easy. First, open your model. Next, use the print function to export to other formats (note the letter ‘s’ that must precede the model name, which is entered without the ‘.mdl’ postfix):

print -s<modelname> -d<xxx> -r<resolution> <filename>.<xxx>

For example, to export simmodel.mdl to eps with a resolution of 300 dpi, type

print -ssimmodel -deps -r300 simmodel.eps

The file simmodel.eps will be created in the directory where the command is entered.

For more information about image formats and print options, type

help print

Enjoy!

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Edit 6 June 2010: Perhaps even easier is to install a WordPress plugin for code markup. In this blog, I use the Syntax Highlighter Evolved plugin, which supports a number of programming languages such as the C-family, Java, PHP, Bash/shell, etc.

It is sometimes difficult to add code snippets your blog, for example using Blogger/Blogspot or WordPress. Code involving xml or html tags might get parsed if you simply try to use the <pre> tag. A simple solution is to copy and paste your code snippet into this website, which transforms it to “readable” code. You may then enclose the resulting code in <pre> tags as usual.

For example, when I needed to write <pre> in the previous paragraph, I went to the above website, entered <pre>, and got &lt;pre&gt; back in return, which I simply copy and pasted back into the blog editor.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)