Tuesday, February 3, 2009

Accessing Windows Printer from Linux

In an organization the printers can be connected to windows. SO there should be some way to connect to the windows printer from linux. CUPS enables you to connect to windows printer. This is a small documentation on how I did it make possible.

I am running my machine on debian lenny 5.0. First I installed cupsys.cupsys-bsd, cupsys-client on my machine using package manager apt.

Then once it is installed you can manage the CUPS using web browser. Access it using the url : http://localhost:631/admin

1. Then added the printer by clicking add printer.
2. This will take you to another page where you need to provide the name you like to use, Location and description.
3. Once you click on Continue you will reach another place where you will be asked to select the printer.
4. For me it was HP laser jet. Next you will be asked to give device url.
There for me it was socket://hostname:9100
5. You will get information on this from the link Network Printers ont he same page.
6. Once you forward it will ask you to provide the manufacturer for the printer which was HP for me.
7. Then you will be asked to select driver. I selected the first one.
8. This will prompt you to add username and password which is the root and root password of machine respectively.

This will add the printer.
Give a test page to print in order to verify if the add was successful.
For fedora also the same way with one difference. For fedora the cups will be already installed. The rest is the same.
Enjoy printing!!!!!

Change the port of ekiga

Ekiga is an SIP phone which is running on the default port of 5060. If you want to change the port, you have to do the following. When you will need to change the port?? The default port for SIP is 5060. So when you are running the SIP server or more than one SIP clients you will need to change the port. Using GUI you can change the port like this.

Either you can take the terminal and type :

$ gconf-editor

Or you can go to Applications -> System Tools -> Configuration Editor

which open you configuration editor window. In this traverse to apps-> ekiga->port

and change the port.

How to connect system to LCD projector

System Specifications
Operating system : Ubuntu (Linux)
Graphics card : Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller

Steps for Setting up the system
Edit the xorg.conf file

Location of the xorg.conf file is /etc/X11/xorg.conf

Open the file and edit the section device like this :

Section "Device"
Identifier "Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller"
Driver "intel"
BusID "PCI:0:2:0"
Option "MonitorLayout" "NONE,LFP+CRT"
Option "DevicePresence" "true"
Option "CheckLid" "false"
EndSection

Installing tool

Now you need to install a tool to switch your display between the LCD display and your monitor.

sudo aptitude install i810switch

will install two tools called i810switch and i810rotate.

i810switch : Two commands can be used to switch your display. crt is the display on projector. so,

i810switch crt on

will switch to crt. Then,

i810switch crt off

will switch off the display on projector screen.

One more tool can be used,

i810rotate

which will switch on and switch off the display.

Sunday, February 1, 2009

Firefox starts in offline mode

I am using fedora 9 (sulphur), which I started to use a few days ago. On this I found that even though the network connection on the panel (up) as "no connection", the network is reachable. Also, I had issues with firefox and add/remove applications.

Firefox 3.0.5
The firefox 3.0.5 is found to be starting in the offline mode. So every time I had to go to the file-->offline and make it disabled so that I could access internet. This was found to be very awckward when I am in the office and working on something. Every time I had to do this.
Googling helped me to get the idea that it is the issue with network manager. Everyone was saying to disable the network manager and then the issue will be done which didn't work for me.
Another solution suggested was to edit the configuration of firefox. This can be done by typing the url about:config on the firefox.The url will give you a warning and by oversoming it you will proceed to the configuration. There you have to search for toolkit.networkmanager.disble and there you have to make it true (default will be false). This worked for me but not a general solution as the network manager is causing me problem in add/remove application too.

Further investigation revealed me that another sokution will work for the both.

Solution :
1. Open the System->Administration->Network which will the network configuration.
2. Select the edit for wired connection (or wireless) eth0 (eth0 for me).
3. In the General tab tick the check box saying Controlled by NetworkManager.
4. Click ok and exit.

Now if you restart firefox everything will work very fine.

Add/Remove

This application was giving the error saying that the network is not connected.
The same solution will work for add/remove apllication also.

Solution :
1. Open the System->Administration->Network which will the network configuration.
2. Select the edit for wired connection (or wireless) eth0 (eth0 for me).
3. In the General tab tick the check box saying Controlled by NetworkManager.
4. Click ok and exit.

Cheers !!!!

Tuesday, January 6, 2009

Increasing the swap space

How can you increase your swap space

For some application sometimes you will need more swap space than that what you have now. In my case I was having only 840 MB and when I tried to install Oracle 10g server i couldn't install it as it requires more swap space. So I had to increase my swap space. First you have to see how much swap space you are having now. For that go to terminal and type swapon -s which will show you the swap space and it will show you something like this

