Archive

Archive for July, 2007

WordPress Spam Filtering

July 18th, 2007 11 comments

Does anyone have any good tips on filtering WordPress comment spam?  Right now I have four filters built in, which is stopping boat loads of spam.  Are there any plugins the community might suggest that can help filter outside of what I already have?

Akismet

Spam Karma 2

Math Comment Protection (recently enabled)

Trackback Validation

Thanks.

Categories: Wordpress Tags:

Removing KDE icons in gnome / remove gnome icons in KDE

July 18th, 2007 32 comments

This tutorial is for those people that like to run gnome and KDE side by side. This will allow you to only show the native apps in the menus within each desktop environment instead of showing everything.

update: I wrote a script to automate this process. If you’d like to use that instead it is available below.

You can run the following commands to make gnome menu backups and KDE menu backups prior to making the changes, if you want to be safe.

mkdir -p ~/.menu-backup{gnome,kde}

cp /usr/share/applications/* ~/.menu-backup/gnome

cp /usr/share/applications/kde/* ~/.menu-backup/kde

To update the menu listings then run (one continued line):

sudo -i

cd /usr/share/applications/ ; for i in *; do echo “ShowOnlyIn=GNOME” >> $i; done ; cd /usr/share/applications/kde/ ; for i in *; do echo “ShowOnlyIn=KDE” >> $i; done ; exit

The changes should take place immediately and you should now only see the native apps in each menu. Enjoy.

If everything seems to work the way you like you can delete the backup directories with the following commands:

rm -r ~/.menu-backup-gnome

rm -r ~/.menu-backup-kde

I suppose I could write a small shell script to do the work for you.. would anyone prefer that? I got bored and wrote it.

menu-cleaner.sh v0.1

Categories: GNOME Tags: ,

KDE apps : Not *quite* as customizable as I thought

July 17th, 2007 9 comments

(Token Disclaimer: I don’t mean to start a flame war. Let’s not argue gnome vs KDE. This is simply an observation of mine. I hope someone might have a solution for it.)

Recently I’ve been on a GPG kick and have been interested in collecting, signing and using the GPG system more and more. I really should write a tutorial on the basics of this system, but that will have to be another time.

The best app that I’ve found for managing GPG within gnome is GPA, the GNU Privacy Assistant. This in combination with Seahorse make using and managing your GPG keys pretty easy.

Well, KDE has an app that I’ve found to have a few more features (I’m not surprise, honestly) so I installed KGPG. I toggle between the two as I learn to use more of the features, but I am able to get everything I need done between the two so far.

One limitation that I was surprised to find in KGPG is that of the “Export Public Key : To Email” option. Once I have collected and signed a key I like to email the key back to the owner for import. KGPG has the option of exporting to email, which makes it a bit quicker.. however it complains about not being able to find KMail and dies.

I figured that was probably normal so I went to look for the option to change the default mail client. Again, I assume with the hundred thousand ways KDE can be customized I should be able to do something as simple as that. Well, to my surprise I was wrong.

As far as I can tell you can not change the default mail client for KGPG to use, therefore the export to mail feature is useless to me.

For those that are using KGPG natively in KDE, does this use your default client or KMail? Can this be changed? Does it just read the default client in the environment and is unable to do so in a non-KDE setup?

If someone does have a fix for this I would appreciate it. Otherwise, thanks for reading my rant about how KDE isn’t quite as customizable as I thought.

Categories: KDE Tags:

Disabling the F10 Key (menu accelerators) in Gnome Terminal

July 16th, 2007 11 comments

As promised today I will show you how to disable the gnome-terminal F10 key so you can better use it within applications like htop.  I don’t recall why I didn’t post this when I found it a few weeks ago.. probably just busy with work.  I’ll try to do better next time :)

To disable the F10 “feature” in gnome-terminal you have two options.  I’ll outline both.

The first option is to open the gnome-terminal and select “Edit” from the File menu, and then select “Keyboard Shortcuts”.

Within the next window check the boxes for:

Disable all menu access keys (such as Alt-f to open File menu)

Disable menu shortcut key (F10 by default)

At this point the changes should be available and the F10 key should be unused by gnome-terminal.

For the second option, you’ll need to launch the gconf-editor.  You can do this like so:

press ALT-F2.  This will open the "Run Application" dialog box for gnome.

In the field provided type "gconf-editor" and hit ENTER.

Well then need to navigate our way to the following two addresses to change what the default value may be.

/apps/gnome-terminal/global/use_menu_accelerators

/apps/gnome-terminal/global/use_mnemonics

What these paths mean, if it isn’t clear, is to navigate on the left-side column to “apps” > “gnome-terminal” > “global” and find the check boxes for “use_menu_accelerators” and “use_mnemonics”.

In my testing you may need to uncheck both of them for the change to work.  The change should be immediate.  The F10 key should now be available for use in htop and other similar applications that try to bind the F10 key but are unable because the focus is stolen by gnome-terminal.

Note: on some machines neither of these disable the key, and there is a public bug posted for them.  It’s late and I don’t have the bug number, but I’ll get it for you.  If you experience the same issue please add your information to the bug report.

Categories: GNOME Tags: ,

forget top, check out htop

July 15th, 2007 11 comments

I just realized I’ve never blogged about a really cool tool that I’m sure you’ll be impressed with.  If you’ve used top, or use top to ever try to get an idea of what is running on your machine you’ll really like htop.

From the package description:

Htop is an ncurses-based process viewer similar to top, but it allows to scroll the list vertically and horizontally to see all processes and their full command lines.  Tasks related to proccesses (killing, renicing) can be done without entering their PIDs.

Yeah, that’s right.  You can actually see the whole process including options and arguments.  You can scroll down off the current page to see what else is running.  It also looks a lot prettier, and I know how much you like your pretty applications.

Installation

Installing htop is as easy as you might guess:

sudo aptitude install htop

That’s it.  Then run htop and get a better view of what is running on your machine.  I would add a section here on how to use it, but its so simple I don’t think I need to.  All the shortcut keys are listed at the bottom.

Tomorrow I’ll show you how to bypass the F10 limitation when used with gnome-terminal.  ..you’ll see what I mean when you try to use it. :)

Categories: Linux Tags: ,

SSH Saves The Day.. 1400 Miles Away! Enable Automagic Login

July 14th, 2007 32 comments

I related the below story tonite in our Ubuntu Utah meeting and John asked me to blog the details and the howto.  This is for you buddy :)

A few months ago I was in Chicago to take the Redhat Certified Engineer exam. By day I attended class and by night I studied the book to prepare for the grueling test.  Well, one of the nights I was there (5 day course) my brother calls me in a panic begging me to come fix his computer.  I of course tell him that I’m in Chicago at the moment and not sure what I can do to help. At that I can hear his heart sink, so I ask him what the problem is.

He starts into this sob story about how he has a paper due in the morning but he can’t get logged into his computer.  Apparently his wife dropped something on the keyboard and the number row no longer works, which limits him from logging into his machine (numbers in passwords are good ideas boys and girls!).  He is, by my suggestion, using Ubuntu on his home machine so I know I can save the day.

As he continues this story I use ssh to connect to his machine…

ssh user@remote-host

..and open the /etc/gdm/gdm.conf file.

vim /etc/gdm/gdm.conf

I change two lines from:

AutomaticLoginEnable=false

AutomaticLogin=

to

AutomaticLoginEnable=true

AutomaticLogin=username

I save the file and restart the gdm (Gnome Desktop Manager)

sudo /etc/init.d/gdm restart

By this point he’s finishing his sob story about how he needs to get his paper written or he’s going to fail his class, never graduate and end up being homeless, etc, etc.

I interrupt him to tell him to look at his computer, which is now logged in as his user, never requiring a password or username for access.

The phone goes silent.  I ask if he’s still there. He is.. he’s speechless.

I remind him this is all due to the wonders of Linux and wish him good luck with his paper.. and to tell his friends about the wonders of Ubuntu!

Simple as that.  SSH connection, two commands and a very thankful brother all from 1,400 miles away… and a tutorial on how to activate automagic login on Ubuntu (which is probably not the most secure idea, but you’ve been warned.  Once he got a keyboard replacement I reverted the changes on his machine.)

Categories: Linux Tags:

United States of Ubuntu : State of the Union

July 14th, 2007 1 comment

US Teams current status mapUbuntu within the United States is alive and well!  The US Teams Project, launched the beginning of 2007 has been a HUGE success.  I wish I had room here to thank everyone that has been such a great contributing member.  Scratch that.  I can’t go on without thanking the US Teams Mentors for all their dedication and volunteered time.  We would not be where we are today without you.  It is very appreciated.  A special thanks also goes to those brave Ubuntu users that have volunteered to take the role of Team Leader.  You are a brave soul.  The few, the proud. ..With very large shoes to fill.  Your work and dedication has been tremendous as well.  It’s this great community working together–the common bond we find in Ubuntu–that has led to our success.  I thank each of you for that.

At this point, more than half-way to our goal date I wanted to give a status report.  The initial growth of the project has been enormous.  We now have more than double the number of Community Council approved teams than we did when we started.  We have twenty-five teams in the process of being mentored and growing!  The momentum has started.  The framework is in place.  It’s now up to you to help us finish and reach our goal!

This is a call to all of you in US States that do not yet have organized or growing teams.  We need you!  We need your help to reach our goal.  You will not find much as rewarding as building a community in your area and strengthening and educating those around you.  If I may…

I started the Utah Team nearly two years ago.  I have worked hard at it.  I have had late nights.  I have tried as best I can to be accessible and accommodating to each member and user in my state.  Yes there were times when I wondered what I was doing.  Yes there were meetings with low attendance.  But you know the best part?  When we had our Feisty release party we were one person short of violating the fire code!  The room was packed.  When I looked around the room I realized that I had a room full of good friends, and many great memories that I would not have had otherwise.  Working with this team as a leader and a member has been something that I’ll remember as one of the most rewarding times of my life.

I invite you to look for a team near you.  If you find one, fantastic!  Join them and help build the Ubuntu community in your area.  If you don’t find one dare to be great and contact us for mentoring on how to develop a team.  We have some great, talented people ready and willing to help you build your team.  I bet you’ll find skills that you never thought you had.  All it takes is being willing to try!

We can’t meet our goal without you.  We can sure try, but only you can build a community in your city or state.  Only you can reach those around you and share the Ubuntu love.  Take a minute and come join us in IRC (#ubuntu-us, freenode).  Join our mailing list (ubuntu-us@lists.ubuntu.com).  Email me if you need.  I’ll get you in touch with the right people.

I believe we can reach our goal of fifty approved teams by years end.  I know you Ubuntu lovers are out there, come on out of the woodwork!

Categories: Community Tags:

Vim Tip of The Week : +[num] or +/{pat}

July 13th, 2007 6 comments

First let me start of by saying that if you haven’t yet taken the plunge to use vi/vim you really should.  This editor will take you to levels of efficiency that you’ve only dreamed of, and probably beyond.  Seriously, take the time to teach yourself some vim tips.

You might want to read a few of my previous posts on vim.

How to pwn your text files with vim

Find and replace with vim

Vim : the ultimate editor

..and for those that want something more, let’s talk a bit about the +[num] and +/{pat} options when launching vim.  These options will let you begin editing on a certain line number (+[num]) or at an instance of a certain pattern (+/{pat}).  Let me show you a few examples.

If you’d like to begin editing a file on line 45 you could launch vim using a command such as:

vim file +45

If you’d like to begin editing at the last line in the file you could use +[num] without assigning a value:

vim file +

This option is really helpful for things such as trying to fix code or fixing syntax errors in configuration files.  If the log displays the line number you could jump right to the line as you open the file.  …and you thought the :[num] option was convenient!

vim file +185, vim file +2, vim file +823, etc.. simple ways to begin editing at a certain point.

The +/{pat} option lets you begin editing at the first occurrence of a certain pattern.  This means instead of opening the file and beginning your search function you can use the search as you open vim.  Some examples:

vim +/foo, vim +/bar, vim +/baz

You can use the :help search-pattern within vim to see available search patterns.

Anyway, I thought I would share this little tidbit of vim-awesomeness today.  Hopefully I can continue to do a vim tip of the week.  Would the faithful readers like that?  Would you like more advanced vim options? Simpler tutorials? Are you happy with gedit and kate and don’t even want to bother?  Let me know, I’ll do my best to help.

Categories: News Tags:

Automatically Unlocking the Default Gnome-Keyring : PAM Keyring

July 12th, 2007 29 comments

This post is in part an update to my previous post on resetting the gnome keyring, and partly due to my continued laziness, efficiency push. I want my machine to do everything for me anymore. The less tedious work I have to do the more actual work I can get done, right? This post will walk you through setting up your machine to auto-authenticate the gnome-keyring at login. One less password you have to enter when you login to your machine.

Installing the Package

We’ll need one tiny package for this to be supported. Using your favorite package manager install libpam-keyring, or use the following command:

sudo aptitude install libpam-keyring

Configuring PAM

Once this is installed we need to add a few lines to a configuration file. Follow this next step carefully. If you put the line in the wrong place it may cause problems with other parts of machine authentication.

Edit the /etc/pam.d/gdm file and append the following line to the end of the file:

@include common-pamkeyring

At this point the gnome-keyring will be handed your login password and, if they are the same, will be authenticated at login. If your login password and gnome-keyring password are different this will not work. Options? Set the passwords to match by first resetting the gnome-keyring password (this will wipe any saved keyring data) or come up with a solution that will authenticate one with the other, even if they are not the same. The latter solution I would be interested in, but am not aware of.

Thanks to Thad for the origins of this post, although slightly different between FC6 and Feisty.

Categories: Security Tags: , ,

How To openID Enable Your Blog

July 11th, 2007 5 comments

In a follow up from my previous post here, I want to quickly outline how to openID enable your WordPress blog.  I know it isn’t Linux / Ubuntu related, but we can stretch and say that your server is running on Linux / Ubuntu so it’s close enough, right? :)

Register For an OpenID

The first thing you need to do, if you haven’t already, is setup an openID.  You can find a provider (openID provider list), or use the server I used at myOpenID.

Register at one of the providers for free, and you should end up with something similar to:

username.myopenid.com

Install the Plugins

Download the openID WordPress plugin

Download the openID Delegation plugin

Install both of these to your /wp-content/plugins/ folder, and activate them within your blog Dashboard > Plugins menu.  (details for installing each plugin are on each link above, but this is the general idea.)

Once the plugins are installed and activated you’ll need to enter a few details in the settings for each.  Navigate your way to Options and select the OpenID submenu.  There you’ll need to enter the trusted root of your site, which is generally the full domain, ie; http://ubuntu-tutorials.com.  The other settings on that page are up to you, but you’ll probably want the last three checked at least.

Once you have these settings updated make sure to Save, and then navigate to the OpenID Delegation submenu.  On this tab you’ll need to fill in three fields.  These are pretty simple.  In my case, with an openID address of http://zelut.myopenid.com the three fields are:

http://zelut.myopenid.com

http://zelut.myopenid.com

http://zelut.myopenid.com/xrds

Match those to your openID registered address (if not registered at myopenID.com your address will be different).

At this point your site should be OpenID enabled.  Anyone with an OpenID can then comment or register on your site, without having to actually register on your site.  It’s perfect.  Enjoy.

Categories: Internet Tags: