Monday, January 30, 2006

Setup Temperature Sensors

My machine keeps overheating and while I hunt for thermal paste my superkaramba wiget Cynapse keeps me upto date on the weather conditions inside the cabinet.
My Mobo: MicroStar International (MSI) KM266
My CPU: AMD Athlon XP 2200

Links to setup the lm_sensors:
Using Torsmo to Monitor Hardware
Getting SuperKaramba Sensors to Work in Fedora Core I

Output of my sensors-detect:

I will now generate the commands needed to load the I2C modules.
Sometimes, a chip is available both through the ISA bus and an I2C bus.
ISA bus access is faster, but you need to load an additional driver module
for it. If you have the choice, do you want to use the ISA bus or the
I2C/SMBus (ISA/smbus)?

To make the sensors modules behave correctly, add these lines to
/etc/modprobe.conf:

#----cut here----
# I2C module options
alias char-major-89 i2c-dev
#----cut here----

To load everything that is needed, add this to some /etc/rc* file:

#----cut here----
# I2C adapter drivers
modprobe i2c-viapro
modprobe i2c-isa
# I2C chip drivers
modprobe eeprom
modprobe w83627hf
# sleep 2 # optional
/usr/bin/sensors -s # recommended
#----cut here----

WARNING! If you have some things built into your kernel, the list above
will contain too many modules. Skip the appropriate ones! You really should
try these commands right now to make sure everything is working properly.
Monitoring programs won't work until it's done.


Output of sensors -f:
sorceress:/etc/rc.d # sensors -f
w83697hf-isa-0290
Adapter: ISA adapter
VCore: +1.55 V (min = +1.71 V, max = +1.89 V)
+3.3V: +3.09 V (min = +3.14 V, max = +3.47 V)
+5V: +4.89 V (min = +4.76 V, max = +5.24 V) ALARM
+12V: +11.31 V (min = +10.82 V, max = +13.19 V) ALARM
-12V: -11.87 V (min = -13.18 V, max = -10.80 V) ALARM
-5V: -4.85 V (min = -5.25 V, max = -4.75 V) ALARM
V5SB: +5.30 V (min = +4.76 V, max = +5.24 V)
VBat: +2.96 V (min = +2.40 V, max = +3.60 V) ALARM
fan1: 0 RPM (min = 3813 RPM, div = 2)
fan2: 3901 RPM (min = 10384 RPM, div = 2)
temp1: +86°F (high = +104°F, hyst = +32°F) sensor = thermistor
temp2: +187.7°F (high = +248°F, hyst = +239°F) sensor = diode
alarms: Chassis intrusion detection ALARM
beep_enable:
Sound alarm disabled

eeprom-i2c-0-51
Adapter: SMBus Via Pro adapter at 5000
Memory type: DDR SDRAM DIMM
Memory size (MB): 256

eeprom-i2c-0-50
Adapter: SMBus Via Pro adapter at 5000
Memory type: DDR SDRAM DIMM
Memory size (MB): 256

"Hello World" for UNIX

Explination and Semi Solution for the:
Exception in thread "main" java.lang.NoClassDefFoundError:
"Hello World" for UNIX

Vnc2Swf: Record your vnc sessions

After my prof. insisted that we use Microsoft Producer to record a video of the screen while we were coding his assignment I had to scour the net for its Linux equivalent.

Vnc2Swf basically records your vnc session. It requires a vnc server et viewer to be installed. The video is saved as a swf file.

Quick Info:
If you wish to create a movie of your complete desktop you can run it as follows:
x11vnc -localhost -viewonly &

If you'd rather share a single window run:
x11vnc -localhost -viewonly -id pick &

This will allow you to click upon the window you wish to share with your mouse - after you have done so your selected window will be shared and made available.

Now that you have a running VNC server upon your local host you can create the movie. To do so execute:
vnc2swf -nowindow -o myoutput.swf localhost

-Taken from: Debian Administration :: Creating training movies with Vnc2Swf

Other Links:
x11vnc
vnc2swf

Sunday, January 29, 2006

fstab

snippet of my /etc/fstab.
Allows users access to my Fat32 windows partitions and allows 'users' to modify the partitions.

/dev/hdb1 /windows/audio vfat user,users,gid=users,umask=0002,utf8=true 0 0
/dev/hdb6 /windows/neuro vfat user,users,gid=users,umask=0002,utf8=true 0 0
/dev/hdb5 /windows/video vfat user,users,gid=users,umask=0002,utf8=true 0 0
/dev/hdb7 /windows/virtuo vfat user,users,gid=users,umask=0002,utf8=true 0 0

Alias & httpd.conf

Snippets to create an Alias in Apache (similar to the IIS Virtual Directory).

# Alias for MaN-aT-aRMz
Alias /MaN-aT-aRMz "/windows/Neuro/MaN-aT-aRMz"
<Directory "/windows/Neuro/MaN-aT-aRMz">
Options Indexes FollowSymLinks MultiViews ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>

So, basically:
Alias /alias_name "/directory_to_create_an_alias_for"

Xorg.conf

Since I seem to crash my X server quite often when I swap cards and monitors and am lost about the config's of my monitors and gfx cards... sinppets of the /etc/X11/xorg.conf file

Samsung SyncMaster 151s:

Section "Monitor"
DisplaySize 300 230
HorizSync 30-81
Identifier "Monitor[0]"
ModelName "SYNCMASTER 4S"
Option "DPMS"
VendorName "SAMSUNG"
VertRefresh 56-75
UseModes "Modes[0]"
EndSection


BeNQ V772:

Section "Monitor"
DisplaySize 310 230
HorizSync 28-72
Identifier "Monitor[0]"
ModelName "BENQ V772"
Option "DPMS"
VendorName "BNQ"
VertRefresh 43-120
UseModes "Modes[0]"
EndSection


Gfx Onboard MSI KM266-8235

Section "Device"
BoardName "ProSavage DDR-K"
BusID "1:0:0"
Driver "savage"
Identifier "Device[0]"
VendorName "S3"
EndSection


nVIDIA GeForce2 MX400 32MB:

Section "Device"
BoardName "GeForce2 MX/MX 400"
BusID "1:0:0"
Driver "nvidia"
Identifier "Device[0]"
Option "alwaysshared"
#Option "NvAGP" "2"
#Option "NvAGP" "0"
#Option "NvAGP" "3"
#Option "NvAGP" "1"
Option "usevnc" "yes"
Option "httpdir" "/usr/share/vnc/classes"
Option "httpport" "5800"
Option "rfbauth" "/root/.vnc/passwd"
Screen 0
VendorName "NVidia"
EndSection


ATI Radeon 7000 32MB TVO:

**Still figuring it out..

Thursday, December 29, 2005

Freaking Amazing!! Apt for Suse

Ahhhh.... finally!!!
Apt.. no more worrying about dependancies... peace on earth!
Read This and Weep for Joy!
Wiki: Installing apt4suse
Once thats done, its a simple
apt-cache search [appName]
to find what you want. Once you do then:
apt-get install [appName]
will install it and it's dependancies for you..

Easy!

Mp3s with XMMS in Suse..

SUSE seems to have left out mp3 support with Suse 10. AmaroK plays mp3s fine but... Im more used to the WinAmp look..
So..
I installed Beep Media Player. Dont ask why..
Followed instructions from here: http://forums.suselinuxsupport.de/index.php?showtopic=21581
And installed the bmp-plugins-mad: Beep Media Player Plug-Ins from here: http://www.novell.com/linux/download/updates/93_i386.html

Voila! Baby you can sleep while I drive!!!!

Sunday, December 4, 2005

Forcing a drive to unmount...

If umount /mnt/[driveName] says that device is busy then it means that some process is still accesing the drive..

