Picking the Kernel thats Right for You (Possible Speed Increase)

Disclaimer

This section is about messing with the kernel and that can be tricky business. Has never messed up for me, but it is a little nerdy. Look here if you want to learn and maybe get a speed boast (or if you have a dual core/dual processor/hyperthreading machine because you WILL get a performance boost). Use at you own risk, I am not a kernel developer or anything.

Be sure not to install the linux-image package instead or things will probably break! If you have done that just install the correct package and things will fix themselves.

***********************

Introduction

I have noticed some recent confusion in the forum when it comes to kernels, so I want to explain some things I have discovered. I hope it helps.

So you just installed Ubuntu but you don't think its going as fast as you think it should? Maybe you have just been advised to install a new kernel so you want to know more.

In Synaptic, if you search for “linux-image” you will find many kernels. Each its follows by some numbers and letters in some order. I will now explain those differences and what each means.

Notes:

- This guide does not apply to the PPC or 64 bit version of Ubuntu.

- If you have a heavily modified setup this might not work. For example if you have installed some drivers "by hand" and not from the repositories.

- Its hard to measure the speed increase, so if in doubt leave it out. Don't follow the guide if you are uncomfortable

- You can always boot back into you old kernel if things mess up. When the OS Menu appears at boot (called the Grub menu) just hit down and then hit enter on the first line with a "386" in it. You might have to hit the ESC key when you boot to pull up this menu.

- My steps will rewite your grub, so if you have a custom grub save it somewhere.

The Many Kinds of Kernels

386 – the default kernel in Ubuntu is the 386 kernel (but I hear its really a 486 kernel). What that means is that its the most compatible kernel because it supports the oldest tech. Here is wiki page to learn more:

http://en.wikipedia.org/wiki/Intel_80386

686 – The kernel that is recommended for use with any Intel Processors in a computer that are more recent then a Pentium Pro. So even old Pentium 2s and 3s can get in on the act. Installing this kernel with may improve performance.

http://en.wikipedia.org/wiki/Pentium_Pro

k7 – This kernel is recommended for a computer with a Athlon or newer AMD CPU. New 64 bit AMD cpus can use it as well if you have the 32 bit version of Ubuntu installed. Installing this kernel with may improve performance.

http://en.wikipedia.org/wiki/Athlon

smp – This kernel is NEEDED to use both CPUs in a multi-CPU setting. The kernel is also required to “enable” hyperthreading in modern Pentium 4 CPUs. Also needed for dual core processors (the letters stand for Symmetric Multiprocessing). Very important to install this, as it WILL improve performance. Sorry to bold it but I think this one is the most important.

http://en.wikipedia.org/wiki/Symmetric_multiprocessing

How to Install New Kernels

You need to install the file below as indicated:

For a modern Pentium 2+ (686) kernel:

Quote:
sudo apt-get install linux-686
For a modern Pentium 2+ kernel for dual processors, dual cores, or hyperthreading:

Quote:
sudo apt-get install linux-686-smp
For a Athlon (k7) or for a Athlon 64 (with 32 bit Ubuntu) kernel.

Quote:
sudo apt-get install linux-k7
For a Athlon (k7) kernel for dual processors or dual cores:

Quote:
sudo apt-get install linux-k7-smp
Conclusion

I wish you the best of luck and please post comments if you notice any improvements or any problems.

Note About Nvidia

The Nvidia driver is not an open source driver. It is "restricted" because of that fact.

Therefore the actual official Nvidia driver's kernel module (the part that interacts with the kernel to make it work) is in the restricted package. If you follow my guide those packages should be installed automatically (they are for me) but they don't for legacy cards. If you have a Nvidia card older than a Geforce 3 (except maybe the Geforce 2 MX) you have to install the legacy drivers.

Every time you switch to another kernel you have to reinstall the nvidia drivers for that specific kernel if you have used the nvidia installer.

OR

If you use the drivers from the repos then you will need the restricted modules for your kernel (only the ones for the i386 kernel are installed by default). If apt-get did not install these automatically with my guide you MUST do it! In other words, boot as usual, and if you are stuck to the command line type:


Quote:
sudo apt-get install linux-restricted-modules-`uname -r`
OR (if you use the nvidia legacy drivers)

Quote:
sudo apt-get install linux-restricted-modules-`uname -r`-nvidia-legacy
__________________
Quote:
Those folks who try to impose analog rules on digital content will find themselves on the wrong side of the tidal wave.
- Mark Shuttleworth

Expand full post here...

Comments

PC-BSD the Ubuntu killer? *updated*


I was just on distrowatch.org today looking around to see whats hot, I downloaded a new os called PC-BSD, it is truly awesome, and believe it or not was almost faster than my host system on vmware, im so happy with it today on my birthday im about to install it on its own partition to see how it works with my wifi. I am a die-hard ubuntu fan but im just experimenting, and the .pbi installation system is seemless, faster and more efficient than apt... I'll keep experimenting, if ubuntu adds the .pbi package system it would totally kick ass..
*update*
Well I just installed pcbsd, it looked sweet and ran 100% faster than ubuntu but unfortunately pcbsd does not support my belkin usb rt73 wifi card, which I was really dissapointed.
The terminal isnt as userfriendly and is a bit confusing, and basically it needs allot of work. It also only has KDE and no Gnome, which i love.
Anyways I wasted a dvd that is going in the garbage, I hope the linux kernel and ubuntu run as fast as freebsd/pcbsd someday because im sticking with Ubuntu :D

Pro's:
Runs extremely fast, i mean damn fast, everything loaded instantly with low load times
Packaging system rocks!
Con's:
Wifi support sucks
no gnome ;\

Resources:
www.pcbsd.org

Expand full post here...

Comments

Tweaking Sudo On Ubuntu

If you’ve used your Ubuntu machine for more than a week you’ve probably run into the sudo command a few times. Particularly if you have followed any of my previous howto's you’ve used it. Sudo allows you to run superuser commands on your machine, without needing a complete superuser account.



Now what happens when you have another user on that machine that needs certain superuser privileges but you don’t want to give them FULL access? Well sudo can be configured to give users sudo access, but limited to only certain commands. Here is a breakdown:

If you use the command:

sudo visudo

you’ll be taken into the self checking sudoers editing file. What you’ll want to look for is near the bottom and appears similar to this:

# User privilege specification
root ALL=(ALL) ALL

# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL

What this is defining is who has what sudo or superuser privileges on that machine. By default, and in this case root has all power and anyone in the admin group (generally just the initial user) has this control.

Now consider you have a buddy, wife or partner that also uses that machine and needs occasional sudo access but you’d prefer not to give them complete permissions to avoid destroying the world as we know it. Well, you can list them in this file and create a limited list of sudo permissions that they will be granted. An example would be below:

# User privilege specification

root ALL=(ALL) ALL

defcon ALL=(root) /usr/bin/aptitude, /usr/bin/apt-get

Let me break this down for you. By adding this new line to the file you’ve done the following:

The first listing, mike, is the user that is being assigned the privilege. For this to apply to a group of users on the machine you would prefix the name with a % as seen in the example above (%admin).

The second listing defines the hosts that these permissions apply to. For your use this will almost always apply to your local machine only so ALL is safe. If this does not apply to you (you will know who you are) you will want to define only the hosts to grant access).

Thirdly, the (root) entry defines what user the first user is applying the command as. In this example we want to run the command as root and not any other user. You can define this to another user (or user daemon) to allow access to their specific privileges.

Lastly we’ve got a comma separated list of commands that the user will have access to. In this case I’m allowing the user defcon to add and remove programs from the machine using the apt-get and aptitude programs. Allowing users to add / remove programs from your machine as in this example can be dangerous. This is for example use and may not match your usage.

Sudo is our friend while using Ubuntu. It allows us to temporarily take on a different persona, make changes to the critical parts of the machine and quietly change back again. Allowing other users this privilege can be helpful but it can also be harmful so be sure you understand who you are applying privileges to and to what commands. Security is #1, or should be, so use this knowlege wisely.

Disable Annoying Sudo password prompts:
Although disabling the password prompts is a big security risk, if someone compromises your password or account a user could simply sudo -s or sudo "command" to be root.
I dont recommend doing this unless you are "SURE" that you will not screw something up and you are sure your computer is secure and firewalled up.

All you need to do to accomplish this is:
First open a terminal and sudo visudo

Find %admin% and replace that line with:
%admin ALL=(ALL) NOPASSWD: ALL

Then ctrl-x and press enter to save

Then add yourself to the admin usergroup by typing:
sudo adduser myusername admin

Expand full post here...

Comments

Start Firestarter without a password

This how-to will let you start Firestarter automatically without having to enter a password for it, but also not editing /etc/sudoers and, thus, giving access to anyone to change it.

Actually, this how-to was originally developed by kukibird1 in this thread; I put it here so it is more visible.

0. Understand what Firestarter is
Firestarter is not the firewall, just a nice tool to configure iptables, the actual firewall.

