Archive

Archive for September, 2009

Free Memes : 0.4% non-free software

September 11th, 2009 1 comment

To hop on the Free Meme bandwagon…

[cedwards@daphne ~]$ vrms
Non-free packages installed on daphne


linux-generic             Complete Generic Linux kernel
linux-restricted-modules- Non-free Linux 2.6.28 modules helper script
linux-restricted-modules- Restricted Linux modules for generic kernels
skype                     Skype - Take a deep breath
tangerine-icon-theme      Tangerine Icon theme
unrar                     Unarchiver for .rar files (non-free version)
Reason: Modifications problematic


Contrib packages installed on daphne


flashplugin-installer     Adobe Flash Player plugin installer
flashplugin-nonfree       Adobe Flash Player plugin installer (transitional pack
gstreamer0.10-pitfdll     GStreamer plugin for using MS Windows binary codecs
ttf-mscorefonts-installer Installer for Microsoft TrueType core fonts


6 non-free packages, 0.4% of 1400 installed packages.
4 contrib packages, 0.3% of 1400 installed packages.

Categories: Ubuntu Tags: , , ,

Improve Slow Graphics on Intel Cards

September 11th, 2009 6 comments

Ubuntu 9.04 unfortunately had some significant regressions in regards to video on Intel based hardware. I have an onboard Intel GM965/GL960 and I noticed the video was a lot more choppy and glitchy after installing Ubuntu 9.04. This issue has been addressed and seems to be fixed in the latest alpha releases of Ubuntu 9.10, but if you don’t want to wait you can try to fix it yourself with the following steps. I just applied these fixes to my machine and I’ve noticed a significant improvement!

xorg.conf backup

To apply these changes you’ll need to manually update your xorg.conf file. It is good practice to make a backup of this file before you alter anything, as a broken configuration will result in a non-working graphical interface. The following two commands will 1) make a backup and 2) open the file for editing:

sudo cp /etc/X11/xorg.conf /etc/X11/xorg-$(date)
sudo vim /etc/X11/xorg.conf

Section “Device”

You’ll want to look for a section in the configuration that starts with Section “Device” and add some options within that block. The primary option you’ll want to add is the AccelMethod. You can see an example below:

Section "Device"
Identifier "Configured Video Device"
Option "AccelMethod" "uxa"
EndSection

You’ll need to re-login for the changes to take effect, but you should notice a difference.

Additional Options

I’ve also added a few other options to my configuration which you might want to try out. Below is the configuration I’m using:

Section "Device"
Identifier "Configured Video Device"
Option "AccelMethod" "uxa"
Option "EXAOptimizeMigration" "true"
Option "MigrationHeuristic" "greedy"
Option "Tiling" "true"
EndSection

Remember, before you apply any of these settings you should make a backup of the file. If one of your changes doesn’t apply properly, or isn’t supported you may end up with no graphical environment at all. You’ll only have the console available to fix / revert your changes. A backup will make “fixing” the problem much simpler.

Categories: Ubuntu Tags: , , , , , ,

Re-Enable Ctrl-Alt-Backspace Combination for Restarting X Server

September 10th, 2009 3 comments

With the release of Ubuntu 9.04 the keyboard combination to restart the X server was disabled. This, I think, was due to reports of users accidentally hitting the combination and having X restart resulting in lost work. I will admit that I may have hit that combination once or twice in my time, but its pretty rare. In this post I’ll outline how to re-enable that keyboard combination, allowing you to use ctrl-alt-backspace to restart X.

DontZap

To re-enable the ctrl-alt-backspace keyboard combination to restart the X server install the package dontzap:

sudo aptitude install dontzap

All this package basically does is update the xorg.conf file to set Option “DontZap” ” false”.

You can then manually toggle between enabling and disabling the keyboard combination using the commands:

sudo dontzap --disable

sudo dontzap --enable

If you would like to make these changes manually (without installing the package), you can make changes by hand to your xorg.conf file. Simply add the following section within your /etc/X11/xorg.conf:

Section "ServerFlags"
Option "DontZap" "false"
EndSection

You will likely need to re-login for any of these changes to take effect.

Categories: Ubuntu Tags: , , ,

Presenting at the Utah Open Source Conference 2009

September 9th, 2009 No comments

I was just going over the schedule for the upcoming Utah Open Source Conference and I realized that I’ll be presenting one month from today! On Oct 9, 2009, the second day of the conference, I am scheduled for two presentations.

The first is a beginner / intermediate presentation regarding GNOME customization and making use of the gconf tool. You may want to see some of my previous posts here, here and here on the subject. I use the gconf tool anytime I setup a new machine to automate the user interface customization that I’ve grow accustomed to. I’ll be outlining how to find, document and script these customizations for future use.

The second (which happens to be directly after the first!) will introduce and demonstrate 10 of my favorite “required” sysadmin tools. These include tools like tcpdump, ssh and rsync, screen, vim, netstat and more. I imagine this one will be helpful for anyone doing system administration. Hopefully I’ll have a tip or two for everyone!

For more information about the conference, please visit the website. Registration is still open and we’d love to see you there!

Change The Default Editor

September 9th, 2009 2 comments

If you spend any amount of time in a terminal you very likely end up needing to use a text editor. Text editors can be very powerful tools, and therein introduces the age-old editor wars. Vim vs Emacs, etc. No matter what your preferred editor is, it helps if it is the default. It is always a pain to be presented with an editor you’re not used to when trying to configure your system. This short article will outline how to change the default editor for your system, ensuring you’re always presented with your preference.

Alternatives

Linux provides a system tool called alternatives, which allows us to have multiple tools installed that each provide the same functionality. Using this tool we can tell the system which one we would like to use as the default, leaving the others available but not primary. To use the alternatives tool to change your default editor, use the command:

sudo update-alternatives –-config editor

You should be presented with a menu similar to this:


There are 4 alternatives which provide `editor'.
Selection    Alternative
-----------------------------------------------
1    /usr/bin/vim.tiny
2    /bin/ed
3    /bin/nano
*+        4    /usr/bin/vim.gnome
Press enter to keep the default[*], or type selection number:

Your options may vary depending on which editors you have installed. No matter what your options are, simply select the number you would like to use and your default editor is updated.

To test these new changes use a command that will call the default editor such as visudo or crontab -e.

Categories: Linux Tags: ,

Watch Log Files in Realtime

September 8th, 2009 3 comments

A very useful tool in any kind of troubleshooting is checking out the log files. Whether you’re troubleshooting a system problem, monitoring a mail server or simply checking the visitors for a web server the log files are your best friend. There are a few ways to handle this.

Probably the most common command used to keep an eye on log files is tail. Here are a few examples:

tail -f /var/log/syslog

tail -n25 /var/log/mail.log

tail -F /var/log/lighttpd/error.log

You’ll notice that each command above used a different option. Let me explain what each does.

-f, –follow : output appended data as the file grows

-n, –lines: output the last N lines, instead of the last 10; or use +N to output lines starting with the Nth

-F: same as –follow –retry

–retry: keep trying to open a file even if it is inaccessible when tail starts or if it becomes inaccessible later

Also note that ctrl-c will stop the -f or –follow options.

One thing that I’ve learned in all my troubleshooting and administration is that the system almost always tells you what the problem is. The trick is to simply know where to look. /var/log/messages, /var/log/syslog and other files in the /var/log/ directory will almost surely have the answer.

Categories: Server Tags: , ,

Chromium Browser : Now Stable

September 7th, 2009 11 comments

The other day I decided I would try out the Chromium Browser again on Linux. It has been some time since I tried it–the last time it hardly rendered text properly–so I was very happy to see that it has improved significantly! When I say significantly I mean it is now my default browser, and has been for over a week. I don’t believe I have had any crashes (I can’t recall any as I write this), and everything that I expect to work has worked just fine. This includes flash, javascript, tabs, https, etc, etc. I trust it enough to write this post and not crash and lose my progress.

For those that haven’t tried it out yet, I would invite you to do so. I’ve outlined instructions below on how to use the chromium-daily PPA to update and use the latest nightly builds.

Configure PPA

Append the following line to your /etc/apt/sources.list:

deb http://ppa.launchpad.net/chromium-daily/ppa/ubuntu jaunty main

You can also import the package signing key using the command:

sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 4E5E17B5

You’ll have to refresh your package list, but then you’ll be able to install the Chromium Browser and you’ll receive updates daily.

sudo aptitude update && sudo aptitude install chromium-browser

Thoughts?

What are your thoughts on Chromium? Do you like it? Is it faster? I’m sure many of you will mention that its lack of plugins as compared to Firefox is holding you back, but that is on the horizon. Let me know what you like and what you don’t like, and if you’ve had as much success as I have.

Categories: Internet Tags: , , ,

Ubuntu 9.10 “Karmic Koala” Alpha 5 Reviewed

September 7th, 2009 5 comments

I very briefly tried out the fifth alpha release of Ubuntu 9.10 “Karmic Koala” tonite and I thought I would share some of my immediate impressions with the rest of you. To sum it up, I hope others are having better luck with it than I did.

System

The machine that I installed on is a Dell Latitude D630. That is a Core 2 Duo 2.10GHz, 2G RAM, 80G HDD, Integrated Intel video and Intel 3945ABG wireless adapter. It is pretty standard hardware as far as I’m concerned–the intel hardware is all supported just fine.

Negatives

I installed using the alpha 5 alternate installer (text based). I used LVM + encryption for my partitioning and otherwise used all default settings, but my problems started before the installer was even finished. Actually, I don’t know if I can accurately say that because the installer never actually did finish. It got to the point of adding the user(s) and then hung. I finally decided to reboot the machine and see what state it was in.. maybe it could be salvaged. Luckily it seemed to be in working bootable order. at least at first glance..

Some of you may remember that I’m a dvorak user. Most of the time this doesn’t cause any problems as I’m the only user on my machine and I can configure the keyboard anyway I’d like. There are those few exceptions however where it ends up causing issues. This was one of them.

When I tried logging into my new installation I noticed the keyboard settings weren’t in place. It was still trying to use qwerty, even though I had used dvorak throughout the installation. I tried setting it manually, which worked during my session, but didn’t persist. I even tried reinstalling the console-setup package to alter the system-wide keyboard. That didn’t seem to take effect either.

I noticed some other oddities as well, most of them linked back to the keyboard layout issue.

Positives

On the positive side I was very impressed with the improved boot time and splash screen. I didn’t time the boot, but I want to say the speed was improved. The graphics were also a bit cleaned up. Ohh, and the horrible GDM graphic from 9.04 was gone as well!

I was also glad to see that ext4 is the new default filesystem. I’ve been running ext4 since it become “stable” and I’ve had no problems with it at all. It is *much* faster than ext3 as well as most of the other common file systems.

The addition of GRUB2 will be very interesting I’m sure. I didn’t get to play with it much, but I’m glad to see that is finally being used. I understand there are a lot of technical improvements in GRUB2 vs the traditional “legacy” GRUB.

I also noticed that some of the issues I’ve had in the past with Intel video were gone. This is due to the replacement of EXA with UXA. For any of you Intel users, this is a big one to be excited about, particularly if you have issues currently on Ubuntu 9.04.

Conclusion

In conclusion I think there are going to be a lot of very noticeable improvements in Ubuntu 9.10 and I’ll be happy to use it. Based on my keyboard issues however it will be hard for me to use at this point. I’ve gone back to Ubuntu 9.04 for the meantime. Perhaps I’ll try it again when it hits Beta.

What regressions or improvements have you found with Ubuntu 9.10 releases? Are you excited to see it coming or are you going to be reluctant to upgrade? I’d really like to hear that other people are having better luck than I did. Chances are, considering my problems were dvorak related, you probably did.

Categories: Ubuntu, Upgrade Tags: , , , , , ,

Apt-Cacher: Revisited

September 6th, 2009 5 comments

I’m sure that I’ve mentioned a number of times that the bandwidth speeds at my house are pretty horrible. It is very frustrating to have such a limited pipe considering the amount of work I do that requires bandwidth. Based on this limitation I regularly come up with ways to conserve and cache. One of these methods (which I have blogged about in the past) is apt-cacher.

Apt-Cacher is a method by which you can centrally cache and share packages already stored within your network. It also allows the option of caching any downloaded packages in the future. This allows me to download a package once and transparently share it with an unlimited number of machines within my network. This way I only use my Lanwidth (LAN-bandwidth), and not my limited WAN connection.

Apt-Cacher can be installed and configured network wide in five simple steps. These steps are:

  • Install
  • Autostart daemon
  • Configure ACL
  • Import current packages
  • Configure Clients

To be honest, the first four steps are finished in just a few minutes. The last step of configuring your clients can take longer. The amount of time depends on how many clients you have.

Install

To install apt-cacher simply install the package (or click the link below):

sudo aptitude install apt-cacher

Autostart daemon

If you want the apt-cacher daemon to autostart at boot you’ll need to change a single value in the config:

sudo sed -i.orig 's/AUTOSTART=0/AUTOSTART=1/' /etc/default/apt-cacher

sudo /etc/init.d/apt-cacher restart

Configure ACL

This step is optional. By default apt-cacher will allow access to any IP. If you would like to limit access to your cache from a specific subnet or other specific addresses you’ll need to change the values for allowed_hosts and denied_hosts in the /etc/apt-cacher/apt-cacher.conf.

Import current packages

You’ll likely want to import the current packages that you have in your machine’s package cache. This can be done using the command:

sudo /usr/share/apt-cacher/apt-cacher-import.pl -s /var/cache/apt/archives/

At this point this machine will have the ability to share any packages that it has previously downloaded as well as any package that it (or any client) will download in the future. The only requirement to begin using this cache throughout your network is configuring the clients to use it.

Configure Clients

To configure your clients to use your cache you can simply add a line to your apt.conf file, telling the client to use the cache server. To do this add the following line to your /etc/apt/apt.conf file, replacing the IP with your own:

Acquire::http::Proxy "http://192.168.0.30:3142"

You’re now done. As long as your apt-cacher is accessible your client will look there for cached packages.

If anyone knows of a method to allow for multiple proxy entries I would be very interested. For example, if this were configured on a laptop and the apt-cacher were not accessible, I would like the client to transparently try the next entry in a list. This is something available in many other package managers, I would hope Debian based distributions would support the same.

Categories: Server, Ubuntu Tags: , , , ,

Instant LAN File Sharing With Python

September 1st, 2009 12 comments

The other day I was chatting with a co-worker and he pointed out a very simple command that could be used to quickly and easily share files with people within your LAN. This could also be used to share with people on the internets, but you’d have to configure NAT from your router. That much of the configuration is up to you, but I’ll share with you the quick ‘n easy webshare command.

The only requirement, as far as I can tell, is python. I’ve run it on my Linux machine as well as my OS X machine and it worked just fine with no other configuration or packages installed. It should likely work on anything else that has python installed as well.

To share the contents of any folder on your machine simply run:

python -c "import SimpleHTTPServer; SimpleHTTPServer.test();"

You can run that one-liner anywhere on your file system and then access the files via your browser. Simply point your browser to your LAN IP port 8000 and you should see an index listing of the files.

To make this a little simpler I made it an alias in my .bashrc file. Just add this line somewhere in your .bashrc or .bash_aliases:

alias webshare='python -c "import SimpleHTTPServer; SimpleHTTPServer.test();"'

At this point you can simply run the command webshare anywhere on your file system and share those files. This makes for a really simple tool for sharing files quickly and un-sharing them as soon as you’re done. Just hit ctrl-c to cancel and close the process.

Categories: Internet Tags: , , ,