To check what process is accessing the drive, try
fuser -v /mnt/[driveName]..
In my case, i got

Sorceress:/windows # fuser -v /windows/audio/

USER PID ACCESS COMMAND
/windows/audio/ wraith 5854 f.... konqueror
root kernel mount /windows/audio


So all i do is kill the konqueror process with a
Kill 5854
and the device umounts successfully

Great source for understanding the /etc/fstab file that has the filesystem configuration information: http://www.tuxfiles.org/linuxhelp/fstab.html

Monday, November 28, 2005

Changing Permissions With Numbers

Each permission setting can be represented by a numerical value:


  • r = 4

  • w = 2

  • x = 1

  • - = 0


When these values are added together, the total is used to set specific permissions.


For sneakers.txt, here are the numerical permissions settings:



 -  (rw-)   (rw-)  (r--)
| | |
4+2+0 4+2+0 4+0+0

The total for the user is six, the total for the group is six and the total for others is four. The permissions setting, then, is read as 664.


If you want to change sneakers.txt so those in your group will not have write access, but can still read the file, remove the access by subtracting 2 from that set of numbers.


The numerical values, then, would become six, four, and four — or 644.


So type:


chmod 644 sneakers.txt

-- snapped from Changing permisions with Numbers

Monday, November 21, 2005

Installing RPM packages

Installing RPM packages:
# rpm -ivh filename.rpm : to install a new package, or
# rpm -Uvh filename.rpm : to upgrade an installed package

Saturday, November 19, 2005

Configuring KMLDonkey and mlnet

I struggled with this for quite a while, not really knowing what to do.. finally figured it out..

SUSE 10.0 came installed with KMLDonkey.. But for it to work the mlnet core is required so i downloaded the latest version from:
Followed the installation instructions from MLdonkey World
But after running ./mlnet it spewed this

wraith@Sorceress:~/mldonkey-2.7.0> ./mlnet
2005/11/19 20:35:41 Starting MLDonkey 2.7.0 ...
2005/11/19 20:35:41 Language EN, locale UTF-8
2005/11/19 20:35:41 MLDonkey is working in /home/wraith/.mldonkey
2005/11/19 20:35:41 [DNS] Resolving [Sorceress] ...
2005/11/19 20:35:41 [DNS] Resolving [www.mldonkey.net] ...
2005/11/19 20:35:42 Logging in /home/wraith/.mldonkey/mlnet.log

it would shutdown.. I was quite lost till i read the bit that said Logging in /home/wraith/.mldonkey/mlnet.log and checked the log file mentioned and found

2005/11/19 20:35:42 enabling networks: Exception: bind failed: Address already in use at port 4662
This is normally caused by another application currently using this port.
Close that application and restart MLDonkey, exiting...

so now I had to figure out what was blocking or running on port 4462.. Googled it and seems eMule runs on the same port and eMule was running everytime I tried to start the mlnet core.. So i changed the settings in eMule to use a different port and restarted eMule.

Tried the code again and it started fine. I ran KMLDonkey and changed the settings to point to the mlnet file for the core and it connected to the servers fine..

Thursday, November 17, 2005

Installing Limewire

The rpm on limewire.com didnt seem to work.. so i followed the instructions at: http://www.susewiki.org/index.php?title=Installing_LimeWire with some changes..

1. i got an error for the gedit line:
sudo: gedit: command not found
I guess gedit is some kinda text editor tool.. so i manually went to the folder and created the file and pasted the text in it..

2. The instructions seem to be for a Gnome system.. i run KDE.. so instead of creating a .desktop file in the gnome directory.. it created it in the kde directory...

Seems to work now... hmmmm.... DOWNLOAD!!!!!!

Sunday, November 13, 2005

Perfecting the Samba!!

Once again... reinstalled... put Suse 10.0 and learnt more abt configuring my box..
In my previous post abt samba I was unsure abt how I got Samba to start..

... So I guess the key is to coax the smbd, nmbd & winbindd services to run after making all the required changes.
-from Samba... Lets Dance!!!

Well.. it should have been obvious but being a newbie it didnt strike me...
When installed, Samba isnt initialized by default.. So basically Samba isnt started when the machine boots.. it needs to be manually started..
The way to get it to startup at boot is to go to the Samba Server tool in YaST and choose the 'start-at-boot' option.
To start SWAT change the line in the file 'swat' located in /etc/xinetd.d/ to
disable = no from the default 'yes'.

And thats it.. Initilize Samba and SWAT.. Configure the (/etc/samba/) smb.conf file... Create a user smbpasswd -a username and you're good to go!

Wednesday, June 22, 2005

Launch 'em Yahoo!!

Get Yahoo!'s Launch to work with Firefox. As you know Yahoo! is stuck on making LaunchCast work only with Internet Explorer.. Getting it to work with FireFox on Windows let alone FireFox on Linux seemed daunting..

At first I thought that Browser Masquerading was the answer, but that didnt work and even caused FireFox to crash a few times for some reason.. I gave up...

While browsing thru my fav forum linuxforums I stumbled upon a neat workaround..


All you have to do is:
1. Install the Grease Monkey extension for FireFox.. and restart FireFox.
2. Click and open the pklaunch.user.js in FireFox.
3. And install it by clicking on Tools / Install User Script...

Check Out Pooyak for more details..

Yahooooooooooo!

Monday, June 20, 2005

Quake 3: Fragg 'em all!!!

