Showing posts with label Linux Networking. Show all posts
Showing posts with label Linux Networking. Show all posts

Sunday, October 03, 2010

Run your DataCard on OpenSuse 11.3


Past many nights, I spend playing with scripts and USB configuration to connect my ZTE data-card on Linux and results were disappointing.... But the Good News is: I finally got it work and surprisingly without working on any script.
Well solution is very very simple and here it is........
run YaST
Authenticate as root

In Network Devices select Modem
In Modem Configuraion Overview click Add
In Modem Parameters choose your modem device e.g. /dev/ttyUSB0 (already detected). Click Next
In Select Internet Service Providers Choose New
In Provider Parameters fill The followings:
Provider Name e.g. Reliance
Phone No. e.g. #777
User Name 93XXXXXXXX and Password ********** and Click Next
In Connection Parameters select Automatic Dialing and Click Next
You will be back to Modem Configuraion Overview click OK.... its done
Run qinternet from Application Browser (it comes with SUSE. if you did not install it use YaST)
In side the lower panel a "plug" like icon will appear. Click it for connecting/disconnecting.

Tuesday, August 31, 2010

YUM : Proxy authentication cofiguration

You are connected through proxy server which asks for authentication (i.e. username & password). In this case you have to make some configuration to work with YUM. So simply follow these instructions:
open your terminal as root and type:

#gedit .bashrc hit Enter

you can use vim, emac instead of gedit.
Type the following at the end of file:

export http_proxy="http://username:pw@proxyserver:port" 
hit Enter, then save file. close gedit and restart your computer

username & pw is your proxy username & password respectively. proxyserver:port is address of your proxy server with port e.g. export http_proxy="http://mac:jack@10.1.1.18:80"

Monday, August 30, 2010

Set up the VNC Server in Fedora Core Part:1


Prerequisites

A user account should exist on the remote machine.
The RPM packages vnc-server and vnc should be installed on the remote machine and your workstation respectively.
Setting up the server

I assume that we have setup a remote user account, named "leopard" and we want to start an X session through VNC for this user.

In Fedora Core or Red Hat based distros in general, all we have to do is define the VNC server instances in /etc/sysconfig/vncservers. These will be started by the vncserver initscript. This has to be done as root. Edit this file so that it contains the following:
VNCSERVERS="3:leopard" 
VNCSERVERARGS[3]="-geometry 1024x768 -depth 16"
With these we define that a vnc server instance should be started as user leopard on display 3 and we also set some options for this server such as resolution and color depth. Each VNC server instancelistens on port 5900 plus the display number on which the server runs. In our case, leopard’s vnc server would listen on port 5903.

For multiple vnc instances /etc/sysconfig/vncservers would look like this:
VNCSERVERS="1:tiger 2:albatros 3:leopard" 
VNCSERVERARGS[1]="-geometry 1024x768 -depth 16" 
VNCSERVERARGS[2]="-geometry 800x600 -depth 8" 
VNCSERVERARGS[3]="-geometry 1024x768 -depth 16"
These would listen on ports 5901, 5902, 5903 respectively.

Set up the VNC Server in Fedora Core Part:2

User Configuration
There is one more thing that needs to be done on the remote machine. User leopard’s vnc password needs to be set. So, as user leopard give the command
:
# vncpasswd
We are prompted for a password. This is the password that we will use when we connect to leopard’s vnc server instance. This password is in /home/leopard/.vnc/passwd.

Start the VNC server
After the initial configuration is done we restart the vnc service. As root:# service vncserver restart
To make VNC server to start on boot:
# chkconfig vncserver on

More User Configuration
After the VNC service is started, some new files are created in /home/leopard/.vnc/ directory. These include leopard’s vnc server log file, pid file and an X startup script. As user leopard we edit the script in order to customize some settings. The default /home/leopard/.vnc/xstartup script contains some commands that are executed when the VNC server is started. These include:
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &

xsetroot in this case sets the background color.

vncconfig is a supplementary program that can be used to control the vnc server. Apart from this, when run without arguments it acts as a helper application and its main purpose is to provide support for clipboard transfers between the client (vncviewer) and the vnc server. xterm starts an xterm terminal. twm starts the X server’s default window manager. We probably want to change that to a more user friendly window manager, eg fluxbox.

Set up the VNC Server in Fedora Core Part:3

The VNC server, apart from letting us control a remote machine using a graphical interface, it serves as a way to start graphical applications on boot. For example, I want my favourite p2p program, amule, to start on boot. So, I add this to the /home/leopard/.vnc/xstartup script. This is how my xstartup file looks like:
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" -e ./menu &
amule &
fluxbox & 
menu is a script of mine that is executed when xterm is started.
Remember to put the "
&" symbol after each command, so that it goes to the background and the xstartup script continues on.
Restart the VNC service for the changes to take effect. As root:
# service vncserver restart

Connect to the VNC server

In our example, leopard’s vnc server listens for connections on port 5903. So, open this port in the remote machine’s firewall.
We connect to the remote machine using a vnc viewer. Having installed the vnc package, connect to to the server with the following command:
# vncviewer 192.168.0.1:5903:3
The general usage is :
vncviewer [Server's IP]:[Port]:[Display]
We are prompted for the password and eventually connect to the server. Closing the vncviewer’s window, does not affect the server or the programs we run on it. If we reconnect everything will be there.

Saturday, August 28, 2010

Share your files on LAN with Samba Server

Hello friends!
Here we are going to see how we share files on LAN with Samba.
1. Goto System > Administration > Server Settings > Samba
2. Enter your root password in a popped 'Query' window( to gain root privilege)
3. Preferences > Server settings > Basic
you have two things now. Work group & Description
fill Workgroup with your workgroup name and brief description about it in Description.
4.now goto Security fill Authentication Mode - 'Share'
Encrypted password - NO.
Gest Account - select a valid account. > OK
5. Now Add Share files.
but firewall will ask for a password now
ok to handel this go to System > Administration > Security Level and Firewall > Firewall Options
male sure that box is clicked active for Samba .
6. Now SElinux > Modify SElinux Policy > Samba
click the box for Allow samba to share users home directories.
> OK
well it was the simplest configuration.