Adventures in Ubuntu
From Unconscious
Contents |
My notes from Work
I've been using Ubuntu at home since January 2006. The latest release, version 6.06, shows significant improvement, and I thought I would venture to evaluate it at work.
Mark was able to get me a labterm machine, and I was ready to go. I had already downloaded the ISO, which is the same as what used to be referred to as the Ubuntu Live CD. Like Knoppix, you can boot up your generic wintel box with this CD and try out Ubuntu. Once it's running, however, you have the option to install it on your hard drive. Installation was very simple.
The only problem was the display. Ubuntu installs to run as 1280 by 1024 with an 85 Hz. refresh rate. The machine I have is old, and uses an onboard display adapter that is only capable of 1024 by 768 at 70 Hz. Mark found me a display card which I can add to the box, which we expected would most likely support the higher resolution, but it did not. IT's just as well, since I find the lower resolution easier to read, and more flicker free on my cheap little HP flat panel.
The desktop version installs strictly as a desktop. It does come with cron, atd, and anacron installed and running. The earlier version (5.10) did not have any cron like utilities, although one could easily install them.
One of the nicest features of Ubuntu is the Synaptic Package Manager. It's very easy to use and gives me access to a huge amount of tested, verified, and default configured, public domain software for the Ubuntu desktop. Since the desktop version does not install with any server services, I had to install sshd, to enable me to use scp. I also installed Thunderbird, the same e-mail reader/writer I use under MSWin, kalarm, to keep me on track, and gdeskcal which is handy.
I can access the filesystem on any box to which I have a login, and which supports ssh. This is possible because the file browser handles foreign filesystems, via ssh/scp. Once connected it mounts the ssh connection as an external volume.
If anybody wishes to try Ubuntu, I have a CD you can use, or, if you prefer, you can burn a CD from the ISO image in beaker//srv/scott/Ubuntu/. Better yet, you can download the current distro from ubuntu.com.
20061031: Last Friday I upgraded to 6.10 (Edgy), and had a few minor problems, but am happy with it for the most part.
Problems:
- The default number of workspaces went down to two. I found out that one can specify any number of workspaces by right clicking on a workspace icon, in the bottom panel, and selecting preferences. This was only a problem for a little while.
- The top menu panel was full of garbage. Apparently transparency in the menu panel does not work properly with the new display drivers. I suppose I'll need to get a better driver. We'll see how that goes.
Evolution Sucks!
I think I've given Evolution a fair chance to redeem itself. Evolution is supposedly the next 'evolutionary' step up from Groupwise. Hence the name. Yes, Evolution is a Novell product.
I first tried Evolution at home under Ubuntu 5.10. It could not deal with the sbcglobal/yahoo eamil servers, which require me to login as scott.herman@sbcglobal.net. No matter, I tried to use it, in concert with GPilot to handle my Palm pilot stuff. Alas, that didn't work either. GPilot blew up whenever I tried to hotsync my old M505, which appeared to be too old for it. Nevertheless I tried again with my new TX, but that didn't fly either.
When I upgraded my home linux desktop machine to Ubuntu 6.06, I thought I'd give it another chance. Hoever, Evolution still could not handle my e-mail address login, and GPilot still barfed on hotsync.
After I did a fresh Ubuntu 6.06 install on this old labterm box, I thought I'd give Evolution another chance in a simpler e-mail environment. It worked well for a couple of days, but then, totally hosed itself on a connect timeout. Neither restarting the program, or rebooting the system seemed to help. Apparently Evolution is MS Windows quality software. Fortunately for us, and unfortunately for Mr. Bill, there is better stuff available.
I must say, I was not sad to see it go. The UI seemd rather bloated, and fairly useless. I missed the ease of use and many of the features that I had grown accustomed to in Thunderbird. So, I installed Thunderbird, and I am quite happy with it. IMHO: Thunderbird is a much better e-mail client than evolution or eudora.
But there was a problem. Mailto: links, when clicked, would open a new e-mail message in Evolution instead of Thunderbird. Here's how to fix that...
- enter
about:configin the URL/address bar at the top of the Firefox window - filter for
mailto - make sure that “network.protocol-handler.external.mailto” is set to true (double-click to change)
- add a new preference buy doing the following:
- right-click on the window
- choose New, String
- prefence name is
network.protocol-handler.app.mailto - value is
/usr/bin/mozilla-thunderbird
Now if only I could find the old familiar firefox and thunderbird icons. These new ones are crap.
HP friendly X-terminal
The gnome terminal, which is the default terminal application in Ubuntu, is not very good as an HP teminal, since it attempts to display the prompt control characters. However, xterm, by virtue of it's VT102 emulation, serves reasonably well in this capacity. Since I like to use differently colored backgrounds in the terminals of my many remote sessions, to readily identify them, I've set up a bunch of xterm invocation scripts in my own bin folder.
There were also a couple of other major issues that rendered xterm suboptimal for me. I presently have found at least partial solutions to these problems. It's enough, so that I can continue.
Session Titling
The session title, that is, the text in the top bar of the window, and the text of the minimized window in the bottom panel, is something that I had always taken for granted. After a few rounds of opening every xterm window to find the one I needed, I decided that fixing this would be a worthwhile investment.
It seems that the default shell configuration under Ubuntu sets the xterm title bar to the prompt everytime the prompt is displayed. While this might be useful locally, it becomes a real PIA when we're dealing with remote sessions on hosts like Mom and Pop. The way that Ubuntu does this is through the use of a CI variable named PROMPT_COMMAND, which is a command that is executed everytime a prompt is displayed. Thus everytime a prompt is displayed the session title is updated.
In order to change the session title, one must change $PROMPT_COMMAND. Trying to do this in a script doesn't work, because the script forks it's own instance of the shell, with it's own variable name space where $PROMPT_COMMAND is set. Being a linux newbie, and not having found another way around this, I explicitly invoke the assignment of PROMPT_COMMAND, whenever I want to change a session title. It's clumsy, but it works. Here's an example. <verbatim> scott@scott-linux:~/bin$ PROMPT_COMMAND='echo -ne "\033]0;Dev\007"' </verbatim>
The escape sequences are echoed to xterm which iterprets them and sets the text within them to the session title. Oh, If I could script this into the files which open my variously colored xterm sessions.
Xterm and the Clipboard.
Xterm does mark, copy, and paste. So I expected to be able to paste my copied text into browser input boxes and such. I was disappointed. Apparently Xterm employs a number of selection buffers, but none of them are, by default, the Clipboard, which is the common buffer used by firefox, thunderbird, Vim, and other common applications.
Afer some exhaustive research on the web, I found a way to configure the mouse action bindings in a way that allows the xterm selection to be copied to the common clipboard buffer on the shift-right-click action. I saved this configuration in my local .Xresources file, which I thought would be read at startup of every local instance of xterm. That did not work. Merging it with the current X resources database did work though. This is how I did it.
xrdb -merge .Xresources
Now, when I shift-right-click at the end of a block of selected text, that text gets copied to the Clipboard buffer, and I can paste it into firefox or thunderbird. Here are the contents of my .Xresources file.
XTerm*VT100.Translations: #override
Shift<Btn1Down>: select-start()
Shift<Btn1Motion>: select-extend()
Shift<Btn1Up>: select-end(CLIPBOARD)
Shift<Btn2Up>: insert-selection(CLIPBOARD)
Shift<Btn3Down>: start-extend()
Shift<Btn3Motion>: select-extend()
Shift<BtnUp>: select-end(CLIPBOARD)
<Key>Home: string("\033[1~")
<Key>End: string("\033[4~")
*ttyModes: erase ^H
700/2392 Emulation.
I have also found something called xhpterm. It is quite old, no longer actively maintained, but it works. It does block mode, so it can be used for xdb and NMMGR. However, it is fairly non-configurable. It accepts a few command line arguments, one of which is the host name. It could definitely benefit from a friendly configurable front-end.
Here is what it says about itself at startup if no commandline parameters are passed.
# xhpterm
(null): Window manager didn't set icon sizes - using default.
(null): PseudoColor visual at default depth is not default visual!
Continuing anyway...
Missing hostname
xhpterm version A.01.04
Usage: xhpterm [opts] [-rlogin] <hostname>
or: xhpterm [opts] -tty <devicefile> -speed <cps> -parity {E|O|N}
opts:
-li|-lo|-lio - specify input|output logging options
-lp - logging output has a prefix
-termid str - override terminal ID [X-hpterm]
-clean - right-click exit disabled
-f file - destination for logging (default: stdout)
-a file - read initial commands from file.
-df - start with Display Functions enabled.
-font fontname - override default font with fontname.
Mounting beaker//srv
This was cake. I simply added the line shown below to /etc/fstab, and srv is mounted on startup. I access it as /mnt/srv-beaker.
beaker:/srv /mnt/srv-beaker nfs rw,hard,intr 0 0
Virtual Workspaces
The Gnome desktop by default is configured to use 4 virtual workspaces or desktops. The virtual workspace map appears in the right hand side of the bottom panel. You can switch virtual workspaces by clicking the desired workspace in the map. Alternatively, you can use !Control-Alt-RightArrow and !Control-Alt-LeftArrow to navigate the workspaces.
Gnome Desktop Keyboard Shortcuts
Here are a few useful keyboard combinations:
* alt tab switch between applications (like Windows) * control alt arrows travel between workspaces. * control - in GNOME terminal make the font smaller. * control + in GNOME terminal make the font larger. * shift control n in GNOME terminal, open a new terminal * control left-click in GNOME terminal on a link to open it in Mozilla. * control left-click in Mozilla on a link to open it in a new window. * control n in Mozilla, open a new browser window. * control alt delete bring up the logoff menu. * control alt backspace kill off GNOME and restart it (only use if it's hung).
Code editing: GVim
I tried using Cream, which is billed as GVim with a real GUI interface. However, it was too much GUI and too little GVim. So now I'm just using GVim, which I'm becoming accustomed to. I haven't figured out how to make it do all the things, which I miss from Codewright, but I'm learning.
Differencing
One thing that GVim does have, which I found out from Rodion, is a nice differencing GUI and display. Open the reference file and then open the subject file to compare it against, using the GUI menu: *File -->> Split Diff with...*
Column Selection
- Shift-v selects by line; use the arrow keys to extend, or hit Shift-V-LeftButton to get mouseable line by line selection.
- Ctrl-v selects by column; use the arrow keys to extend, or hit Ctrl-v-LeftButton to get mouseable column selection.
Tab stops
To set VI for our standard of 3 spaces per tab stop...
:set expandtab # express tabs as one or more spaces; soft tabs :set ts=3 # each tabstop is 3 spaces :set sts=3 # each soft tab stop is 3 spaces. :set shiftwidth=3 # indentation set to 3
In fact here's my entire .vimrc
set number set sts=3 set ts=3 set shiftwidth=3 set expandtab filetype plugin on au BufRead,BufNewFile *.c set filetype=c au BufRead,BufNewFile *.h set filetype=c au BufRead,BufNewFile *.pl set filetype=perl au BufRead,BufNewFile *.pm set filetype=perl syntax on
Vim.org is a very useful resource.
