Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Invalid MIT-MAGIC-COOKIE-1/ksmserver could not start

  1. #1

    Default Invalid MIT-MAGIC-COOKIE-1/ksmserver could not start

    I'm using Leap 15.0 with qt5 and kde frameworks 5 repos enabled. Lately, I couldn't yet figure out under which circumstantces, I get "Invalid MIT-MAGIC-COOKIE-1 keyInvalid" messages when I start application from Konsole, e.g. vi (text vi!), oowriter etc.
    These go away when I delete the ~/.Xauthority file (as suggested in some other thread) and kill the X server. But there's also another very strange problem for which I also couldn't figure out the circumstances under which it happens: sometimes after login, the desktop is already loaded, I have already started programs etc., I get a popup box saying: "Could not start ksmserver. Check your installation." in which I can only click OK. Then I'm dropped back to the login screen with all of my work lost.

    I suspect that these two problems are somehow related. Maybe that they have to do with upgrading from the plasma 5 sources or suspending/resuming the desktop. Can anyone help me figure out how to solve/debug any of these or at least give me a hint as to *why* these happen?
    The first one with the invalid magic cookie is just annoying but seems to be harmless. But the second one is really troubling me as it might lead to data loss.

  2. #2
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,616
    Blog Entries
    3

    Default Re: Invalid MIT-MAGIC-COOKIE-1/ksmserver could not start

    I have occasionally seen the invalid cookie message. I am not currently getting those.

    I currently use GDM for login. My vague memory is that I got those messages when using "lightdm". That is to say, I got those messages in desktop sessions where I had used "lightdm" to login. I'm not sure if there's a connection.
    openSUSE Leap 15.1; KDE Plasma 5;
    testing Leap 15.2Alpha

  3. #3
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,273
    Blog Entries
    2

    Default Re: Invalid MIT-MAGIC-COOKIE-1/ksmserver could not start

    It's been a long time since I've had to troubleshoot this problem...

    First, you need to be specific about what applications you're trying to launch that's throwing the error, generalization won't help.
    So,
    You should not have any problem running vi.
    Are you running as a normal User, invoking using sudo or in a full blown "su" root Konsole?

    If you're launching a graphical program, only some can be launched directly from a console... like YaST without a problem.
    Many graphical programs in KDE cannot be launched from Konsole directly, particularly with root permissions, you may need to invoke
    Code:
    kdesu application 
    I seem to remember a different error though if you made the above mistake, you'd see a dbus error, not a Magic Cookie error...

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  4. #4

    Default Re: Invalid MIT-MAGIC-COOKIE-1/ksmserver could not start

    I got the invalid magic cookie messages – and that also surprised me – when I launched vi (not gvim) as a normal user. Also with oowriter, or with mpv, with gnucash etc.

  5. #5
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,273
    Blog Entries
    2

    Default Re: Invalid MIT-MAGIC-COOKIE-1/ksmserver could not start

    Quote Originally Posted by lineinthesand View Post
    I got the invalid magic cookie messages – and that also surprised me – when I launched vi (not gvim) as a normal user. Also with oowriter, or with mpv, with gnucash etc.
    Sounds like you're not likely "launching" vi the right way...
    You're not supposed to "launch" it like a graphical app which would cause the errors you describe,

    You should first open a windowed console like Konsole if your Desktop is KDE, and then run vi within the console.

    Depending on how those other apps are written, if they are text-based and not graphical, they should be "run" the same way.

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  6. #6
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,616
    Blog Entries
    3

    Default Re: Invalid MIT-MAGIC-COOKIE-1/ksmserver could not start

    Quote Originally Posted by lineinthesand View Post
    I got the invalid magic cookie messages – and that also surprised me – when I launched vi (not gvim) as a normal user. Also with oowriter, or with mpv, with gnucash etc.
    If I remember correctly, I got those messages when launching an "xterm", and probably when launching a "konsole" session.

    However, I only saw that when I was experimenting with "lightdm". I do not see it with "sddm" or with "gdm". And I quickly stopped using "lightdm" for other reasons.
    openSUSE Leap 15.1; KDE Plasma 5;
    testing Leap 15.2Alpha

  7. #7
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    2,554

    Default Re: Invalid MIT-MAGIC-COOKIE-1/ksmserver could not start

    Quote Originally Posted by lineinthesand View Post
    Lately, I couldn't yet figure out under which circumstantces, I get "Invalid MIT-MAGIC-COOKIE-1 keyInvalid" messages when I start application from Konsole, e.g. vi (text vi!), oowriter etc.
    These go away when I delete the ~/.Xauthority file (as suggested in some other thread) and kill the X server.
    A possible insight as to what is going on, is to take a look at X11 Authorisation – “stackoverflow”: <https://stackoverflow.com/questions/...t-magic-cookie>:
    There are five standard access control mechanisms and they can be categorized in three main categories:
    Access based on host
    Access based on cookie
    Access based on user
    MIT-magic-cookie-1: Generating 128bit of key ("cookie"), storing it in ~/.Xauthority (or where XAUTHORITY envvar points to). The client sends it to server plain! the server checks whether it has a copy of this "cookie" and if so, the connection is permitted. the key is generated by DMX.
    Taking a look at the situation on this machine:
    Code:
     > xauth
    Using authority file /home/???/.Xauthority
    xauth> list
    «a fully qualified host name»/unix:0  MIT-MAGIC-COOKIE-1  «128 bit key»
    «a host name»/unix:0  MIT-MAGIC-COOKIE-1  «128 bit key»
    xauth> info
    Authority file:       /home/???/.Xauthority
    File new:             no
    File locked:          no
    Number of entries:    2
    Changes honored:      yes
    Changes made:         no
    Current input:        (stdin):2
    xauth> quit
     >
    So, yes, if the 128 bit key used for the MIT Magic Cookie is corrupted, for whatever reason, the X11 session will have to be stopped (logout) and then, via a VT the user will have to delete the ~/.Xauthority file containing the corrupted key and, then, the affected user can login to their X11 session again …

  8. #8

    Default Re: Invalid MIT-MAGIC-COOKIE-1/ksmserver could not start

    First of all: I'm starting vi from a konsole window. After I close the text vim that opens, I see the messages:
    Code:
    me@linux-mymachine:~> vi
    Invalid MIT-MAGIC-COOKIE-1 keyInvalid MIT-MAGIC-COOKIE-1 keyme@linux-mymachine:~>
    Code:
    me@linux-mymachine:~> xauth
    Using authority file /home/me/.Xauthority
    xauth> list
    linux-mymachine.site/unix:0  MIT-MAGIC-COOKIE-1  d30b064d2516247186bdcbf29c0a2458
    linux-mymachine/unix:0  MIT-MAGIC-COOKIE-1  3295780b8d606fdd45ff18d8054fb5d8
    xauth> info
    Authority file:       /home/me/.Xauthority
    File new:             no
    File locked:          no
    Number of entries:    2
    Changes honored:      yes
    Changes made:         no
    Current input:        (stdin):2
    I don't get it: what's wrong with that file/my machine/my setup? I still don't know when this happens/what triggers this. It seemingly has no consequences: I can log in normally, all the programs launch without problems, it's only these *annoying* messages when launching stuff. Well, and the occasional ksmserver problem.

    I still suspect it has something to do with the suspending/waking but I just can't put my finger on it.

  9. #9
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    15,743

    Default Re: Invalid MIT-MAGIC-COOKIE-1/ksmserver could not start

    Does it happen with a different user???

    Also check the owner of ~/.Xauthaority ownership can be changed if you log into a GUI as root


    Try deleting the ~/.Xauthaority file it should be recreated

  10. #10
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,616
    Blog Entries
    3

    Default Re: Invalid MIT-MAGIC-COOKIE-1/ksmserver could not start

    Quote Originally Posted by gogalthorp View Post
    Try deleting the ~/.Xauthaority file it should be recreated
    If you do that, you should logout and then login again.
    openSUSE Leap 15.1; KDE Plasma 5;
    testing Leap 15.2Alpha

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •