Category Archives: Linux

Freeing up RAM in Linux

NOTE: Little clarification, this is not needed at all ,as memory is freed when required.

WHY IT MAY BE HELP-FULL: This clears the page-cache , dentires and inodes.

IT’S TRANSLATION : It may be that you are watching a movie or using a Virtual Machine , a resource hungry process has filled up your ram by caching data and the data needs to be continuously removed  to make space for new data . This is managed by the kernel.

IF YOU STILL DON’T  GET IT: Notice  video in your movie hanging (not audio) while your ram gets cached Or your system running a bit slow ?


1) Stop the process consuming loads of memory. (Check System Monitor).
2) Open a terminal with root privileges .
3) Sync
4) echo 3 > /proc/sys/vm/drop_caches
5) echo 0 > /proc/sys/vm/drop_caches

Install XBMC

XBMC (a.k.a. XBOX Media Center) is a great media center available on all platforms

If you have Ubuntu then see this
http://xbmc.org/forum/showthread.php?p=185738

For Fedora an unofficial rpm is available at http://www.fedorajunkies.com/index.php/XBMC

Installing From source:

0) Get Latest SVN Snapshot

svn co http://xbmc.svn.sourceforge.net/svnroot/xbmc/branches/linuxport/XBMC/

Fedora:
1)Get RPMFusion Repo:

rpm -Uvh  http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm

2)Install Dependencies :

yum install SDL* glew glew-devel libmad-devel tre tre-devel libogg libogg-devel libvorbis libvorbis-devel boost 
boost-devel bzip2-devel bzip2-libs fribidi* lzo lzo-devel mysql-libs mysql-devel jasper jasper-devel faac faac-devel 
enca enca-devel hal hal-devel hal-libs cmake gperf nasm libXmu-devel fontconfig-devel freetype-devel libXinerama-devel 
pcre-devel gcc-c++ sqlite-devel curl-devel pulseaudio-libs-devel libsmbclient-devel

3)Make sql symbolic link
– For i386

ln -s /usr/lib/mysql/libmysqlclient.so.15.0.0 /usr/lib/libmysqlclient.so

For 64 bit

ln -s /usr/lib64/mysql/libmysqlclient.so.15.0.0 /usr/lib64/libmysqlclient.so

4)Configure

cd linuxport/XBMC
./configure

5)Make

make

During this some errors may occur:
A)

../xbmc/utils/CharsetConverter.h:31:39: error: fribidi/fribidi_char_sets.h: No such file or directory

Sol:

cd xbmc
ln -s lib/libfribidi/ fribidi
cd ..
make

B)

/usr/include/jpeglib.h:1096:55: error: jpegint.h: No such file or directory

Sol:

cp xbmc/lib/cximage-6.0/jpeg/jpegint.h /usr/include/
make

C) For any other errors refer to fedorajunkies.com or fedoraforums.org

6) Install

make install

7) Configuring

Open xbmc by typing   xbmc in terminal or ALT+F2

-Settings > System >Audio Hardware
-Change Audio Output to Digital
-Change Audio Output Device and Passthrough Output Device to same device settings

(pulse -for fedora , hdmi/spdif- for ubuntu/debian systems)

You can also find out your device by using

aplay -L

8) To learn More about plugins and scripts Visit

http://www.xbmc.org/wiki

Reliance ATZ USB CDMA Modem on fedora , ubuntu and other linux

1) Find Vendor and ProdID

Do

cat /proc/bus/usb/devices

In the generated list where Manufacturer is ZTE , Incorporated

Take Vendor and ProdID

eg. Vendor=19d2 ProdID=fffd

-You can also use lsusb to get entry with ONDA Communication S.p.A in format   a:b

eg  19d2:fffd

2) Load Module
modprobe usbserial vendor=0x19d2 product=0xfffd

After this step 3 interfaces /dev/ttyUSB* where *(0-2)
should be created .(if not then rmmod usbserial ->remove device->modprobe again->insert device )

3)Configure (Run in root mode)(NOT FOR FEDORA go to 6)
wvdialconf

