Every time I log into my kubuntu installation the KDE desktop sharing "invitation" window opens. I do not want this to occur. I thought closing it out, then logging out and back in would work, but it doesn't. A side problem is that Amarok autostarts as well, and I don't use amarok (I only opened it once to see what it was like before switching to a different app). How can I stop these things from opening?
Before you log in, in the kdm session manager, click "Session" (I'm not sure how it's named in kde4, but should be something like this), and select "New session".
What you see is, that you have selected before to use a "saved" session on startup.
Clarification for kubuntu (creds to Alex): The setting is in System Settings/Session Settings.
There apparently is no kdm session manager in the login window (at least for kubuntu), but I instead went into the system settings and into session settings, and changed the behavior on login to "start new session", saved it, logged out and then back in. Problem fixed. I then went back into that setting pane and selected "restore session", logged out and back in.