Sunday, April 6, 2014

KDE Screen Capture

I'm always looking for an easy way to do things. This morning I'm exploring an easy way to capture the KDE screen.

Here are the steps I use to capture my KDE screen as an image:

  1. Find the KDE Kickoff Application Launcher. It's the KDE version of the Windows Start Button. Like the Start button, it is located in the lower lefthand corner of your screen.
  2. Left click on the application launcher (start button).
  3. A popup menu appears. Look for the search box at the top of the popup.
  4. Type ksnapshot in the search box and hit the enter key
  5. Click on Ksnapshot
  6. A file dialog appears
  7. Click on Save As
  8. Save the screen capture wherever you want to under whatever name you want
  9. Click Quit on the ksnapshot dialog to close it

The hardest part of of the above procedure is knowing what to call the screen capture application under KDE. It's called ksnapshot.

That so often happens. The concept is easy. It's knowing what to call it that is hard to remember.

For this reason, I'm constantly writing notes to myself about these sorts of things. I sometimes struggle to remember what to call it.

Ed Abbott

Monday, June 3, 2013

Find Messages in Kmail with Regular Expressions (RegEx)

I'm always looking for a better way to do things. I love Kmail! I just discovered a way to search for strings inside of a Kmail folder using regular expressions.

To so a search on a folder, do the following:

  1. Highlight a folder to search with your mouse.
  2. Press the lowercase-S key to bring up the search dialog that searches the highlighted folder.
  3. Look for two pull-down menus in the dialog that are side-by-side.
  4. Notice that the search dialog has two pull-down menus that are side-by-side.
  5. Note that the left-most pull-down menu allows you to specify how much of the message to search on. For example, you can specify the subject line only if desired.
  6. Note that the right-most pull-down menu allows you to specify how you will search. For example, you can specify that your search will be done with regular expressions.
  7. On the right-most pull-down menu choose matches regular expr.
  8. To the right of the right-most pull-down menu is a text-entry box. Enter the regular expression you wish to do a search on.
  9. Find the Search button in the upper-right-hand corner of the dialog. Click on it to initiate the search.
  10. Look for the message area at the bottom of the dialog that indicates how many messages have been searched so far.
  11. Look for the word Done in the message area.
  12. Click on Open Search Folder button in the bottom right-hand corner of the dialog.
  13. The search dialog will now close and the Last Search folder will now open.

The Last Search folder is one of my favorite features. The folder contains only those emails that are a product of your last search. Perhaps my favorite part of the Last Search folder is that all the emails inside of it are links rather than copies.

Since the Last Search folder links to email messages rather than copies them, it means that you can manipulate email messages as desired.

Here's an example of how you might move all messages in your inbox that mention Larry to a folder called Larry:

  1. Use the steps given above to search your inbox for messages containing the term Larry
  2. Look in the Last Search folder.
  3. Click on the first message you wish to move to the folder called Larry
  4. Add to the list of messages you'd like to move by doing a control right click on the first message you'd like to add. As you add more and more messages, more and more messages will highlight.
  5. Left click on the highlighted messages
  6. Choose Move to to move all highlighted messages to the Larry folder.
  7. Note that moving messages out of Last Search also moves them out of inbox.

I'm so glad I learned how to do this! Being able to search on messages and then move them around is a big help. It means that when I get overwhelmed by multiple emails from the same people, or on the same topic, I can organize these messages easily by first, isolating them with a search, and second, moving them to their own folder.

Just another reason I use Kmail.

Ed Abbott

Monday, December 12, 2011

Fixing Akonadi Server

Looks like I'm going to have to try
to fix my Akonadi Server. I didn't
even know I had one. There's more
information about Akonadi server here:

Akonadi Server

Here's a post that helps me with some
of my misconceptions about Akonadi Server:

Akonadi misconception #1:
where is my data?


Wondering what happened to my data is a scary thing.
I had this image that my data had been first, swallowed,
and second, corrupted by Akonadi Server.

