Sunday, December 2, 2007

Happy Linux Thoughts

I'd just like to post a link to a great linux blog:

HappyLinuxThoughts

Monday, September 17, 2007

Linux Blog Online

I'd just like to tell everyone about this blog - it's informative, interesting and funny!

enjoy!

Monday, July 23, 2007

Scrambled Xvnc Keyboard Mapping on Ubuntu Feisty

This is just a bug workaround:

If you log in through Xvnc (I use it with xinetd) and see the gdm screen, log in to gnome fine, but then after that your keyboard comes out scrambled, here's a quick and dirty fix (you'll have to do this from a console that is working, maybe SSH?):

sudo mv /usr/share/xmodmap/xmodmap.us /usr/share/xmodmap/xmodmap.us.bkup

Of course, this only works if you were using the US keyboard layout. This is not ideal, but it gets the job done in this particular case.

The fix for this is apparently already in the upstream code and should be available in the next gnome update from Ubuntu.

Thursday, July 19, 2007

Resolve Windows Machine Name

First, add "wins" to the end of your hosts: line in /etc/nsswitch.conf.

Second, run apt-get install winbind.

This will allow your DNS to resolve "windows" network-neighborhood style machine names (Samba, SMB, Network Name Resolution)

Tuesday, May 22, 2007

iGoogle is not My Google.

This is not strictly open source related, but it is in the interests of most Internet users, so:

I'm surprised that no one has spraypainted an "i" in front of their logo on their building after what they've done to Google Personalized Home.

The consensus seems to be that everyone tolerated Google Personalized Home because it gave us some good toys to play with, but as soon as they changed the name to iGoogle that was one step too far. Our favorite search engine now looked tacky and obviously is being driven by someone from the traditional side of Internet marketing instead of the normal trendy Google-type folks.

Well, I came up with a hack that will remove iGoogle, sort of. At first, I tried to remove the new iGoogle Logo, but to no avail. I tried everything. I even replaced the header section with a search box module. None of it felt right. Even if I switched out the logo, the best I could do was use past holiday logos, no thanks! Maybe this hack will be for you:

The reason I use iGoogle is to look at the modules on occasion. I want to use "Classic" search, however. So I came up with a URL that will take you to iGoogle *once*, and immediately unset the cookie value that keeps you at iGoogle. So, I made a Bookmark in my Bookmark Toolbar Folder called "iGoogle Once" and pointed it to this URL:

http://www.google.com/ig?sa=p&pref=ig&pval=1&q=/webhp

If you want to give it a whirl, just try it here. You can see your iGoogle page, with all the modules, and you can even search, and then if you go back to Google.com it takes you to Google Classic, instead of "remembering" that you selected iGoogle and throwing you back into it.

There is one caveat: You must click "Classic Home" once before this will work, and if you click "iGoogle" on the top of the home page, it will keep you on iGoogle until you click Classic Home again. In other words, you must only use the "iGoogle Once" bookmark to visit iGoogle lest you become iTrapped.

I hope this was useful!

Monday, April 23, 2007

Getting rid of the tooltips in the Gnome panel

Tooltips in the panel seem pointless to me, they hardly ever tell you more information that you can already gather by just reading the menu entry. If you are using Compiz or Beryl and have menu effects turned on, all those tooltips popping up and sparkling everywhere could get old very fast.

Here's how to get rid of them:

Open a terminal and type gconf-editor. This should open the Gnome Configuration Editor. Navigate to Apps > Panel > Global and uncheck tooltips_enabled. Enjoy your tooltip-free Gnome Panel!

Sunday, February 25, 2007

Operating Online

After looking at the new Google Apps, I started thinking of the future of online applications, and where you could go if you had an operating system designed to take advantage of that system.

What if each user owned one static ip and a "home server". This server would be built into their computer, and would not require any major set-up. The server would be used to store data from online applications and serve them out again when asked for by the user. The other option is to create centralized data-servers that you can rent to hold your data. (A distinct up-side to keeping your files on a local server is that you can access them even if your internet connection stops working.)

At this point, the only thing required of your OS is to run a web-browser and possibly store, send and receive files. By freeing up the need for excessive amounts of CPU, hard drives, and video, computers could be made smaller and cheaper and more portable. These "portals" could be set up in a library or a school at which point a user could access their files in an environment that would be almost indistinguishable from their home computer. Also, since it all runs through a basic browser, you could access your files ad applications from a standard computer as well.

I'm excited to see where this type of technology could lead, although I don't see being able to edit files that push 100mb over the net any time soon.

Saturday, February 24, 2007

Watching Television on the Internet

After making the switch to Desktop Linux, I have finally got around to figuring out what to do for entertainment. Getting DVD media to play was a breeze, perhaps because it seems to be the first thing anyone asks after getting their OS up and running. Of course, we should do our best to push for open formats to replace DVD, but in the real world a little bit of "closed media" is likely to keep people from actively using Open Source everything-else. If a computer can't fulfill the basic human need for entertainment, it won't last long.

My next place to turn was to Television programs. There are a few series that I have enjoyed in the past, and I just gave away my 23" television to free up some space in the apartmet, leaving me with a 13" TV that I have decided only to use for 8-bit Nintendo. Television over the Internet would be a sweet alternative. Some shows are available for "free" viewing on their official websites, others are not.

The shows I think I'm interested in viewing right now are: 24 (Fox), LOST (ABC), The O.C. (Fox), The Office (NBC), Prison Break (Fox) and Veronica Mars (CW).

I will chronicle my level of success in this endeavor here:

I asked my brother "So how does one watch TV on the Internet?" and off the top of his head he referred me to ABC's website. I want to say "well done" to ABC for their episodes available online. They have done a decent job and it seems like Flash player is all that is required, making it a trivial matter to watch their content in Firefox on Linux. This takes care of my need for LOST, and opens up the possibility to some new programs which at the moment don't look very compelling for me, but may be possibilities. The first episode I watched had the same commercial played in every single break. I wonder about the effectiveness of this, and would have rather seen three separate commercials, even if they were all for the same product, simply because watching the same thing three times within an hour is not more productive than seeing it once.

Next I turned to Fox. Obviously I'm a fan of Fox, I have my eye on three of their shows, and I have purchased more Fox DVD box sets than any other show. In fact, it may well be true that every DVD box set I own is produced by Fox. The programs they put out seem to be of a high quality. I looked up the web site for Fox, clicked on Prison Break, and saw an inviting link that I may be able to watch full episodes for free. It directed me to a MySpace page belonging to Fox, which was a bit surprising: I thought MySpace was home to teenagers, not corporations. I observed right away that the site wasn't as clean and streamlined as ABC's, but then I got confronted with a major problem:
We're sorry, but only the following operating systems are supported at this time:

Microsoft Windows 2000/XP (not Vista)
(Intel) Apple Macintosh OS X or later
(PPC) Apple Macintosh OS X or later

Please check back soon for support for other operating systems.
It seems that Fox also has its programs available on iTunes, but I hear they will only play on the newer iPod devices, and the free iTunes software is only supported on Windows and Macintosh. I read an interesting article about "DVD-Jon" and some of his buddies writing some software that would let you purchase songs at the iTunes store using Linux, but I think it only worked for music, and furthermore, it was abandoned and does not work with the current iTunes Store. I would pay Fox directly to watch these shows if I could. So it sounds like I may have to wait until the current seasons of 24, The O.C., and Prison Break are released on DVD (if they are.)

NBC doesn't offer any apparent way to play full episodes from their websites, and if they are offering them for viewing in other venues they are not making this obvious by advertising them in any way. They do seem to offer short video clips and deleted scenes, etc., but I'm not one for spoilers. I will investigate at a later time to see if they offer them through another outlet, but except for my academic curiosity to investigate this at a later time, they would have lost my viewership.

The CW has a full episode feature, which links to this page, but the center area of the page just remains a white box and selecting a series from the right-hand list doesn't seem to do a thing. Right clicking on the white reveals that it is a Flash player. I don't know why it is broken, but I will presume they aren't supporting the Linux version of Flash (I don't know how that is possible), but I will give it another shot later in case they are just temporarily down.

So it looks like ABC wins. Stay tuned for an upcoming article on why even their solution isn't the best choice and why Television producers need to make some decisions in the upcoming years.

Monday, February 5, 2007

Why do we sudo in Ubuntu, and who is Charlie Root?

It is a tradition in Linux and other Unix-like operating systems to have a superuser account named root. root is named such because "he" has full access to everything in the filesystem from the root directory "/" on down the line (whereas most ordinary users only have limited access with full access in their home directory alone.) root has a home directory too, named after himself, found at /root, not to be confused with "/" which is also called the root directory. :-) You'll notice that on most systems his home directory is not in the same place as the other user's home directories (usually /home/yourname).

In some Linux distributions, you log in to the root account frequently to perform administrative tasks on the machine, but in Ubuntu and a few other modern distros, this is not the case. Instead, we use a tool called sudo.

sudo means "switch user and do." There is another command called su (switch user), which can be used to switch to another user and open a shell, which is great if you know their password (which su prompts for), but on Ubuntu you aren't supposed to know the root password. That's right, that is how it is designed, and you should not change it unless you have a really good idea of what you are doing. The reason you don't know the root password on Ubuntu is that you don't need it at all because the admin group to which all "Administrator" users belong is listed in the sudoers list (/etc/sudoers) If I needed to change the owner of a file (hypothetically called myfile), and I need root access in order to do this, I would type:

sudo chown jeffd myfile

I will be prompted for a password. This is not the root password, but your own password. It is requested as a security precaution before proceeding to run the program with root access. After entering the password, the command "chown jeffd myfile" is executed as root, after which control returns to your ordinary user (subsequent commands are not executed as root, although if you sudo again within about five minutes, the Ubuntu defaults are set to not ask you for the password again.)

So what if you need to do several commands as root? In all the other Linuces, you just log into a shell as root. Well, if you really want to do this, you can either type sudo bash (to open the bash shell) or sudo su root (to open root's default shell). Either way, you will enter your own password and then be presented with a root shell prompt. When you are done with the shell prompt, type exit to return to your own shell. Do not forget this step! It is never a good idea to run applications or compile things as root. You should perform these tasks as your own user. In fact, some newer Linux software is designed so that it will actually refuse to compile or run as root, giving you a gentle slap on the wrist.

Again, please do not change the root password. Doing this will only weaken the security of your system, and make it easier for you to get into bad administrative habits.

If you are using gnome and would like to launch a graphical application as root you use gksudo instead of sudo, but it works the same way aside from its name and the way that the password prompt appears in a window.

Oh, one last thing: I mentioned Charlie Root in the subject. This is the full name sometimes given to the root user, when a first and last name are required (for example, in the address headers of administrative emails automatically generated by the system and sent to the root account.) I think this name is only used on BSD Unix systems, (FreeBSD, OpenBSD, and NetBSD), so you may not ever see it in Ubuntu, but because I was familiar with administering FreeBSD servers, it is still the name I affectionately call the root user by. Here's some more Charlie Root trivia.

Linux Kernel Modules

This brief post is designed to explain what a Loadable Kernel Module is.

In the beginning, there was the Linux Kernel. Linus Torvalds designed it so that the code you needed to operate the base devices on your system would be compiled into the kernel, after all, as Open Source Software, everyone had the capability (if not the skill) to recompile the source as needed.

Around 1995, Loadable Kernel Modules (LKM's) were introduced into Linux. While not entirely synonymous, these are about the closest things in Linux to what windows users would know as Device Drivers (something like Windows .vxd's)

An LKM is a separately compiled piece of source code, which is linked against the kernel you are running so that it is "pluggable" and can be enabled or disabled even while the base Linux kernel is running. To see what Kernel Modules you have installed you can type lsmod at a shell prompt. Here's what I see on my Dell Inspiron 6000 notebook (this list is a little long, but just skim it quickly so you get the idea of what is there):

Module Size Used by
binfmt_misc 13448 1
rfcomm 42260 0
l2cap 27136 5 rfcomm
bluetooth 53348 4 rfcomm,l2cap
xt_limit 3840 2
xt_pkttype 2944 1
xt_tcpudp 4480 28
ipt_LOG 8320 11
xt_state 3328 6
iptable_mangle 3968 0
iptable_nat 8964 0
iptable_filter 4224 1
ip_conntrack_irc 7920 0
ip_nat_ftp 4736 0
ip_nat 19884 2 iptable_nat,ip_nat_ftp
ip_conntrack_ftp 8816 1 ip_nat_ftp
ip_conntrack 53088 6 xt_state,iptable_nat,ip_conntrack_irc,ip_nat_ftp
,ip_nat,ip_conntrack_ftp
nfnetlink 8088 2 ip_nat,ip_conntrack
ip_tables 15204 3 iptable_mangle,iptable_nat,iptable_filter
x_tables 16132 7 xt_limit,xt_pkttype,xt_tcpudp,ipt_LOG,xt_state,i
ptable_nat,ip_tables
speedstep_lib 5764 0
cpufreq_userspace 5408 0
cpufreq_stats 7744 0
freq_table 6048 1 cpufreq_stats
cpufreq_powersave 2944 0
cpufreq_ondemand 8876 0
cpufreq_conservative 8712 0
video 17412 0
tc1100_wmi 8324 0
sbs 16676 0
sony_acpi 6412 0
pcc_acpi 14080 0
i2c_ec 6272 1 sbs
i2c_core 23424 1 i2c_ec
hotkey 11556 0
dev_acpi 12164 0
button 7952 0
battery 11652 0
container 5632 0
ac 6788 0
asus_acpi 17688 0
ipv6 271136 18
sg 37020 0
sd_mod 22528 0
lp 12964 0
tsdev 9152 0
psmouse 41352 0
usb_storage 74816 0
libusual 16912 1 usb_storage
serio_raw 8452 0
snd_hda_intel 20244 2
snd_hda_codec 164480 1 snd_hda_intel
8139cp 24960 0
8139too 29056 0
ati_agp 10636 0
agpgart 35016 1 ati_agp
shpchp 42144 0
pci_hotplug 32828 1 shpchp
parport_pc 37796 1
parport 39368 2 lp,parport_pc
usbhid 45280 0
pcspkr 4352 0
mii 6912 2 8139cp,8139too
snd_pcm_oss 47232 0
snd_mixer_oss 19328 1 snd_pcm_oss
snd_pcm 84356 3 snd_hda_intel,snd_hda_codec,snd_pcm_oss
snd_timer 25348 1 snd_pcm
snd 58116 10 snd_hda_intel,snd_hda_codec,snd_pcm_oss,snd_mix
er_oss,snd_pcm,snd_timer
soundcore 11232 1 snd
snd_page_alloc 11528 2 snd_hda_intel,snd_pcm
evdev 11392 1
ext3 142344 1
jbd 62100 1 ext3
ehci_hcd 35208 0
ohci_hcd 22788 0
usbcore 134656 6 usb_storage,libusual,usbhid,ehci_hcd,ohci_hcd
ide_generic 2432 0
ide_cd 33696 0
cdrom 38944 1 ide_cd
ide_disk 18560 3
atiixp 7824 1
generic 6276 0
sata_sil 11016 0
libata 74764 1 sata_sil
scsi_mod 144392 4 sg,sd_mod,usb_storage,libata
thermal 15624 0
processor 31560 1 thermal
fan 6020 0
ehci_hcd 35208 0
ohci_hcd 22788 0
usbcore 134656 6 usb_storage,libusual,usbhid,ehci_hcd,ohci_hcd
ide_generic 2432 0
ide_cd 33696 0
cdrom 38944 1 ide_cd
ide_disk 18560 3
atiixp 7824 1
generic 6276 0
sata_sil 11016 0
libata 74764 1 sata_sil
scsi_mod 144392 4 sg,sd_mod,usb_storage,libata
thermal 15624 0
processor 31560 1 thermal
fan 6020 0
fbcon 41376 0
tileblit 3840 1 fbcon
font 9344 1 fbcon
bitblit 7296 1 fbcon
softcursor 3328 1 bitblit
vesafb 9244 0
capability 5896 0
commoncap 8704 1 capability
(END)

To activate a compiled module that isn't showing on this list, the tool modprobe is used. For example, while I was getting my proprietary wireless card working, I had to run:

modprobe ndiswrapper

To remove a module, you can use:

modprobe -r ndiswrapper

Or, alternatively: rmmod ndiswrapper

That being said, you probably shouldn't be adding or removing modules if everything is working fine, unless you have a very good reason to do so.

The very brave and memory-thrifty user might scour the list analyzing the sizes and if a module is unused and unneeded, remove it. For example, since I don't plan on using any bluetooth devices whatsoever, I might remove bluetooth, l2cap, and rfcomm, which are all related to bluetooth. (I looked them up on Google to make sure.) But, since I'm not really that adventurous, and don't know if there are any side effects, I'm not going to do that. :-)

Some modules of note in my list are snd_hda_intel & snd_hda_codec, which make my particular variety of sound card work, and... hmm, It's gone now. I could have sworn ndiswrapper was in my list, as I jumped through all sorts of hoops to get my wireless networking working with it, but I don't see it now. The network card is working, though, so I'm not going to touch it. None of the other modules I have installed are of particular interest to me: They have been doing their job, and I haven't had to even know they are there.

Well, I hope this was a little helpful in understanding what LKM's are and how to manage them.

Saturday, January 27, 2007

Converted from Windows XP to Ubuntu Linux

I'm now running Ubuntu Linux 6.10 (Edgy Eft) on my Dell Inspiron 6000 notebook computer. I have named this computer Mercury (as opposed to Pericles, the Ubuntu web server that I've been writing about thus far.)

There were a couple pieces of hardware that I had to tinker with in order to get it working or optimized:
  • Wireless: BCM4318 AirForce One 54g 802.11g Wireless LAN Controller
  • Graphics: Intel Mobile 915GM/GMS/910GML Express Graphics Controller
Here is a list of the software I'm running on the system so far. This list isn't exhaustive, but basically includes things I frequently use and things that I had to deliberately install:
  • Gnome (desktop environment)
  • Mozilla Firefox (web browser)
  • Evolution Mail
  • Kopete (with MSN, Google Talk, Yahoo! Messenger, AIM, ICQ, and IRC connections.)
  • Tomboy Notes (a Wiki-like sticky note applet)
  • gnubiff (a tray notification tool to make a penguin dance if I have any email.)
  • xmms (music player)
  • Totem xine (movie player)
  • Codecs for virtually all Windows and Macintosh audio and video formats and full DVD playback.
  • wine (a windows API replacement layer to support a few windows apps that I still use.)
  • VirtualDub (a GPL'ed video manipulation program for Windows. I run this through wine.)
  • Internet Explorer 6 (I use this to test the websites I develop for my business. It also runs through wine, and I installed it using the very convenient IEs4Linux script.)
  • vmware player (I have it set up to boot off of a 6GB raw SCSI partition, with the MBR and other partitions mapped to zero so they cannot be affected by the virtual machine. I use this to run a few design tools that I don't have functional Linux equivalents for yet.)
  • Compiz (eye candy for Linux.)
I will be following this up with a series of posts to explain how I have already (or will yet) accomplish any non-trivial configuration tasks.

Friday, January 26, 2007

Using Standard Dates

Working on a project recently, I received feedback from another team member that "all date formats, whether for entry or exhibit, should be in a readable & usable format, i.e. mm/dd/yyyy." Although offense was probably not intended, I was extremely disappointed and even a bit insulted by this request, as I had taken care to represent date formats in a consistent, readable, and usable way throughout the project, or at least to choose tools that did so by default.

While not strictly an "Open Software" issue, I think usability issues and internationalization issues are often in the interests of Open Software advocates, so I thought I'd take a bit of time to discuss the ISO Date Format, why it is important, why and where you should consider using it and teaching other people about it.

For those who have not been officially introduced to it yet, the international standard (iso) date format is:

YYYY-MM-DD

YYYY is the year on the Gregorian calendar, MM is the month from 01 to 12, and DD is the day of the month from 01 to 31.

For example, 2007-01-26 represents the 26th day of January, 2007.

Prior to standardization, common ways to represent this date are numerous, including:
  • 1/26/07
  • 26/1/07
  • 07/1/26
  • 26.1.2007
  • 26-JAN-2007
  • 26-January-2007
Each of these included variants with either slashes, hyphens, or periods. Sometimes the usage of a particular one of these formats focused around a geographic location, such as the M/D/YY which was somewhat prevalent in the United States, and other times they would focus around groups with special interest or profession.

The trouble with nonstandard dates is that they cannot be interpreted in a consistent manner. It becomes especially problematic when the day of the month is less than 12, and the month is rendered numerically, making the month and day field entirely indistinguishable.

[Tip: In addition to being more legible, the ISO format also has the benefit of being able to be sorted chronologically in its raw format by any alphanumeric sorter, such as in a spreadsheet.]

With the advent of the Internet era, we now have instant communication around the globe. The ISO date format is an absolute must in order to achieve effective and expected communication in regards to dates.

There are still some places where it would be appropriate to use other date formats, for example:
  • In a localized or personalized formal invitation such as a wedding or graduation announcement where a verbose format such as "Tuesday, the first of January, two thousand eight" would be appropriate.
  • In any educational material instructed someone how to interpret legacy date formats, or for use in examples to teach someone how to read ISO date format compared to their historic format.
  • In a dynamic environment (such as a preferences page) where the reader (not the publisher) has specifically requested their date to be presented in a non-standard format.
  • Interoperation with legacy applications or that are unable to be upgraded at the time. Even in this case, ISO should also be supported so that you do not become the reason the other application is unable to be upgraded, and visible representations outside of these legacy communications should be translated back into the standard format.
Anything other than these examples only serves to create confusion as the ISO date format comes into greater use.

When the opportunity presents itself you should not be shy, but be prepared to teach others about using the ISO date format, especially if you or they are in an industry where they transact business or correspondence on the Internet. Only a few moments of explanation can save them much confusion or embarrassment that could result from misinterpreted dates or missed appointments.

For more information on ISO 8601 date format see:

Monday, January 8, 2007

Ubuntu Edgy Eft Xvnc Disconnect Problem

Diagnosis of Problem:

I installed the Automatic Updates on Ubuntu Edgy Eft recently, sometime around January 06 (2007-01-06), and after a reboot, my Xvnc running through xinetd stopped receiving connections. It disconnects immediately after connecting, or immediately after receiving the password. Log files turn up almost nothing, there is a "xinetd[nnnn]: warning: can't get client address: Transport endpoint is not connected" error showing up in /var/log/daemon.log and /var/log/syslog and upon telnetting to the vnc port I received nothing but RFB 003.008 (the usual VNC protocol greeting) followed by an immediate drop of the connection. xinetd does pass the connection to VNC, we know this because the greeting is given, but an examination of the running processes will not show Xvnc in the list because it closes immediately after opening.

Running Xvnc server manually with the appropriate options and connecting to it with vncviewer resulted in a gray screen (so-called "root-weave") with an X or a watch cursor on it, and the gdm (Gnome) session never starts.

The Solution:

Temporary solution: This happened because of an upgrade in the vnc4server package. Run synaptic package manager, search for vnc4server, click on it, go to Packages, Force Version and choose the previous version. Downgrade to the previous version and you should be alright for now. Wait until the next version comes out before you attempt to update this package again.

How I Found the Solution:

It took me many hours, but I found the answer on https://launchpad.net/ubuntu/+source/vnc4/+bug/78282

The person who first reported the bug incorrectly listed the date of the upgrade as 2006-01-06 (happy new year feranick).

I hope this helps! Drop a comment to let me know if this post eased your pain.