Iptables resets itself after reboot, so Firestarter is meant to start at boot and recreate iptables' rules. This is made before even GNOME/KDE/Xfce is started, so you won't see anything...

You don't need to open Firestarter to be protected... So, any solution that makes Firestarter open (not only start) will prompt you for the "sudo" password and, because that's nasty, you're told to edit /etc/sudoers... Not good.

1. Is it really Firestarter your problem?
How do you know if Firestarter is your problem? Please, do this test:
1. Reboot your machine.

2. After having logged in as normally, go to a Terminal (Applications --> Accessories --> Terminal) and type:

Code:

sudo iptables -nL
3. If you get the following, Firestarter must be fixed:
Code:

Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

If you don't get that and you know your firewall is not working, then either Firestarter is not the issue or it's not the "usual" Firestarter issue.

2. Fix it!
(To do this succesfully don't open Firestarter)
1. Enter Terminal (see above)

2. Type:
Code:

gksudo gedit /etc/firestarter/firestarter.sh
3. Locate the following "paragraph":
Code:

if [ "$MASK" = "" -a "$1" != "stop" ]; then
echo "External network device $IF is not ready. Aborting.."
exit 2
fi

It's near the beginning; be careful, check twice before going to step 4!

4. Make that paragraph look exactly like this (put a # before each line):
Code:

#if [ "$MASK" = "" -a "$1" != "stop" ]; then
#echo "External network device $IF is not ready. Aborting.."
#exit 2
#fi

5. Reboot. (If you know how to do it and want to skip the rest of the steps, deactivate the boot spash and monitor the boot process; it should say "Firestarter firewall starting up...[OK]". If so, you don't need to follow the rest)

6. Enter a Terminal and type "sudo iptables -nL" again. It should be different to what you saw at the beginning.

7. Open Firestarter, go again to Terminal and type "sudo iptables -nL" again. It should be the same as in step 6.

8. Review Firestarter configuration to see if it's correct (there's no particular reason to do this, just to be sure you're protected).

Now, you (and all users) are protected from boot, without messing around with sudo's configuration! You'll have to enter the password to access Firestarter, but as you usually do with other administrative apps.

Reasonale
It seems (to me) that Firestarter thinks the network is not configured, so, without network, no firewall is needed and shuts down with an error. Putting those # is equivalent to delete the code that analizes that error, so this fix forces Firestart to start ignoring that "error" (?).

Expand full post here...

Comments

GUI CPU Speed Selector

So, recently I saw an article about using the "cpufreq-selector" utility to set the CPU scaling speed of my Core 2 Duo. As a person who likes simplicity, I decided it might be useful to have a graphical interface for Ubuntu users who prefer to avoid the command prompt. Here's what I came up with.

First, Ubuntu installs Zenity by default. Zenity is a utility which allows you to integrated graphical elements into shell scripts. Using Zenity, one could create a selection dialog which allows the user to choose the SpeedStep frequency for their CPU. Here's how:

1. Open a new instance of gedit (Applications->Accessories->Text Editor).

2. Enter the following code:

Code:

#!/bin/bash
CURRENT=`cat /proc/cpuinfo | grep "^cpu MHz.*" | awk -F": " '{print $2}' | sed 's@\.@@g' | uniq`
if [ "${CURRENT}" == "1000000" ] ; then
SETA='TRUE';
SETB='FALSE';
SETC='FALSE';
fi
if [ "${CURRENT}" == "1333000" ] ; then
SETA='FALSE';
SETB='TRUE';
SETC='FALSE';
fi
if [ "${CURRENT}" == "1667000" ] ; then
SETA='FALSE';
SETB='FALSE';
SETC='TRUE';
fi
ans=$(zenity --list --text "Select CPU Speed" --radiolist --column "" --column "Speed" ${SETA} "1.0 GHz" ${SETB} "1.33 GHz" ${SETC} "1.67 GHz") ;
VALUE=1000000
if [ "${ans}" == "1.0 GHz" ] ; then
VALUE=100000;
fi
if [ "${ans}" == "1.33 GHz" ] ; then
VALUE=1333000;
fi
if [ "${ans}" == "1.67 GHz" ] ; then
VALUE=1667000 ;
fi
gksu "cpufreq-selector -f ${VALUE}"

3. Save the new file as "cpuScaler" and give the file execute permissions.

4. Review your CPU steppings for you particular computer. My computer has 3 settings of 1, 1.3, and 1.66 GHz. Yours may differ, but you should easily be able to figure it our using cpufreq-selector and looking at the contents of /proc/cpuinfo.

5. Modify the steppings to suit your computer.

Resources:
Original Post

Expand full post here...

Comments

Using Google Calendar, Thunderbird and Lighting to full effect

One of the best apps available on Windows is MS Outlook, as a complete suite of apps to organize your life, with Mail, to do lists and a calendar application, which allows for scheduling of meetings, and your time, which will communicate happily with your Windows Mobile or Smartphone Device. Allowing you to know what you are doing while both at your PC or away from it. However, being a commercial application, this can be quite a pricey solution, especially, if your are looking for these features to manage yourself, or maybe just a few others.

However it is possible to archive similar results using Windows, or Linux for free.
Being the owner of an Orange M600 Smartphone, and a Linux user, I spent a long time looking over the Internet, as the best way to get the information shared between my Desktop and my PDA phone. and although there are projects out there , SynCE springs to mind, they are not easy to setup.
So I thought i would look at a different way of resolving the issue.. As always, this is not the only way, its just my way.
Issue

  • Cross Platform Calendar Connectivity Windows, Linux, Windows Mobile
  • Easy to use
How I managed it.
The key to my resolution is Google Calendar, which can be accessed easily enough, especially if you already have a gMail account. If however you don’t have a gMail account, you can create your self a Google Account here, which will give you access to the Calendar functionality. Its pretty self explanatory. Once this is setup, its time to look at your mail client, obviously you could just use google calendar, via the web browser in Windows or Linux, but it doesn’t display to well on a PDA.. Also the aim here, is to emulate some of the functionality of Outlook, which allows you to have access to multiple mail accounts in one location.
The Email Client
The software I use is Thunderbird, Its my preferred Mail client, as i use both POP and IMAP based mail accounts, this mail client doesn’t however come with any built in calendar function, which is a reason, so many people berate it, and state that “calendar functionality is required before this app can move forward”. One of Thunderbirds strengths however, is, like its cousin Firefox, it works on a plugin system. That is, people have written third party modules, which can be used to enhance the functionality of Thunderbird. And I use 2 of these plugins:Quite simply, Lightning provides a calendar interface for Thunderbird, its part of the Mozilla Sunbird project, and helps provide the Schedule interface which standalone Thunderbird is missing.
Setup The Plugins
The magic here, however is the Provider for Google Calendar plugin, which, unlike just adding the necessary links to Thunderbird, to access Google Calendard, not only provides read access, it provides write access as well..
Install both plugins, and restart Thunderbird, you will then be shown, a Calendar in the left pane, this calendar has 3 tabs Agenda, Todo and Calendars. To setup Google Calendar, click on the Calendar tab.
Click on the New Button, in the Calendar Tab, and you will be given a choice, you need to select, On the Network. Click on Next, there is an option for Google Calendar, select this.
In the Text bar under the Google Calendar you will need to enter the Link URL which allows you to write to your Account, you can find this, buy logging into the Google Calendar account you created earlier.

Create a new Calendar, or if you already have a celedar created, click on the down arrow next to the calendar. And click on Share this Calendar.
You will be taken to a new page, where you will need to click on Calendar Details on the top of this page.

Then Select the XML button, next to the Private Address, this will allow you the read/write access to the calendar, if you need read only access, or wish to share calendards with read only access, use the XML button next to the Public Tab.

When you click on the XML button a URL will be displayed (i’ve edited the whole strin below for security reasons) Copy this URL , and paste it into the Thunderbird Text box, then click on Next.

Give the Calendar a name which you will use in Thunderbird to identify this calendar, and choose a colour, this is the colour which will identify your Google Calendar, if you are using multiple calendars. Then CLick on Next and then Finish.
You will then see your calendar listed as available. you should now be able to add an event in either Thunderbird, or the wEb Interface, and both will update to show the events. You can set reminders, repeat events, and all the usual type of Schedule details.
Sync the PDA
The next step is to sync the Calendar with the PDA, this is done using the GMobileSync app for Windows Mobile or Smartphones. it requires .NET CF 2.0 which is available for download from the site, and provides not only read access to they Google Calendar, it also provides write access. This means as well as having PDA based access to your existing schedule, you can provide updates from your PDA to your calendar too. The application requires your login ID and password for the Google Calendar site. and works as far as i’m aware over both Wifi and GPRS networks, however i will confess, with UK prices as they are for Data over GPRS i’ve only tried Wifi. The Sync is a manual operation, and not automatic (yet)
Final Thoughts? So what do we have? quite simply a free, Open source based Mail and personal schedulling system, which can be accessed, over muliple platforms, Windows Mobile, Windows and Linux (not sure about OSX). Providing access to multiple mail accounts, using POP or IMAP. Read/Write Calendar access on Desktop, Laptop or PDA.. There is also ToDo list functionality available. and all this can be accessed via a Web Interface. Now thats value for money.. Now if i could get this working with Open Xchange as well… bye bye M$ Exchange..

Resources:
Original Post

Expand full post here...

Comments

125 Nautilus Scripts To Simplify Nautilus


Here is a collection of 125 Nautilus scripts you can use to simplify your Nautilus experience, from simply creating a blank text file, to converting, creating, and encoding video.
Check it out:

Open up a terminal
cd ~/.gnome2/nautilus-scripts
wget http://g-scripts.sourceforge.net/nautilus-scripts.tar.gz
tar zxvf nautilus-scripts.tar.gz
And thats it
Feel Free to add/remove whatever you do not need, also a few scripts "may" be outdated.

.
|-- Archiving
| |-- Compress__.bz2_
| |-- Compress__.gz_
| |-- Decompress
| |-- archiver-unarchiver
| |-- gnome-archive
| |-- super-extractor
| `-- unrar
|-- Execute
| |-- Open Terminal Here
| |-- Play in XMMS
| |-- XMMS
| |-- command_prompt_here
| |-- gedit
| |-- ghex
| |-- glimmer
| |-- gnome2-terminal-here
| |-- root-nautilus-here
| |-- root-terminal-here
| |-- run
| |-- terminal-here
| |-- xemacs
| |-- xine
| `-- xsu-terminal-here
|-- File Info
| |-- FileUsedBy
| |-- Search Here
| |-- Show MD5 Sum
| |-- Show_Parameters
| |-- filetype
| |-- ggrep
| |-- gtk-du
| |-- gtk2-du
| |-- gtk2-grep
| |-- mimetype
| `-- wordcount
|-- File Processing
| |-- Mail In Evolution
| |-- New Text Document
| |-- concatenate
| |-- dos2unix
| |-- doublespace
| |-- latex
| |-- latex2ps
| |-- mail_file
| |-- mail_file2
| |-- maker
| |-- new-text-document
| |-- pdf2ps
| |-- pixdir2html.pl
| |-- pprint
| |-- print
| |-- print_with_openoffice
| |-- ps2pdf
| |-- scp2host
| |-- scp_to_host
| |-- search_n_replace
| |-- secure copy
| `-- superexec.py
|-- File System Management
| |-- Get Photos
| |-- Junksorter.pl
| |-- Make Link
| |-- QuickBurn
| |-- Search Here
| |-- UnExec
| |-- burn_dir
| |-- burn_iso
| |-- change_name
| |-- chmod
| |-- chmog
| |-- copyhome
| |-- junksorter
| |-- linker
| |-- lowercase
| |-- mount_loopback
| |-- moveup
| |-- set_exec
| |-- set_read_only
| |-- shredder
| `-- uppercase
|-- Multimedia
| |-- Create_Thumbnail
| |-- Naudilus
| |-- Play_in_XMMS
| |-- Queue to XMMS
| |-- Show Digital Photo EXIF data
| |-- XMMS_Enqueue
| |-- convert_to_jpeg
| |-- convert_to_png
| |-- create-vcd
| |-- dv_to_mpg
| |-- mirror_jpg
| |-- queue_to_xmms
| |-- rotate
| |-- rotate_image
| |-- rotate_jpg_left
| |-- rotate_jpg_right
| |-- scale_image
| |-- scale_image_to_sizes
| |-- slideshow
| `-- watermark
|-- Obsolete
| |-- RPM-install-update
| |-- bzip2
| |-- converter
| |-- create-zip
| |-- create_file
| |-- create_targz
| |-- gb-unzip
| |-- gzip
| |-- mail_image
| |-- mailinbalsa
| |-- to_upper
| `-- uncompress_all
`-- System Configuration
|-- Debian_Package
|-- Hide or Show Hidden Files
|-- Install to Palm
|-- Install_Galeon_Theme
|-- Query_RPM
|-- RPM-install-update
|-- RPM-tools
|-- Set image as Wallpaper
|-- Set_as_Directory_Icon
|-- Set_as_Wallpaper
|-- Show_Directory_Metafile
|-- archiver-config
|-- install_rpm
|-- make-nautilus-script
|-- make_launcher
|-- pseudo-nautilus
`-- pynautilus

Expand full post here...

Comments

Clicky Web Analytics