View previous topic :: View next topic |
Author |
Message |
fbcyborg Advocate
Joined: 16 Oct 2005 Posts: 3056 Location: ROMA
|
Posted: Tue Oct 18, 2011 7:03 am Post subject: [RISOLTO CON WORKAROUND] Invalid MIT-MAGIC-COOKIE-1 da root |
|
|
Salve a tutti,
sono ormai due anni (forse anche di più) che combatto con questo problema, ovvero ogni volta che tento di avviare una qualsiasi applicazione grafica da utente root (dopo aver effettuato il comando "su") ottengo questo messaggio di errore:
Invalid MIT-MAGIC-COOKIE-1 keyWarning: This program is an suid-root program or is being run by the root user.
The full text of the error or warning message cannot be safely formatted
in this environment. You may get a more descriptive message by running the
program as a non-root user or by removing the suid bit on the executable.
xterm Xt error: Can't open display: %s
E questo accade sia che io provi a lanciare xterm, sia Xephyr, che qualsiasi altro programma di questo tipo.
Anzi, con Xephyr risponde così:
Invalid MIT-MAGIC-COOKIE-1 key
Xephyr cannot open host display. Is DISPLAY set?
L'unico modo che io ho per risolvere questo problema è quello di usare il seguente comando per avviare, ad esempio, xterm:
Code: | sudo su - -c "xauth merge $HOME/.Xauthority;export DISPLAY=:0.0 && xterm" |
E va usato da utente normale.
Questo problema si verifica solo se io sono un utente normale e divento root usando "su".
Se invece effettuo il login come utente root, quando sono su KDM, allora il problema non si pone. Ma non voglio ovviare a questo problema facendo sempre login come root.
In precedenza adottavo anche altri sistemi, meno comodi, per ovviare al problema, ma al momento, il comando qui sopra è l'unico che mi permette di risolvere.
Ricordo che una volta su Gentoo era possibile avviare i comandi come xterm anche da root dopo aver fatto "su" (si parla del 2006-2007), ma poi ho sempre avuto problemi.
Il fatto ancor più rognoso è che questa cosa su Debian (ad esempio) non succede.
Come si può porre fine a questa rottura? _________________ [HOWTO] Come criptare la /home usando cryptsetup e luks
[HOWTO] Abilitare il supporto al dom0 XEN su kernel 3.X
Help answer the unanswered
Last edited by fbcyborg on Thu Oct 20, 2011 7:30 am; edited 1 time in total |
|
Back to top |
|
|
Zizo Apprentice
Joined: 04 Feb 2010 Posts: 200 Location: Padova, Italy
|
Posted: Tue Oct 18, 2011 10:35 am Post subject: |
|
|
Come palliativo potresti utilizzare questo, ma non garantisce la stessa sicurezza:
cat /etc/X11/xinit/xinitrc.d/05-root
Code: | #!/bin/sh
[ -x /usr/bin/xhost ] && xhost +si:localuser:root > /dev/null 2>&1 |
ls /etc/X11/xinit/xinitrc.d/05-root
Code: | -rwxr-xr-x 1 root root 419 ** *** *** /etc/X11/xinit/xinitrc.d/05-root |
Eventualmente anche un link tra ${HOME}/.Xauthority e /root/.Xauthority dovrebbe funzionare, oppure il modificare .bashrc di root aggiungendo "export XAUTHORITY=/home/utente/.Xauthority" (suppongo). |
|
Back to top |
|
|
fbcyborg Advocate
Joined: 16 Oct 2005 Posts: 3056 Location: ROMA
|
|
Back to top |
|
|
eleaffar n00b
Joined: 09 May 2011 Posts: 43
|
Posted: Wed Oct 19, 2011 8:06 am Post subject: Re: Invalid MIT-MAGIC-COOKIE-1 da root |
|
|
fbcyborg wrote: | Salve a tutti,
sono ormai due anni (forse anche di più) che combatto con questo problema, ovvero ogni volta che tento di avviare una qualsiasi applicazione grafica da utente root (dopo aver effettuato il comando "su") ottengo questo messaggio di errore:
Invalid MIT-MAGIC-COOKIE-1 keyWarning: This program is an suid-root program or is being run by the root user.
The full text of the error or warning message cannot be safely formatted
in this environment. You may get a more descriptive message by running the
program as a non-root user or by removing the suid bit on the executable.
xterm Xt error: Can't open display: %s
....
|
Io uso sux ? Ci sono controindicazioni ??? Quali ? _________________ Ho visto il film Memento ... non me lo ricordo ! |
|
Back to top |
|
|
fbcyborg Advocate
Joined: 16 Oct 2005 Posts: 3056 Location: ROMA
|
Posted: Wed Oct 19, 2011 8:10 am Post subject: |
|
|
Interessante questo programma!!!
Lo installo appena possibile, però ho appena notato una cosa stranissima: sul mio notebook, riesco tranquillamente ad avviare xterm dopo aver fatto "su". E non ho la più pallida idea di come ciò sia possibile e del perché non mi dia questo Invalid MIT-MAGIC-COOKIE-1!!!
EDIT: provato sux e devo dire che è formidabile. Però vorrei capire come risolvere il problema lo stesso, perché dev'essere qualche impostazione fatta male, dato che sul mio notebook non ho questo problema. _________________ [HOWTO] Come criptare la /home usando cryptsetup e luks
[HOWTO] Abilitare il supporto al dom0 XEN su kernel 3.X
Help answer the unanswered |
|
Back to top |
|
|
fbcyborg Advocate
Joined: 16 Oct 2005 Posts: 3056 Location: ROMA
|
|
Back to top |
|
|
|