4)Edit /etc/wvdial.conf
Add number eg. #777
Add your username and password in the fields.

5)Run
Ideally running wvdial should be enough.
(try ping google.com to check if you are connected)

6)However in fedora(and if above steps dont work for you) after modprobe
Go to System>Administration>Network>New>Modem>
In Modem Properties (Despite error)
change device to /dev/ttyUSB0
Modem Volume=low
->Forward
Phone number #777
Username and Password -as you have
Provider Name -any
->Forward
Save And activate
Try ping google.com

Fixing Broadcom 802.11 Linux STA driver

Well Broadcom 802.11 Linux STA driver works with 2.6.25 Kernels but for newer kernels additional Parameters have to be included.Without supplying addidtional parameters following errors may arise while making

(Am using Fedora 9 i386 with a bcm 4312 rev 02)

error: too few arguments
to function ‘iwe_stream_add_point’

Warning: passing
argument 1 of ‘iwe_stream_add_event’ from incompatible pointer type

SOLUTION (THIS ALSO HOLDS TRUE FOR NDISWRAPPER)

1) cd hybrid-portsrc-x86_32_5_10_27_6/src/wl/sys

(or 64-bit ….x86_64.. .. instead of x86_32)

2) Make Backup and Open wl_iw.c

3) For Every “iwe_stream_add_event” and “iwe_stream_add_point” function calls Add a first Parameter info

save.

4)Now Try Compiling with instructions from my previous post

OR if you are 2 lazy Download this wl_iw.c and replace at above directory (USE THIS AT YOUR OWN RISK)

Installing Broadcom 802.11 Linux STA driver

Installing Broadcom 802.11 Linux STA driver

NOTE: All major distributions have released their packages for the driver.

Please use this guide only if the drivers in the repository don’t work or compiling is a hobby.

This driver includes
BCM4311, BCM4312, BCM4321, and BCM4322

Finally my HP 6515b with BCM4312 is free from ndiswrapper !!!!

A)
1) Depending on your system download 32 or 64 bit package
from http://www.broadcom.com/support/802.11/linux_sta.php

2) Go to a terminal to the dir with package.

3) tar -xvzf hybrid-portsrc-.tar.gz
Replace version with one you have

4) Install kernel headers (eg. in fedora “yum install kernel-headers”)

5) make -C /lib/modules/`uname -r`/build M=`pwd`

if There were no errors

6) Unload Modules from memory
rmmod ndiswrapper b43 ssb bcm43xx b43legacy

7) For WPA
modprobe ieee80211_crypt_tkip

8)Check if Compiled Module is working
insmod wl.ko

Now Probably a new interface will be there for wireless (wlan0 or eth-1)
To check it run
iwconfig
iwlist scanning

AND YES !! ITS Working !!!!!

B)Making it load on boot

1)cp wl.ko /lib/modules/`uname-r`/kernel/net/wireless/

2)depmod -a

3)rmmod wl

4)modprobe wl

5)Add following Lines to /etc/rc.local (in openSuse /etc/rc/rc.d/boot.local)


modprobe wl

NOTE: If You Have Problems See README on the package page or post in troubleshooting page

IALvPY3.0 Released

I-ON AUTO LOGIN SCRIPT v PY3 RELEASED

How To Use:

1) Python must be installed

2) Python imaging Library must be installed (installed on linux by default)

3) Go to terminal or command prompt , type

python IALvPY3.pyc

Whats New:

1) Faster + Wont Hang (Entire Modules aren’t loaded any more )

2) Organized Data into Seaprate Folder IALData

3) Daily log to keep count whenever the script logs in

4) Its Completely in Byte Code Form

Download

If u want source code , take it from me directly.

Making VLC play in Fedora 9

Well I installed VLC ( formerly called Video Lan Client) today on my installation of fedora 9 and like any other video player it 2 was not working, so here are the settings that worked for me:

1) Go to Settings>Preferences>Check Advanced Options
2)Audio>Output Modules>Select ALSA Audio output >ALSA>Refresh List>Select Device
3)Video>Output modules>Select X11 Video Output

Well Thats about it

Enjoy!!!