Multiple SSH terminals in Tiled Windows

Posted by: JDS

Managing SSH sessions on multiple, simlarly-configured servers is easy using ClusterSSH. But I had some issues that were fixed with some cssh configuration tweaking.

ClusterSSH is pretty cool. Really. But I needed to tweak the default config a little before it worked perfectly for me. This was all presentation tweaking -- windows were overlapping and some text was not printing to the screen, as well as being to teensy.

Note that you can get a default config with 'cssh -u > ~/.csshrc'

~/.csshrc.default

# Configuration dump produced by 'cssh -u'
auto_quit=yes
comms=ssh
console_position=
extra_cluster_file=
history_height=10
history_width=40
ignore_host_errors=no
key_addhost=Control-plus
key_clientname=Alt-n
key_paste=Control-v
key_quit=Control-q
key_retilehosts=Alt-r
mouse_paste=Button-2
rsh_args=
screen_reserve_bottom=40
screen_reserve_left=0
screen_reserve_right=0
screen_reserve_top=0
show_history=0
ssh=/usr/bin/ssh
ssh_args= -x -o ConnectTimeout=10
telnet_args=
terminal=/usr/bin/xterm
terminal_allow_send_events=-xrm '*.VT100.allowSendEvents:true'
terminal_args=
terminal_decoration_height=10
terminal_decoration_width=8
terminal_font=6x13
terminal_reserve_bottom=0
terminal_reserve_left=0
terminal_reserve_right=0
terminal_reserve_top=0
terminal_size=80x24
terminal_title_opt=-T
title=CSSH
unmap_on_redraw=no
use_hotkeys=yes
window_tiling=yes
window_tiling_direction=right

~/.csshrc.tweaked

# Configuration dump produced by 'cssh -u'
auto_quit=yes
comms=ssh
console_position=
extra_cluster_file=
history_height=10
history_width=40
ignore_host_errors=yes
key_addhost=Control-plus
key_clientname=Alt-n
key_paste=Control-v
key_quit=Control-q
key_retilehosts=Alt-r
mouse_paste=Button-2
rsh_args=
screen_reserve_bottom=40
screen_reserve_left=0
screen_reserve_right=0
screen_reserve_top=0
show_history=0
ssh=/usr/bin/ssh
ssh_args= -x -o ConnectTimeout=10
telnet_args=
terminal=/usr/bin/xterm
terminal_allow_send_events=-xrm '*.VT100.allowSendEvents:true'
terminal_args=-bg lightyellow -fg black
terminal_decoration_height=10
terminal_decoration_width=8
terminal_font=-*-courier-medium-r-*-*-14-*-*-*-*-*-*-*
terminal_reserve_bottom=10
terminal_reserve_left=10
terminal_reserve_right=10
terminal_reserve_top=30
terminal_size=80x24
terminal_title_opt=-T
title=CSSH
unmap_on_redraw=no
use_hotkeys=yes
window_tiling=yes
window_tiling_direction=right

diff -u .csshrc.default .csshrc.tweaked

--- .csshrc.default 2008-11-10 14:32:53.000000000 -0500
+++ .csshrc.tweaked 2008-11-10 14:20:23.000000000 -0500
@@ -5,7 +5,7 @@
 extra_cluster_file=
 history_height=10
 history_width=40
-ignore_host_errors=no
+ignore_host_errors=yes
 key_addhost=Control-plus
 key_clientname=Alt-n
 key_paste=Control-v
@@ -23,14 +23,14 @@
 telnet_args=
 terminal=/usr/bin/xterm
 terminal_allow_send_events=-xrm '*.VT100.allowSendEvents:true'
-terminal_args=
+terminal_args=-bg lightyellow -fg black
 terminal_decoration_height=10
 terminal_decoration_width=8
-terminal_font=6x13
-terminal_reserve_bottom=0
-terminal_reserve_left=0
-terminal_reserve_right=0
-terminal_reserve_top=0
+terminal_font=-*-courier-medium-r-*-*-14-*-*-*-*-*-*-*
+terminal_reserve_bottom=10
+terminal_reserve_left=10
+terminal_reserve_right=10
+terminal_reserve_top=30
 terminal_size=80x24
 terminal_title_opt=-T
 title=CSSH

Ubuntu Continuing Frustrations

Posted by: JDS

A general list of frustrations. This list is specific to Ubuntu Hardy Heron and may change in the future (nor not be applicable in the past).

I was reading. The Web. Stuff about Linux. I read a lot about Linux. One thing I definitely notice, of late, is the strong wave of frustration and consternation appearing across the Linblogosphere. As more and more people are using Linux, the demand to create a USABLE and NOT BROKEN Operatiing System increases. Some would argue that Linux is usable and not broken. That may be true for some segments -- in the server and embedded arenas, for example. But I actually use Linux as my main -- nay, my only -- Desktop. It would be nice if it actually worked WELL. As it is, it just works. But unfortunately not in the iconic "Just Working(TM)" sense of the term. In the "just, as in barely" sense.

I often see the red herring argument, "Windows doesn't work either!" What difference does that make, really, how well or not well Windows works? I don't user Windows! It really has no bearing on my use of Linux, and Windows not working one way or another does not help fix my frustrating Linux Desktop.

One blog I was reading in particular that hits on the issues DEAD ON was that of Elliot Hughes, some programmer guy. He's probably done something notable but I don't know what the fuck it is. But his Linux Suckage series is DEAD ON. See that? ALL CAPS. That must mean it is REALLY REALLY DEAD ON. (See? ALL CAPS AGAIN!!)

http://elliotth.blogspot.com/2008/09/desktop-linux-suckage-index.html