The above post clears up my misconception. Since
Akonadi Server appears to be just a front end to the
data itself, it can't really swallow the data, it can
only access it.

Perhaps a good way to look at Akonadi server is that
it provides access methods to the data but does not
store the data itself.

In keeping with the Unix philosophy, there seems to
be a clear division of responsibilities. Akonadi
provides a quick way to access data by building tables,
indexes, etc. However, the data has its own separate
and distinct existence apart from Akonadi. This is
the impression I'm getting upon first glance.

Since your personal data and Akonadi server are distinct
entities, it should be possible to rebuild Akonadi tables
and indexes as long as the data remains intact. This is
what this post seems to be implying:

Akonadi 1.2.1 - some issues

Update: January 10, 2012

I wonder if this guy is having the same problem I've been
having:

Kmail: Address Book Not Working

OK. I just did what he did. I went to:

system settings > advanced > KDE Resources

I then chose Akonadi for contacts and sychronized
it. It seems to have done something (I think).

However, I really don't know what I'm doing.

I'll come back to this problem later. Right
now, my address book is sort of working and
sort of limping along. I don't have the control
I want because I don't understand it and I
don't understand Akonadi.

Update: January 15, 2012

Still working on the same Akonadi problem and
getting nowwhere fast.

Here's a command that I find helpful:

akonadictl --help

This command will tell you how to start
and stop the Akonadi Server as well as
giving you the means to find out what
the status of the Akonadi Server is.

OK. I've just discovered this post
conerning the relationship of Akonadi
Server and MySQL:

Akonadi Mysql Does Not Have MySQL Database

I'll try this fix later when I have time.

Update: January 17, 2012

Yesterday, I installed mysql client
using the following command:

aptitude show mysql-client-5.1

Looks like I'm going to need mysql client
5.1
to investigate MySQL 5.1, the
mysqul version it appears that Akonadi Server
is currently interacting with.

I typed the following command at the command
line:

man mysql

The man page above describes mysql as
mysql - the MySQL command-line tool.

The same man page describes the -S option
this way:

--socket=path, -S path

For connections to localhost, the Unix socket file 
to use, or, on Windows, the name of the named pipe 
to use.

Now I'll try to do just what the person who says
that they do not have a mysql database did. I'll
start working with the MySQL command-line tool to
find out what is going on.

Some time later . . .

I've just returned after finding a socket file under
this directory:

~/.local/share/akonadi

I was not able to connect to the socket using
mysql -S. I think I'll try erasing all
Akonadi data (it is only used for indexing my
address book) and see if it will rebuild itself
properly on startup. Maybe it will and maybe
it won't.

Some time later . . .

I've been doing some reading. Here's a blog
by one of the KDE developers. Maybe I'l get
some insight by reading his blog:

KAddressBook and Akonadi in KDE 4.4

Update: January 19, 2012

I keep coming back to the problem of Akonadi
Server not working. Someday, I'm going to get
it working properly!

I've just discovered a way to see if MySQL server
is running. I found a command on this blog
post that gives this information:

How Do I Restart MySQL Server?

Someone who posts to the blog suggests the
following command while logged in as root:

ps ax | grep mysql

The output for the above command is as follows:

root@edabbott:/home/ined# ps ax | grep mysql
 1931 ?        Sl     0:01 /usr/sbin/mysqld --defaults-file=/home/ined/.local/share/akonadi//mysql.conf --datadir=/home/ined/.local/share/akonadi/db_data/ --socket=/home/ined/.local/share/akonadi/socket-edabbott/mysql.socket
 2429 pts/1    S+     0:00 grep mysql

Update: January 17, 2012

My kmail address book just died. All I did was
change the name of the folder where I'm putting
new addressees.

Now my kmail address book will not launch at all.
It seems that the relationship between Akonadi
Server and Kaddressbook is deeply deeply flawed.

