On Tue, Jun 20, 2023 at 02:35:08PM -0400, pa...@quillandmouse.com wrote:
> On Tue, 20 Jun 2023 14:15:19 -0400
> gene heskett <ghesk...@shentel.net> wrote:
> 
> [snip]
> 
> > gene@coyote:/usr/local/bin$ pkexec /usr/sbin/synaptic
> > Invalid MIT-MAGIC-COOKIE-1 keyUnable to init server: Could not
> > connect: Connection refused
> > Failed to initialize GTK.
> > 
> > Probably you're running Synaptic on Wayland with root permission.
> > Please restart your session without Wayland, or run Synaptic without 
> > root permission
> > 
> > which might work if it wasn't for the invalid magic cookie, so how do
> > I get an accceptable version of that?
> > 
> 
> No one's really broken down that initial error message. I think it's
> some sort of red herring. I don't think it's actually a "magic cookie"
> thing.

I just explained it in my other post. It /is/ a magic cookie, and
X clients these days need that to talk to the X server. On my box,
for example:

    tomas@trotzki:~$ hexdump -C .Xauthority 
    00000000  01 00 00 07 74 72 6f 74  7a 6b 69 00 01 30 00 12  
|....trotzki..0..|
    00000010  4d 49 54 2d 4d 41 47 49  43 2d 43 4f 4f 4b 49 45  
|MIT-MAGIC-COOKIE|
    00000020  2d 31 00 10 86 0b f6 67  60 93 c8 55 83 6e 40 59  
|-1.....g`..U.n@Y|
    00000030  d1 18 c8 08 00 00 00 04  a9 fe 03 8b 00 01 30 00  
|..............0.|
    00000040  12 4d 49 54 2d 4d 41 47  49 43 2d 43 4f 4f 4b 49  
|.MIT-MAGIC-COOKI|
    00000050  45 2d 31 00 10 27 ec ac  11 9a 1b 50 36 aa a2 da  
|E-1..'.....P6...|
    00000060  47 1b bd cb 6a 01 00 00  08 72 61 73 70 75 74 69  
|G...j....rasputi|
    00000070  6e 00 01 30 00 12 4d 49  54 2d 4d 41 47 49 43 2d  
|n..0..MIT-MAGIC-|
    00000080  43 4f 4f 4b 49 45 2d 31  00 10 7e f2 f2 1a ee a3  
|COOKIE-1..~.....|
    00000090  40 e5 6d 04 a0 a1 56 b0  eb d3 01 00 00 07 74 72  
|@.m...V.......tr|
    000000a0  6f 74 7a 6b 69 00 02 31  30 00 12 4d 49 54 2d 4d  
|otzki..10..MIT-M|
    000000b0  41 47 49 43 2d 43 4f 4f  4b 49 45 2d 31 00 10 64  
|AGIC-COOKIE-1..d|
    000000c0  e0 43 cc f1 ad f6 de ba  e1 e9 93 5e 21 63 63     
|.C.........^!cc|

> I suspect something else is going on. For example, it also says
> it can't initialize GTK. Why?

No X server to talk to -> no GTK.

>  Does Synaptic rely on GTK libraries which
> aren't present? I don't know the answer;

That would be another error message.

> I'm just asking questions. And
> what server is it unable to "init"? Can you run other GUI apps with
> sudo? 
> 
> Unfortunately, I on Xorg, so I can test what you're talking about.

Whatever is happening, the synaptic thinks it is trying to do
Xorg. Perhaps it tries first wayland, fails and falls back to
X, thence the magic cookie thing.

But magic cookies are a thing, at least under X [1]

Cheers

[1] https://en.wikipedia.org/wiki/Magic_cookie

-- 
t

Attachment: signature.asc
Description: PGP signature

Reply via email to