Feb. 21st, 2013
Command not found? Here is the solution.
Feb. 21st, 2013 07:31 am- captainhaggy
- #! Member
- From: Düsseldorf, Germany
- Registered: 2010-04-13
- Posts: 73
- Website
Command not found? Here is the solution.
Most of us know, that it can happen, we need a command / program that is not installed. Debian has a nice package called command-not-found. When you install it, and call a command / programm, that is not installed in a terminal, the os tells you, what to do to install it.
For installing, you need to do two things.
At first, install the package via
sudo apt-get install command-not-found
and after that you must install the database via running once
sudo update-command-not-found.
That's it. From now on, your os will react a little bit more intelligent.
Have fun,
Karl
P.S.: sudo apt-get install bash-completion
will make it even better 
Last edited by captainhaggy (2010-05-01 15:54:41)
.....(редактируется)
Feb. 21st, 2013 02:05 pmsudo service ssh restart
http://www.x.org/wiki/FAQErrorMessages#AlreadyActive
Could not get lock /var/lib/dpkg/lock
sudo dpkg --set-selections < package.list && sudo apt-get dselect-upgrade
sudo dpkg --configure -a
??? sudo fuser -vki /var/lib/dpkg/lock; sudo dpkg --configure -a
sudo rm /var/lib/dpkg/lock
sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
http://unix.stackexchange.com/questions/59337/xming-debian-cant-open-display
startx -- :1
rm -rf /tmp/.X0-lock
~/.Xauthority required but missing
ln -s "$XAUTHORITY" ~/.Xauthority
ls -la ~/.Xauthority
??? x11vnc -display :0 -auth /home/USER/.Xauthority
export XAUTHORITY=/home/user/.Xauthority
su
xclock
http://www.linuxquestions.org/questions/linux-software-2/cannot-open-display-as-root-352200/
had same issue after syncing my home folder on Ubuntu 12.04. I resolved it using following commands:
rm ~/.Xaut* Then i logged out and re-logged in. Following warning arisen:
/usr/bin/xauth: file /home/iranice/.Xauthority does not exist After that, Linux created .Xauthority file automatically. I logged out and re-logged in and everything was OK :)
Good luck
http://superuser.com/questions/315050/xauth-x11-ssh-forwarding-problem
http://askubuntu.com/questions/40320/unable-to-copy-the-users-xauthorization-file
http://askubuntu.com/questions/124038/xauthority-required-but-missing
/etc/network/interfaces -- configuration
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
# The loopback interface
auto lo
iface lo inet loopback
# The first network card - this entry was created during the Debian installation
auto eth0
iface eth0 inet dhcp
partconf-mkfstab
###################################################################################
Making X windows work after su or ksu If you get the following error message > xclock X11 connection rejected because of wrong authentication. X connection to localhost:10.0 broken (explicit kill or server shutdown). The problem is that X uses an authentication mechanism called xauth which runs when you log in. When you use su or ksu to switch your identity, the xauth file of the new identity has different magic cookies than your local X server knows about and you get the above message. To fix this, you need to take your original magic cookie that xauth initially sets up and copy it into the xauth file of the new identity. Under your original identity, do the following: unity% echo $DISPLAY localhost:10.0 This tells you the display number that was setup for you via SSH. In the example the display number is 10. unity% xauth list unix:10 linux00xen.unity.ncsu.edu/unix:10 MIT-MAGIC-COOKIE-1 79f6967b5f825931b17dfc0002f45748 Note the display number in the above command! This prints out the cookie for your display. Put that string into your copy buffer. Next switch to the new identity: unity% sudo su - Password: # xauth add linux00xen.unity.ncsu.edu/unix:10 MIT-MAGIC-COOKIE-1 79f6967b5f825931b17dfc0002f45748 xauth: creating new authority file /root/.Xauthority You should now have the authentication for X setup. Try running the X app and it should work. ############################################################################## http://www.lns.cornell.edu/~dlr/acceleratorphysics/computing/unix.txt
