Yesterday I had the same issue, I solved it by running
sudo synaptic
But today I don't know what's happening, if I run gksu synaptic
or gksudo synaptic
they don't do anything.
If I go to root and execute these commands or execute sudo synaptic
, I see:
sudo synaptic
No protocol specified
(synaptic:32377): Gtk-WARNING **: cannot open display: :0.0
EDIT: @Nunoxic
I'm working on my local computer. When I do sudo apt-get update
some stuff will be updated and some some stuff will not be updated
E: Some index files failed to download. They have been ignored, or old ones used instead.
I ran sudo apt-get update
2 days ago. when i do echo $DISPLAY
the output is :0
@Gilles
the output of echo $XAUTHORITY
is nothing at all:)
the output of sudo env | sort
is
COLORTERM=gnome-terminal
DISPLAY=:0.0
HOME=/root
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_COLLATE=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
LC_MESSAGES=en_US.UTF-8
LOGNAME=root
MAIL=/var/mail/root
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin
SHELL=/bin/bash
SUDO_COMMAND=/usr/bin/env
SUDO_GID=0
SUDO_UID=0
SUDO_USER=root
TERM=xterm
USERNAME=root
USER=root
the output of sudo xterm
is
No protocol specified
Warning: 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
EDIT
the output of XAUTHORITY=~/.Xauthority; sudo xterm
is
No protocol specified
Warning: 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
the output of sudo -s9999 strace xterm
is
sudo: invalid option -- '9'
usage: sudo -h | -K | -k | -L | -V
usage: sudo -v [-AknS] [-g groupname|#gid] [-p prompt] [-u user name|#uid]
usage: sudo -l[l] [-AknS] [-g groupname|#gid] [-p prompt] [-U user name] [-u
user name|#uid] [-g groupname|#gid] [command]
usage: sudo [-AbEHknPS] [-C fd] [-g groupname|#gid] [-p prompt] [-u user
name|#uid] [-g groupname|#gid] [VAR=value] [-i|-s] [<command>]
usage: sudo -e [-AknS] [-C fd] [-g groupname|#gid] [-p prompt] [-u user
name|#uid] file ...
echo $DISPLAY
in the terminal and paste the output. Also, are you working on your computer locally or through SSH? Thirdly, what happens if you open the terminal and type something likesudo apt-get update
– Feb 14 '12 at 10:36sudo apt-get clean cd /var/lib/apt sudo mv lists lists.old sudo mkdir -p lists/partial sudo apt-get clean sudo apt-get update
– Feb 14 '12 at 12:10sudo apt-get clean cd /var/lib/apt sudo mv lists lists.old sudo mkdir -p lists/partial sudo apt-get clean sudo apt-get update
I seeE: Command line option 'p' [from -p] is not known.
– Lynob Feb 14 '12 at 12:17--parents
instead. If that doesn't work as well try breaking that command down tomkdir lists
andcd lists
and finally,mkdir partial
topped withcd ..
– Feb 14 '12 at 12:44echo $XAUTHORITY
,sudo env | sort
, andsudo xterm
. – Gilles 'SO- stop being evil' Feb 14 '12 at 22:22sudo -s9999 strace xterm
(it'll be huge, put it up on http://pastebin.com/ or similar if it doesn't fit in your question). Note that the trace will contain X cookies, which could give someone access to your computer in unusual circumstances; if people other than you have access to your computer, restart your X server(s) after posting (if not, you're fine). – Gilles 'SO- stop being evil' Feb 16 '12 at 23:04sudo strace -s9999 xterm
. – Gilles 'SO- stop being evil' Feb 17 '12 at 00:40sudo strace -s9999 xterm
, I see that xterm is attempting a TCP connection to the X server (and failing, which is expected). WithDISPLAY=:0.0
, xterm should be making a local connection, through/tmp/.X11-unix/X0
. Hmmm, broken permissions, maybe? What is the output ofls -ld /tmp /tmp/.X11-unix /tmp/.X11-unix/X0
? – Gilles 'SO- stop being evil' Feb 20 '12 at 18:47