Changing the name of the folder that a particular
address book resides in is something I found on
the menu. This seems to trigger problems.

As I recall, Kaddressbook died after I followed
the following steps:

  1. Open up Kaddressbook as a separate application
  2. Right click on the address book called Personal Contacts
  3. Click on folder propertries
  4. Change the name of the folder from Personal
    Contacts
    to New Addresses

The above steps are as best as I recall. Since
Kaddressbook is no longer successfully launching,
I cannot verify the above steps.

I'm completely befuddled by Kaddressbook. I'm beginning
to think that my next step is to either not use an
address book at all or to learn how to erase all my
Kaddressbook information and start all over again.

Looks like I need to study this web page very
carefully:

Akonadi and AddressBook

It's a web page that says it is provided by
Tobias Koenig
. There's one piece of information
on this page that seems to be vital. The vital
information appears to me to be that there is only
one folder for address book data in the new format,
regardless of how many address books you have:

$HOME/.local/share/contacts 

The writer of this page refers to this particular
address book as Personal Contacts. It's
almost as if the name Personal Contacts is
hard coded.

Therefore, when I changed the name of the folder
from Personal Contacts to New Address Book,
Kaddressbook died because the name Personal Contacts
is hard coded. That's my theory based on the results I"m
getting.

I'll keep theorizing until I get it right and I
get Kaddressbook working. Right now, I've very
confused.

OK. I've just rebooted and now my Kaddressbook
successfully launches again. However, the name
New Address Book has been changed back to
Personal Contacts.

This lends strength to the idea that the name
Personal Contacts is somehow hard coded.
I'm using the term hard coded in a lose
way. I mean the name is probably stored somewhere
and cannot be changed just by changing the name
of a folder.

That's why when I change the folder name from
Personal Contacts to New Address Book,
Kaddressbook refused to launch. In some sense,
the changing of the folder name is hard coded
and cannot be changed. That's what I mean when
I say hard coded.

In fact, I find no folder named either Personal
Contacts
or New Address Book. The
only folder I find with new address book data in
it is this:

$HOME/.local/share/contacts 

Two thoughts on the above folder:

  1. The name of this folder is going
    to be contacts, regardless of
    what you ask Kaddressbook to call the
    folder
  2. While the name of the folder is
    contacts, Kaddressbook does a
    head fake and calls the folder Personal
    Contacts
    , regardless.

Weird! No wonder this thing is so
confusing! The separation between
appearances and underlying reality
is quite large here. When Kaddressbook
suggests that you can change the
name of the folder that the address
book resides in, it's just simply not
true. The only thing that changing
the name of the addressbook seems to
do is crash Kaddressbook until you
reboot again.

Upon reboot, whatever you changed the
name to has reverted back to Personal
Contacts
.

I'm still not understanding this but I'll
keep working on it.


Ed Abbott

Friday, December 2, 2011

Getting Columns to Appear in Kmail 4.4.5

I've just done a Debian Squeeze installation.
One of my frustrations is that the column
headings disappeared in Kmail.

I like column headings because it makes
it so easy to sort messages by sender,
by date, or by subject. All 3 sort options
are valuable to me.

Here's how I got my columns back on the
emails in my inbox:

  1. Get into Kmail
  2. Look for the View menu at the
    top of your screen
  3. Click View
  4. Choose Message List
  5. Choose Theme
  6. Choose Classic as your theme

The themes are set with radio buttons.
Apparently a theme called Fancy is
the default theme. The Fancy theme seems to
be optimized for being able to read long
subject lines in a single glance without
the subject lines being visually truncated.

Perhaps there are other reasons why Fancy
is absent columns for both the sender and the
date. I can understand where Fancy would
be a better view to have in some cases.

Here's a summary of how you can change your
theme from Fancy to Classic:

View > Message List > Theme > Classic

I prefer Classic for now. Later I may
experiment with Fancy.

Life is full of choices, isn't it? In this
regard, KDE mirrors life well.

Ed Abbott

KDE Community Forums

I've just discovered the KDE Community
Forums. It is located here:

KDE Community Forums

I'm looking for more information on
default address books under kmail. I
suspect that a default address book
is given to each user as users are
added to KDE. I'm going to try to
confirm this suspicion.

Here's a post that looks like it going to
help me. I'm going to study this post
carefully:

Email Addresses Inaccessible

Ed Abbott

Tuesday, November 29, 2011

Adding a New Folder to Kmail

I'm using Kmail Platform Version 4.4.5 (KDE 4.4.5)
according to the Help > About KDE menu. I wanted
to create a folder from the folder menu but I found that
the New Folder menu choice is grayed out under
the Folders menu.

I don't understand this. Why am I being prevented from
created a new folder under Local Folders. I can
create a new folder in a sub-folder but not the top level
folder. Local Folders is the top level folder.

This post solved my problem:

Making new folder in kmail?

Buried in this post is the information that you can right
click on the Local Folders folder to create a
new folder immediately underneath it.

I have to admit I should have thought of that. I have to
admit that I don't right-click often enough. I also have
to admit that right-clicking is the easier way to do it.
Why go searching in a menu when you can right click instead?

In the above post, the somewhat confusing (to me) term
context click is used. It makes sense. The term
makes sense. However, my first instinct upon hearing it
the first time is to think that it means something more
exotic than right-click. A context click is a right
click. OK.

The lesson in all this is to keep updating the way you
do things. I'll treat the graying out of the menu as
a feature, not a bug. It has forced me to think about
doing things in a better way.

Ed Abbott

Friday, December 3, 2010

Getting Kaddress to
Add a Name to an Email Address

 

This one drives me crazy! Here's
the scenario: I already have the
person's email address but not their
name in my address book. Should be
a simple matter of adding their name,
right?

Well, not quite. Seems that kaddress
will not recognize the full name unless
it is called a simple name. Not
sure why this is.

Here's what I do to tweak things so that
the name shows up along with the email
address when I click To: to designate
who I will be sending the email to.

  1. Get into Kmail
  2. Find the tools menu
    at the top of your screen
  3. Click on tools
  4. A drop-down menu appears
  5. Choose Address Book
    from the drop-down menu
  6. The address book now appears
  7. Look for email icons, some of which
    have a name underneath them and some
    which don't. Since your problem is
    getting a persons first and last name
    to appear, you want to focus on email
    icons that do not have a name underneath
    them
  8. Click on the orphan email address
    that has not yet been given the name
    of a person
  9. Enter the Firstname Lastname
    next to Edit Name. Do so in
    Firstname Lastname (natural) order.
  10. Now click on Edit Name
  11. Change the pull-down menu to Simple
  12. Important! Click on another email address
    in the other window to make sure that the choice
    of Simple will be applied. Any email
    address will do as long as it is not the email
    address you are working on.
  13. At this point, an the icon for the email
    address you are working on should appear with
    the name of the person underneath it. Look for
    this name by scanning the icons in alphabetical
    order. The big change you are looking for is
    an icon that did not have a name underneath
    it before that now has a name underneath
    it.
  14. Now click the email icon that now has
    a name under it that it did not have before.
    In effect, you are clicking away from a random
    email address you used to make sure everything
    is working OK and clicking towards the email address
    you are working on.
  15. Start to compose an email
  16. Check that the when you click
    on To: that you are able to
    get the full name, and not just the
    email address alone, added to the
    To: field

How did I learn out how to do this?
I looked at the raw data for the
address book.

Here is where the raw data is found:

~/.kde/share/apps/kabc/std.vcf

I looked at the file with the
vim editor. I noticed
that not all the fields were
being filled in when I added
a name to an existing email
address in the address book.
From there, I started looking
for a work-around and I developed
the above steps.

I'm not absolutely sure why the
above steps work. However, they
seem to work for me.

Ed Abbott