Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Unix-like virtual shell inside browser (cb.vu)
49 points by r11t on Jan 24, 2010 | hide | past | favorite | 25 comments


Very interesting. It seems that each visitor is in a self contained environment. I made a simple HTML called "test.html" that I could access from http://cb.vu/test.html. This file was only visible in my own browser,


Indeed, there is minimal communication between your browser and the server. Nearly everything happens locally in your browser. Many responses from the commands you can use are canned. Watch the source code to see how it's done ;-)


the password for root is...root

Interestingly, I ran rm -rf / as root, and it acted like it wiped out everything. reboot made it act like it was rebooting, and refreshing the page showed "you broke it!" until I deleted the appropriate cookies. Fun!


If you refresh the page 4 times, the page shows:

You can use "fortune" you know...


This has been built using terminal.js : http://www.masswerk.at/termlib/index.html

This sort of in browser shell seems to be useful for building stuff like "MongoDB Browser Shell" http://mongo.kylebanker.com/


I wish I knew about terminal.js before I started working on an implementation of a shell in the browser: http://tsh.ashafa.com/

I needed more than the traditional input text type or textarea for input I saw all the time while I was researching a solution.


I've been working on something like this as well, and your approach is closer to what I've done than terminal.js. To me, it makes more sense to pass the commands back to the server for parsing and handling - let JS just be the display handler. Oh, I like the tab completion stuff too.

Your source code indicates it may have an Open Source license on it. Do you have the raw source available somewhere? Happy to share what little I have done so far.


Thanks and yes I will put the entire source on github as soon as I clean it up. The current un-minified javascript can be found here:

http://tsh.ashafa.com/static/global.js

It was really a quick experimental hack that turned into something worth dedicating a little more time to. Not my best javascript at all.


Trying the traditional bash fork bomb gives a rather fun screen. Try entering the following

  :(){ :|:& };:


Well that was fun :P "If problems continue, install linux"


I hope Chrome OS includes something like this. Ssh support would be especially useful.


Google Native Client opens up a world of possibilities for client-side apps that still live within the Browser > Tab > DOM.

I'd mostly just want a TTY w/ OpenSSH, VNC, and RDP. Usermode Linux would be nice too.


Surprised vi works, but hitting backspace made my browser go back in the history.


Backspace doesn't work in chrome 4.0.266.0 (r33992)


Ubiquity allows a similar interface, at an arguably better abstraction level: https://mozillalabs.com/ubiquity/


Hey, I wanted to meet up with you in Boulder (Qualcomm interview guy). I couldn't find your email, so I'm spamming all your comments, which is probably against the law. Please email me at ebisumaru@gmail.com, or read my longer comment: http://news.ycombinator.com/item?id=1078343


Doesn't work in iPod! :(

It must be because you need an input or text area to make the virtual keyboard to appear.


If you want to try, type "invaders" (without the quotes), and enjoy...


Seriously cool! Thanks Colin, for sharing this with the world :-)


Pretty cool.. I did mostly play snake thought.


And so the circle is complete.


Try invoking ed =).


Looks like you can even use vi.


or sudo


please port lynx :)




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: