TermKit is graphical replacement for the old Unix terminal developed by Steven Wittens. It is based on the WebKit HTML rendering engine used in Safari and Chrome. The only ‘problem’ with TermKit is that you need a Mac with OS X to use it. Since we are Linux users we wanted to at least give it a try and found that you can test it using Chrome. In this post I cleaned up the instructions for testing TermKit on a machine with Ubuntu.
The idea is detailed in this fork at Github: https://github.com/Floby/TermKit/commit/2e18c8d622443a671a626a7815006ce187743ea2.
Make sure you have git, libssl-dev and Google Chrome installed. To install git and libssl-dev do: sudo aptitude install git libssl-dev and sudo aptitude install google-chrome-beta will install Google Chrome.
With those two installed (most developers already have them) then follow these commands to build Node.js, npm and finally run TermKit. To compile this you may need to include other dependencies but in my machine they were already installed.
The following steps will create a directory called TermKitProj in your home directory and install everything you need inside it.
$ cd ~ $ mkdir TermKitProj $ cd TermKitProj $ git clone https://github.com/joyent/node.git $ cd node $ ./configure $ make
wait a while until Node compiles …
$ sudo make install $ cd .. $ git clone http://github.com/isaacs/npm.git $ cd npm $ sudo make install
wait a little more …
$ cd .. $ git clone https://github.com/Floby/TermKit.git --recursive $ cd TermKit/ $ npm install $ node Node/nodekit.js
The last command starts the backend in your terminal. You should see something like this:
miquel@inspire:~/Develop/TermKitProj/TermKit$ node Node/nodekit.js
21 May 13:10:27 - Your node instance does not have root privileges. This means that the flash XML policy file will be served inline instead of on port 843. This will slow down initial connections slightly.
21 May 13:10:27 - socket.io ready - accepting connections
server listening at http://localhost:2222
21 May 13:10:41 - Initializing client with transport "websocket"
21 May 13:10:41 - Client 8840208831243217 connected
worker: config @{}@
Once this is running fireup Chrome and open this URL: http://localhost:2222 and you should see something like this:


I’d try it with Mac OS X and looks good but never use vi because TermKit hangs up. What about Linux and vi?
Termkit is not an vt100-emulator, don’t try to use it with TUI apps. CLI apps should work.
Looks interesting, not really a cli replacement yet, or ever probably but an interesting approach to modern cli interfaces. Would be interesting to see the idea picked up in a way as a new shell for linux.
I agree with you. It’s so awesome.
hello when I do sudo make install im me out this error
b@PC: ~ / TermKitProj / spm $ sudo make install
! [-d. git] | | git submodule update – init
Initialized empty Git repository in / home / b / TermKitProj / spm / node_modules / abbrev / .git /
github.com [0: 207.97.227.239]: errno = Connection timed out
fatal: unable to connect a socket (Connection timed out)
Clone of ‘git: / / github.com / Isaac / abbrev-js.git’into submodule path ‘node_modules / abbrev’ failed
make: *** [submodules] Error 1
This did not work for me.. obviously because following these instructions I did not install libssl-dev. so it just froze my machine.
But I found a better version of the same instructions set at http://www.techdrivein.com/2011/06/termkit-is-terminal-reimagined-install.html . and that worked great for me!
Vicer thank you. I fixed the text and include the libssl-dev installing instructions on it.
Hello,
For npm install it’s better to do:
curl http://npmjs.org/install.sh | sh
(tested in gentoo and cygwin)
Hi, I’m getting the following error when doing $make
uv-linux.c: In function ‘uv_hrtime’:
uv-linux.c:34: error: ‘NANOSEC’ undeclared (first use in this function)
uv-linux.c:34: error: (Each undeclared identifier is reported only once
uv-linux.c:34: error: for each function it appears in.)
make[1]: *** [uv-platform.o] Error 1
make[1]: Leaving directory `/home/nacho/TermKitProj/node/build/default/deps/uv’
Waf: Leaving directory `/home/nacho/TermKitProj/node/build’
Build failed: -> task failed (err #2):
{task: uv uv.h -> uv.a}
make: *** [program] Error 1
any ideas?
I am new to npm, I got following error at “npm install”
npm ERR! Error: Not found: connect@’>=1.2.0- <1.3.0-'
npm ERR! Valid install targets:
npm ERR! ["latest","0.0.1","0.0.2","0.0.3","0.0.4","0.0.5","0.0.6","0.1.0","0.2.0","0.2.1","0.2.2","0.2.3","0.2.4","0.2.5","0.2.6","0.2.7","0.3.0","0.4.0","0.5.0","0.5.1","0.5.2","0.5.3","0.5.4","0.5.5","0.5.6","0.5.7","0.5.8","0.5.9","0.5.10","1.0.0","1.0.1"]
npm ERR! at installTargetsError (/usr/local/lib/node_modules/npm/lib/cache.js:313:10)
npm ERR! at /usr/local/lib/node_modules/npm/lib/cache.js:306:17
npm ERR! at saved (/usr/local/lib/node_modules/npm/lib/utils/npm-registry-client/get.js:134:7)
npm ERR! at cb (/usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:31:9)
npm ERR! Report this *entire* log at:
npm ERR!
npm ERR! or email it to:
npm ERR!
npm ERR!
npm ERR! System Linux 2.6.37.6-0.5-desktop
npm ERR! command “node” “/usr/local/bin/npm” “install”
npm ERR! cwd /storage/home/mromero1/TermKitProj/TermKit
npm ERR! node -v v0.5.3-pre
npm ERR! npm -v 1.0.22
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /storage/home/mromero1/TermKitProj/TermKit/npm-debug.log
npm not ok
What version of node are you using? I installed with the latest 4.x stable release and it worked fine. Are you following the instructions verbatum?
I got the same error and I am using node v0.7.1-pre:
sneilan@sneilan-MacBookAir:~$ node -v
v0.7.1-pre
(it says macbookair but it’s an ubuntu machine.)
Same error with npm install here
What an interesting concept. It would be very interesting to see a real linux shell implemented this way.
It’s great to see young projects like node.js pushing innovation.
Fair enough – though in the coolfooture a vt100 hack would be nice. The real quiestion is the coolerfootoorer. That is: will TermKit be freindly to a new generation of “visual” apps that go beyond the command line just like VI did.
In practice, this means: can we embed today’s web-apps into the TermKit workflow as nicely as VI embeds into the VT100+bash workflow.
Finally I get to work installing nodeJS in this way http://groups.google.com/group/logio/browse_thread/thread/b503a3acd03b1c48
Remember that if you make changes in your ~/.profile you must restart your machine to got that changes.
Great! Thanks for sharing this with us. One tiny thing: you don’t need to restart your machine to get it to read the ~/.profile. One option is from your shell you can do:
$ . ~/.profile
and this will read it. If you are in a terminal you can log out and then back in (same thing with X) and that will also reload it. No need for a reboot. That would be windoze
I love the idea of TermKit. I was also thinking the same thing: why are we still staring at plain text…
As of today, the latest version of npm doesn’t work with the latest version of node. So before building npm, you need to checkout the v0.6 branch:
git checkout -t origin/v0.6
Then compile and install.
Error: npm doesn’t work with node v0.7.0-pre
Required: node@0.4 || 0.5 || 0.6
Enough said? Looks like npm need to update their code:( Bypassing the check leads to a segfault.
I’m getting this error now:
sneilan@sneilan-ubuntu:~/build/TermKitProj/TermKit$ node Node/nodekit.js
node.js:218
throw e; // process.nextTick error, or ‘error’ event on first tick
^
Error: require.paths is removed. Use node_modules folders, or the NODE_PATH environment variable instead.
at Function. (module.js:378:11)
at Object. (/home/sneilan/build/TermKitProj/TermKit/Node/nodekit.js:5:8)
at Module._compile (module.js:434:26)
at Object..js (module.js:452:10)
at Module.load (module.js:353:32)
at Function._load (module.js:310:12)
at Array.0 (module.js:472:10)
at EventEmitter._tickCallback (node.js:209:41)