I think my frustration at this point can be summed up like this: Ubuntu has been continuously improving. Desktop Linux has been continuously improving. Any regressions -- ANY -- are not just "bumps in the road" but are simply unacceptable. In the interest of blogospheric wanking, here are my frustrations, in no particular order. I'll try to specify the Desktop Environment (DE) and Application, as appropriate. Maybe someday some Linux UI devs will actually listen to what Users want instead of what they want. But probably not ever.

  • [Gnome,Panel Menu] Still can't drag an executable or script to the menu. Have to use Menu Editor

TrueCrypt on Linux - How to Create an ext3 Formatted Container

Posted by: JDS

TrueCrypt is an excellent piece of software but the docs are all Windows-oriented. You can, as it turns out, create an ext3-formatted virtual partition (or "container" or "encrypted file volume") but it is not documented on TrueCrypt.org.

Copied from http://ubuntuforums.org/showthread.php?t=149561&page=6

Summary

First, Install TrueCrypt. I'm using version 6.0a. Use the GUI to useful creating an encrypted volume. Choose "FAT" formatting. Unmount, then format the virtual disk as ext3. Release truecrypt, then restart truecrypt and remount the drive.

Details

  1. Create and mount your new container, type 'df | grep truecrypt1' to see what virtual device is used (in my case I see "/dev/mapper/truecrypt1 495588 10545 459456 3% /media/truecrypt1" -- the device is /dev/mapper/truecrypt1).
  2. Then type 'sudo umount /media/truecrypt1' to unmount the drive
  3. Now, to format it type: sudo mkfs -t ext3 /dev/mapper/truecrypt1
  4. Finally type 'truecrypt -d' to release truecrypt
  5. Now mount it using the GUI and verify it is ext3 formatted.

One-liner: Converting a Text File to Unicode on the Command Line

Posted by: JDS

Here it is, a one-liner. Gotten from this very ugly website: http://www.kriyayoga.com/love_blog/post.php/224
iconv --from-code=ISO-8859-1 --to-code=UTF-8 ./oldfile.htm > ./newfile.html

One Liner: dynamically enabling and disabling one's second CPU

Posted by: JDS

Linux SMP kernel lets you turn off the second CPU if you want.
jeff@frogpad:~$ ls -l  /sys/devices/system/cpu
total 0
drwxr-xr-x 6 root root    0 2008-06-11 08:01 cpu0
drwxr-xr-x 3 root root    0 2008-06-11 09:00 cpu1
drwxr-xr-x 2 root root    0 2008-06-11 09:00 cpuidle
-rw-r--r-- 1 root root 4096 2008-06-09 11:27 sched_mc_power_savings
jeff@frogpad:~$ cat  /sys/devices/system/cpu/cpu1/online 
0
jeff@frogpad:~$ sudo echo 1 > /sys/devices/system/cpu/cpu1/online 
bash: /sys/devices/system/cpu/cpu1/online: Permission denied
jeff@frogpad:~$ sudo sux -
root@frogpad:~# echo 1 > /sys/devices/system/cpu/cpu1/online
root@frogpad:~# 

So, it looks like you have to actually be logged in (or su'ed in) as root for this to work -- sudo doesn't cut it. Don't know why. Also note that I use 'sux' instead of 'su'.

Linux is Better Than Windows

Posted by: JDS

Alright, so, I'm a little biased, yes. But I just hate seeing articles that are plainly wrong or misleading. And there are a lot of them.

So, I posted this long rant to some guy's website about why Linux is better than Windows and how he was wrong wrong wrong. I thought I would save it here, and tweak it into an article.

http://coconuter.blogspot.com/2008/04/windows-vs-linux-comparison-and-review.html

Anyway, he presented a couple of common misconceptions about Linux. I think the most common one is that whole command-line thing. Here are my comments posted to his site:

Howdy. Linux is not harder to use than Windows, it is just DIFFERENT to use than Windows, and to some people that equates to harder. Linux is easier to use for people who have never used a computer before than it is for long time Windows users, because of the difference. Also, there are some common misconceptions in your article that I would like to dispell:

1) Linux is not harder to use than Windows, just different to use (covered that already)

2) You NEVER EVER EVER need to use the command line with Linux. NEVER. This is a leftover impression from old Linux days when this was true. It is, simply put, false and misleading. You do, however, have the option of using the CLI, if you want.

3) Linux has better out-of-the box driver/hardware support than Windows. Ever try connecting to a wired network after just installing WinXP? Can't do it. Need to insert driver disk. Not on Linux, though, your NIC will be up and running immediately. And that is just one example.

4) With all of the available free software for everyday tasks, and nearly impervious to malware, Linux is much better than Windows for the average user.

Linux is NOT good for a lot of people, though! Gamers, people with specifc software needs like niche market software or other Windows-only apps are better off using Windows.

"Grandma" though, and average users like her, using office apps, email, and web, primarily, are BETTER off using Linux.

Okay, seeya! Bye!

Okay, so, yeah, sticking in a paragraph that makes it look like I am not biased -- the Windows is good for some people paragraph -- is maybe a little obvious bias-cover-up. But whatchagonnado? When one finds something that one loves, one wants to tell the world, doesn't one? But really, the part that irks me the most about Windows users' comparisons of Linux is the generally outdated and incorrect comparisons.

I will admit, Linux can be a bit confusing. The vast number of choices is really quite overwhelming. So from here on out, I'll try to stick to comparison by using a particular distro vs Windows, and not "Linux" which really covers a lot more territory and at the same time is a lot more granularly specific than the term "Windows".

So for future posts, it is going to be LinuxMint vs Windows. I was going to go with Ubuntu, but as far as comparisons of interest to "averege" users go, LinuxMint levels the playing field even more than Ubuntu, with its out-of-the-box software choices.