Tuesday, May 14, 2013

error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'

error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'

in my case
my solution is simply comment out skip-bdb
Berkeley DB is no longer in 5.1x, so the option doesn't apply any more

Sunday, April 21, 2013

debian no sound

lsof /dev/snd/*

to find out what program are using sound device, some program might be hanging causing sound not to function

Wednesday, April 10, 2013

linux grep and sed to find through files and replace a string

grep -rl oldstring path | xargs sed -i 's/oldstring/newstring/g

find /path -type f -exec sed -i 's/oldstring/newstring/g' {} \;

Friday, April 5, 2013

Saturday, March 23, 2013

“No such file or directory” error when executing a binary

problem:
when try to execute a binary it shows error No such file or directory

reason:
your platform is 64 bit, and try to execute a 32 bit binary

confirm:
uname -m
file [your binary path]


solution:
apt-get install ia32-libs ia32-libs-gtk

Friday, March 22, 2013

apt-get install debian vnc viewer

sudo apt-get install ssvnc

How to Install Remote Desktop on Debian Server

su
apt-get update
apt-get upgrade
apt-get install gnome-desktop-environment
apt-get install tightvncserver
tightvncserver :1
tightvncserver -kill :1
vim ~/.vnc/xstartup
save the following to ~/.vnc/xstartup #!/bin/sh
xrdb $HOME/.Xresources
xsetroot -solid grey
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
# x-window-manager &
gnome-session &
restart vncserver tightvncserver -geometry 1280x960 :1