asha@asha:~$ swapon -s
Filename Type Size Used Priority
/dev/sda4 partition 979956 313344 -1

Now you can take some space from one of your partitions. And if you are having another partition other than / then better to take from that. And one warning is there.If you have some important data you better back up.

In order to create supplementary swap file you are using dd (data dump) command.You have to do it in the root.

So type in the terminal

dd if=/dev/zero of=/extra-swap bs=1M count=1024

We'll use the mkswap command to make our file swap-consumable for the Linux kernel.

mkswap /extra-swap

To turn on the swap file run

swapon /extra-swap

Now swapon -s will show the new file also.

And to make this swap on even after booting your machine you have to

cp /etc/fstab /etc/fstab.mybackup

Now its done. And you can continue with the installation.

Oracle Client installation

How can You Install Oracle client in ubuntu

First you have to get the Debian file. You will get it from the link : http://www.oracle.com/technology/software/products/database/xe/htdocs/102xelinsoft.html

Here you have to download the Oracle database 10g express client. If ou are using ubuntu then you have to get the *.deb file.You may have to make an account and get a username and password in that site For installing double click on the file you have downloaded.And follow the procedure. Then it will get installed and you can access the SQL CLI from the Applications --> Oracle client 10g Express edition.

If it is showing some error when you try to connect to the server, as shown in the figure.

Image:Oracle.png

Then you have to open the file nls_lang.sh. And in that file there will be some bugs. In that file make sure that in the lines 106 & 108 there is only single brackets. This will clear the bug and you can get it running.


Make the ntfs file system writable

How Can I Make the ntfs file system writable?

The ntfs file systems were read only on Linux. On the 14th of July 2006, a developer of the linux-ntfs team, Szabolcs Szakacsits, revolution this area by releasing a new driver ntfs-3g which claimed to provide full read/write support for all NTFS partition. After months of successful testing by hundreds of thousands of users in beta status, ntfs-3g is now fully stable.

For mounting NTFS you can use one small tool called NTFS-3G this is very powerfull and simple tool.

For those who are using Ubuntu 7.04 Feisty Fawn

Open the terminal and type $ sudo apt-get install ntfs-3g ntfs-config . This will make your windows ntfs partitions writable.

For those who are using Ubuntu 6.10 Edgy Ft.

Go to CLI . Then there type $ sudo gedit /etc/apt/sources.list

Then the gedit will open and there you have to add teh following lines in the last. Then save the file and exit.

deb http://givre.cabspace.com/ubuntu/ edgy main
deb http://ntfs-3g.sitesweetsite.info/ubuntu/ edgy main
deb http://flomertens.keo.in/ubuntu/ edgy main

Now update the source list by using the command $ sudo apt-get update

If you want to install ntfs-3g run the following command from your terminal $ sudo apt-get install ntfs-3g

Setting Themes

The first thing I do, when I install a linux will be making the machine look good. One of which is selecting a good theme. The theme plays a very important role in making a system user friendly especially when you install debian. The fresh installed system will have a classic look which is not much accepted by a person who is using windows xp or vista. I had an experience once. I was installing debian and after installation one of my friend who was watching the installation said "Oh GOD linux!!!" . Then I changed the themes and the looks of task bar, my friend said "wow Linux looks so great!!! "

The wallpaper plays an important role in looks. Get an eye freshening wallpaper on to your desktop or laptop.

The theme includes how the system should look like. The color of the window borders, task bar, the icons, all can be changed while setting the theme. The Themes can be access by:

Desktop --> Preferences --> Theme

There you can try selecting different themes which will change the task bar, icons and window borders.You can save new themes by changing the parameters. The parameters can be accessed by selecting the Theme Details. For deifferent combinations you can save themes.

Also you can download debian themes from sites and you can install it from the Theme window through install .
As on the figure you can get a nice task bar at the bottom by simply customizing the task bar. For this first you better add the windows list to the upper panel by right clicking on it and selecting Add to Panel . Then you can add show desktop to your upper panel. Now delete the lower panel and create new one by right clicking on the upper pannel, by selecting the New Pannel.

Now from the bottom new pannel select Properties .
Make the Size 50 , untick Expand, Autohide and Show hide buttons. Now select Background tab and select Solid Color sliding the Style to the left will make it transparent. Then add different applications by adding to panel which will list on your panel as icons. This will give a good look which is something similar to MAC os eventhough it is not a dock.

If you are interested in playing more with display effects you can get compiz-fusion installed on your machine.