02.28.08
Posted in Linux at 03:05 by Arkham
If you are terminal vim users, I’m sure you have tried to copy/paste text into a file and thought “Wtf, this is pretty damn wrong” seeing something like this:
void
randomize (void)
{
struct timeval *tv = malloc (sizeof (struct timeval));
struct timezone *tz =
(struct timezone *) malloc (sizeof (struct timezone));
gettimeofday (tv, tz);
srand (tv->tv_usec);
free (tv);
free (tz);
}
That’s called vi staircase effect.
The solution is to type:
before pasting and
after finishing.
Alternatively, just add to your ~/.vimrc:
nnoremap <silent> <F12> :set paste!<CR>
to press F12 for toggling between paste and nopaste conditions.
Permalink
02.27.08
Posted in Linux at 20:05 by Arkham
Download the source here.
Now open a root terminal and create the folder:
mkdir -p /usr/src/modules
Move the package to the new folder and move into it:
mv <gspcav1_package> /usr/src/modules
Extract and move into it:
tar -xzvf <gspcav1_package>
Compile and install:
Remove eventually previous version of the module and load the new one:
modprobe -r gspca && modprobe gspca
Plug-in the webcam, and you should see something in dmesg.
Now you can just test with
mplayer tv:// -tv driver=v4l:width=352:height=288:device=/dev/video0
or using programs like xawtv, camorama, amsn or skype. Have fun
Permalink
02.19.08
Posted in Linux at 23:50 by Arkham
I’ve installed the Nvidia driver from the binary package and when I restarted, X couldn’t start and gave me a nice blue welcome screen; the X log told me that my kernel module version was 1.0-7184 and my nvidia driver version was 1.0-9755.
I tried with
sudo apt-get remove --purge nvidia-kernel-common
but the fine ubuntu hugemetapackages&&weirddependencies system suggested me to remove all my restricted kernel modules.
So I ran
sudo vi /etc/default/linux-restricted-modules-common
and added nvidia to blacklist the restricted nvidia module.
Everything works fine now, btw.
Permalink
02.12.08
Posted in Linux at 00:28 by Arkham
1 ) Put a Ubuntu CD in your CD/DVD drive, reboot, and set the BIOS to boot from the CD drive. Wait until you see the Ubuntu desktop
2 ) Go to Applications -> Accessories -> Terminal and gain root priviledges with
3 ) Load your keyabord map with
Example:
4 ) Create a new file with
5 ) Write the line
Acquire::http::Proxy "http://[user]:[pass]@[proxy_ip]:[port]";
Example:
Acquire::http::Proxy "http://camp:1234@192.168.10.4:3128";
6 ) Ctrl + O to save and Ctrl + X to exit
7 ) Go to System -> Preferences -> Network Proxy and fill the proxy settings (don’t forget to click on advanced, if the proxy requires authentication)
8 ) Launch the Ubuntu usual installer
9 ) Cross your fingers and pray thy Holy Shuttleworth to have pity for thy damned soul
Here you go!
Permalink