Finally got down to installing Quake 3 on linux... Installed the RPM and linked the pak0.pak file from my dump of Quake3.
Ran quake3 in the Konsole and.... baM! graphics problems..
ERROR:
You are using software Mesa (no hardware acceleration)!
..... (some more things... can't remember verbatim)
Sys_Error: GLimp_Init() - could not load OpenGL subsystem


Mostly means... No 3D acceleration enabled.. googled a bit.. Downloaded the NVidia Drivers and followed the instruction at LinuQuestions Forum

QUAKE 3: 3D Acceleration Solution...
1. went to a shell prompt CTL-ALT and F1.
2. Login as Root and enter the password.
3. at the prompt #init 3 which kills the Xserver.
4. go to the directory that has the NVIDIA installer and run the installer.
sh NVIDIA-Linux-1.0-(number or version).run -q <--this uninstalls previous driver versions and runs the new install
4. after the installer has created the kernel module the next step makes all the difference.
5. modprobe nvidia <--This previous step loads the nvidia driver into memory so sax will run correctly.
6. Then type sax2 -m 0=nvidia (0 is a digit, not a letter!)
7. After sax is done. enter init 5 to restart Xserver.[B]
8. Logout of the Shell and press CTL ALT F7 to be in the Window.
9. Reboot the System.

At step 7 I tried to make sax2 make my system look pretty by fiddling around.. and when i re-booted X crashed and wouldnt come back up... luckily I had made a copy of xconf (/etc/X11) i overwrote it (the mc editor rox!)... i ran the whole process again from step 1 and this time at step 7 I just went with what sax2 suggested,, and all was fine after a reboot!!.. phew!!

Tried to run quake3 again and woo hoo it works.. but no SoUNd!!!! bah!!
ERROR:
/dev/dsp: Input/output error
Could not mmap /dev/dsp"


some more googling and using common sense and I came across this: ALSA Wiki and typed in the konsole..

Quake 3: Sound Solution
(as root)
echo "quake3.x86 0 0 direct" > /proc/asound/card0/pcm0p/oss

echo "quake3.x86 0 0 disable" > /proc/asound/card0/pcm0c/oss


and with that... strangly.. sound works!! woo hoo.. but it works only in the Introduction Level, if i tried to play any level in Tier 1 or play in an Arena as soon as it said 'wRaiTh has entered game' the sound and video would hang.. so i had to kill the process by Ctrl+Alt+F1 and as root ps -A and kill (quake process number)

after more googling i tried: artsdsp -m quake3
but got..: artsdsp works only for binaries

more googling and forum posting led me to try: artsdsp -m quake3.x86 in the quake3 directory...

and volia!! it works!!! ... dug up some cd keys from google.. and im fraggin butt!!!!!

Sunday, June 12, 2005

Apache Virtual Directories

Struggling for days to try to setup virtual directories.. And no clue what Im doing.. Like playing in the muck..
Finally, I beleive what I was doing wrong was that after making changes to httpd.conf (/etc/apache2) & other config files, i didnt restart Apache.. I was under the impression that apache re-reads it's config files every so often.. I just realised that Samba does that.. Finally ive got my website up and I can access my windows mounts.. all is good...

To Restart Apache: apache2ctl restart (note: as root)

Changes made to make /windows/ a virtual directory...
... added to /etc/apache2/default-server.conf

# Aliases: aliases can be added as needed (with no limit). The format is
# Alias fakename realname
#
# This is an Alias for my /windows dir that has my
# windows drives that i want to be exposed on my site

Alias /windows/ "/windows/"

Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all


Moral of the story: Restart Service after changes..

Tuesday, April 26, 2005

Replacement Windows software in Linux.

Looking for a Linux equivalent of that windows software that you like?? check this out The table of equivalents / replacements / analogs of Windows software in Linux.

...One of the biggest difficulties in migrating from Windows to Linux is the lack of knowledge about comparable software. Newbies usually search for Linux analogs of Windows software, and advanced Linux-users cannot answer their questions since they often don't know too much about Windows :). This list of Linux equivalents / replacements / analogs of Windows software is based on our own experience and on the information obtained from the visitors of this page (thanks!).
...taken from LinuxShop

Linux Permissions

Every directory and file has an owner and an owning group. Similarly, each has permissions. These permissions are presented in the following manner:

owner - group - others

Permissions can be represented as numbers or as letters. For numbers, the following key is used:

Readable = 1
Writable = 2
Executable = 4

So to make a file rwx for only the owner, you would do
chmod 700 FILE

If you wanted it rwx by the owner and group, but only rx by others, you would do:
chmod 775 FILE


Permissions are also represented by letters. As such, a permission of 777 corresponds to:

rwxrwxrwx

775 would be

rwxrwxr-x

To change permissions in a letter way, you still use chmod, but you have different symbols:

u = owner (user)
g = group
o = others
r = readable
w = writable
x = executable

So to make a file have 777 permissions, you could do:
chmod uog+rwx

Or, since you're doing it to everyone, you could just say:
chmod +rwx FILE

But what if you want to do 775?

chmod ug=rwx
chmod o=rx

The = obviously sets the permissions to EQUAL that. The + adds those permissions, and the - removes those permissions.

...taken from post on Linux Forums: Root Prompt Access

Friday, April 22, 2005

Add Installation Sources

The Suse installation CDs have only so many .rpms. To simplify the search for .rpms you can add the two popular suse rpm websites to your Installation Source. So when you look thru the YaST install and remove packages it will not only scan your installation CD/DVD for the package but also the websites you add.

Go into "Change Source of Installation" in YaST and add the following two entries:

Add > HTTP
Server Name: packman.iu-bremen.de
Directory on Server: suse/9.3

Add > HTTP
Server Name: ftp.gwdg.de
Directory on Server: pub/linux/misc/suser-guru/rpm/9.3

NOTE: change 9.3 to your SUSE version. Also double check at the websites if they support your version. I know that Guru and Packman have sources for 9.1, 2 & 3.. but dont take my word for it.. double check

Yes.. I installed Suse 9.3.. I was thoroughly unsatisfied with 9.2. I installed 9.1 again and then downloaded 9.3 overnight and did a fresh install of it.. so many reinstalls.. so little 'brains'!.. There are a few sites like KNET that have torrents for Suse 9.3.. Run a search...