Tag Archives: Google

Install nodejs under ChromeOS (CR-48)

Why would I want to do this?

I’m a software developer. I love javascript. I love node.js. I love the direction Google is taking web development, user interaction, and the web in general. Installing node.js opens up a lot of possibilities for me on my CR-48. I don’t know if this will work on anything other than the CR-48, considering the machine has to be in developer mode for these instructions.

If you don’t have a chromebook yet, or you don’t know what they are… where have you been? But seriously, visit http://www.google.com/chromebook/ and check them out.

Before I start, let me first say that following these instructions may void your warranty if you have one, open your machine up to vulnerabilities, or replace existing files and cause instability. If you don’t know how to revert or fix any issues that may occur, don’t continue. I offer no sort of warranty, support, or anything else. Consider this a ‘hack’ of sorts.

I found a blog post detailing how to install an archive package and ruby on rails in ChromeOS. I followed part of these instructions and I have modified them to fit my needs.

Prerequisites

  • You must have a Chromebook, possibly only the CR-48
  • You must be in ‘developer mode
  • You must have a writable rootfs (see above link for developer mode)

Instructions

Downloading and installing xz

  1. Download the xz package
  2. Enter crosh or VT-2 (CTRL+ALT+T or CTRL+ALT+→)
  3. If VT-2, login to the shell
  4. Run on the terminal: cd /home/chronos/user/Downloads
  5. Run on the terminal: tar -zxf xz-*.tar.gz
  6. Run on the terminal: cd usr
  7. Run on the terminal: cp * /usr/

Now that xz is installed in /usr/bin (verify by running on the command line: which xz), you will be able to extract certain files that are necessary for nodejs and possibly any other package you’d like.

Download and install nodejs and openssl.
The site claims openssl is optional, but node wouldn’t open without it

  1. Download nodejs
  2. Download openssl
  3. Enter the terminal again and navigate to /home/chronos/user/Downloads
  4. Run on the terminal: xz -d node*.xz
  5. Run on the terminal: tar -zxfv openssl*.tar.gz
  6. Run on the terminal: cd usr
  7. Run on the terminal: cp * /usr/

Now you should have a working install of nodejs. You can use npm, for instance, to install express and jade.
node.js and express running on ChromeOS

Flattr this!

Running additional Google Chrome profiles in Linux

Google Chrome supports running multiple profiles.

In newer versions of Google Chrome, you’ll be able to enable profiles by navigating to chrome://flags and enabling Multiple Profiles. Restart the browser, and you’ll have a switcher and multiple profiles which can be activated in different windows. This allows you to sync to different gmail accounts. For instance, if you have a personal account and a work or school account, each with different bookmarks… you can run two or three different profiles and have access to all of your data.

If you’re using an older version of Chrome or Chromium and you don’t have the Multiple Profiles option, you can use the switch

--user-data-dir

when opening the browser and the profile for your session will be pulled from the given folder instead of the Default folder. The folder specified should be created automatically. To be safe, I like to create the folder before providing it as an argument.

As explained here, the default directory is located at:

Google Chrome: ~/.config/google-chrome/Default
Chromium: ~/.config/chromium/Default

Open a terminal and create a new directory for your second profile. For instance:

mkdir ~/.config/google-chrome/work

Then, open Google Chrome with the switch:

google-chrome --user-data-dir='~/.config/google-chrome/work'  &

If this is a profile you’ll be using often, you can also create a menu entry under Applications -> Internet (‘Chrome|Work’, maybe?).

Flattr this!

Linking to a Google Doc .doc as .pdf

I recently decided to update my resume, which forced me to revisit an issue I originally faced when posting my resume to my site: I am writing it as a doc file in Google Docs but I want to link to it as a PDF and have my updates visible immediately.

I know this is a selfish thing to want, and I settled for the quick and easy solution of copying the PDF to my host and pointing to the local file. After updating my resume today, I thought, “I’m sure someone has already encountered this.” A quick search on Google took me to a Google knol article in which the other provides a link which will convert the Google Doc (provided by a document id) to a desired format. This link causes the PDF to download immediately, but when passed to the document viewer, it works as expected. Perfect!

Here is the article citation:

Google Docs Guide 2. Google Docs Help: Howto Link Straight To A Public Docs Pdf Or Other Supported File [Internet]. Version 2. Knol. 2008 Oct 8. Available from: http://knol.google.com/k/google-docs-guide-2/google-docs-help-howto-link-straight-to/2vcnhxffa8r42/20.

And the link template described in the article:

http://docs.google.com/MiscCommands?command=saveasdoc&exportformat=[FORMAT]&docID=[ID]

Check out my resume for an example.

Flattr this!