Tuesday, March 18, 2008

Blogging from afar

Ok, this is my first experience using network-type programs to control my desktop back in California. And I have to say, it's quite an interesting experience. My first plan was to enable VNC and SSH, and when I wasn't using the computer, I'd turn off X to consume less power and resources. When I need it, I ssh into the computer and use the "startx" command, and VNC at my pleasure. After some initial testing, I found out that the fool-proofness of ubuntu made that quite difficult. Now, for the first thing, we need some background on runlevels in linux.

There are technically seven runlevels that you can use in linux. Runlevel 0 tells the system to halt. Runlevel 1 is single user mode (which is basically root with limited services). Runlevel 3 is the operating system in a command-line. Runlevel 5 is the operating system with X running. And lastly, Runlevel 6 tells the system to reboot. Runlevels 2 and 4 don't really mean anything. To switch between modes, you use the "telinit " command as root.

So, what I planned to do was run ubuntu in runlevel 3 in the CLI, then when I logged in, run ssh and "startx". When X is started, I could then use VNC to get control of it and use my desktop. The problem is that ubuntu foolproofed the OS and combined 3-5 into X-running. So, I can't run from CLI only. That's not too bad, I guess. I'll just kill X when I'm done, then start it again when I need to. Unfortunately, if you literally "killed X" then it would come right back up to GDM. In order to enter the command-line, you need to stop GDM, which you can do with:
sudo /etc/init.d/gdm stop
This will leave you with a command-line interface. However, I found out that if you do this, "startx" fails. By now, I'm discouraged and wonder if it's really worth the trouble to play around with X like this. I vote no, and leave it the way it is.

So, now, here I am, with X left on, and VNCing into my computer. I have to say that it's nice to be able to have my computer, though the internet connection leaves much to be desired. I'm using UltraVNC on the client (windows) computer, and although it looks entertaining to see your operating system in.... 32 bit color, it's not all that great. In addition, the connection takes a while to update, which gets annoying after a while. However, it's either that, or stay home (actually, the latter isn't a choice because my parents will take me with them anyways). Because of the delay, I found that it's difficult to keep track of IRC and IMing with such a huge latency period. So, I've decided to use ssh for those. I use finch for IMing, which is basically a CLI version of pidgin, and irssi, an excellent IRC client for the CLI, for IRC. So, those are the compromises I've made. Until next time, see ya'll!

No comments: