Skip navigation.

Beyond the Sky

The place where surface stop and share the experience of life

Posts tagged with "debian"

Network configuration

, , , ...

The most important step to do after finish installing your OS is to setting up network so that you will be able to connect to the internet. I discover that, setting up network for different kind of distribution is not the same, you need to know what configuration files to edit.

Red Hat Distro ( fedora, centos )
/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=static #dhcp
ONBOOT=yes
TYPE=Ethernet
NETMASK=255.255.255.0
IPADDR=192.168.1.2
GATEWAY=192.168.1.1


Debian Distro ( Ubuntu, etc )
/etc/network/interface
iface eth0 inet static # dhcp
address 192.168.1.2
netmask 255.255.255.0
gateway 192.168.1.1
dns-search somedomain.org
dns-nameservers 195.238.2.21 195.238.2.22


FreeBSD
/etc/rc.conf
# the interface name is variable, assume the interface name is lnc0
ifconfig_lnc0="inet 192.168.1.2 netmask 255.255.255.0"
defaultrouter="192.168.1.1"


If you specified DCHP, IP address and netmask can be ignore
Edit /etc/resolv.conf as well to put the DNS if static IP is specified
nameserver 202.188.1.5


Again, network script can be more complex, but with these settings it is enough to access internet.

Install packages without using Synaptic

, ,

To install only a package or some packages and load up synaptic is a waste of resources, because synaptic initialized with loads all the descriptions of packages and list up in gui list, and after installed the packages, it update the list again.

By combining using apt-cache and apt-get , I can perform something quite similar to synaptic in text mode and it is much much more faster.

Let say if i wanna find something use to read binaries, a hex reader or editor. I can seach the entire apt-cache to list the packages where package name and description that include the keyword i used, for example, i use keyword 'hex'

apt-cache search hex


Searching with keyword sometimes gives me too much info, i want something to be more specific, may be the package name start with 'hex'


apt-cache pkgnames hex


Now i want to know the descriptions and details of the package let say 'hexer'

apt-cache show hexer


To see other options available

apt-cache --help


Okay, let say i wanna install 'hexer', now it can be easily done by using apt-get

sudo apt-get install hexer


It solves all the dependencies for me just like synaptic and it is much much faster.

Ubuntu another version of Debian

, ,

Finally I screw up my Debian. I am helpless to get latest package coz i can't really find a good apt repository. I change the entire set of my debian sources.list and replace with another which it was more update. I update some packages and reboot my system. It gets critical error and refused to load gdm.

I am actually waiting for this to happen. I backup my home dir, clean the entire partition and load ubuntu. I spend around 1 week to fully make my debian function well, but I only need half a day to make it function with ubuntu. Thats why it is famous, the supports are good.

If Linux should call GNU/Linux, what should Ubuntu called? Debian/Ubuntu GNU/Linux. DUGL

connect printer from win xp to debian box, network settings

,

Need to write down, it order to refer next time in case i forgot.

Connect from XP, set network printer, select the 3rd option type in the url:

http://ip-address:631/printers/printer-name


Remember to check the cupsd.conf in /etc/cups
Search for <Location>
<Location />
Order Allow
Allow From All
</Location>


run ./etc/init.d/cupsys restart
to restart cups service

network setings in debian linux is under
/etc/network/interfaces #ip address and netmask settings
/etc/resolv.conf # DNS setting



Make your program behave nicely

,

I was facing critical performance flaw on my debian linux, where some of my program suck up all the processors consequently make my OS lag, my mouse movement gets jerky, xmms stop playing. The program that causes this are synaptic, apt-get (while unpack package) ,etc, when thy are running, it makes my cpu run 100%.

First of all I was thinking, maybe its my kernel, I manually compile my kernel, I might be screw up. Therefore i discuss with those debian experts at #debian channel of freenode. They told me,I can actually ask my program to behave nicely, just add nice infront of those program to ask them behave nicely.

I tried on it, it works! I finally discover every process have its nice value, which effects the process scheduling. The nice value is in range of (-20,20). The smaller the value is, the less nice the process, that means it will be scheduled to execute more often. My synatic actully have nice value -5, but most of the process are 0, so i change the shortcut properties of synatic, added nice -0 infront of the command. Xine works wonderfully clear in my debian box, but it sometimes less smooth. In order to make it more smooth, it have to do its work more often, so I append nice --5 infront of it.

To know what's processes nice value, can use top and ps. Just type top, look under ni field there you can get it. Or you may:
ps -o pid,ppid,args,ni -A

It lists all processes current running with only shows few field such as pid, ppid, process name and nice value.

Do my Linux Looks like Mac OS ?

, ,



It is gdesklets, while looking the way of make my linux looks like Mac OS i found out this.
Check out this,

What's Linux loaded?

,

I was wondering what have debian into my system, which i think some of the stuff i do not want, i just want to save my RAM, coz i discover that my linux seems to be jerky.

I found this page
http://www.techworld.com/opsys/features/index.cfm?featureid=294&Page=1&pagePos=16

The page might be obsolete, so i do want to code the important part


When it starts up, Linux looks at its startup directories to see what services to fire up. All Unix family operating systems have the concept of a "runlevel", which is the state to which the system boots.The two most common runlevels are 3 (standard multi-user mode with a command line prompt on the console screen) and 5 (multi-user mode with a graphical X-Windows user interface). You can see which runlevel your system is operating in by looking in /etc/inittab;you'll see an "initdefault" line that looks something like:

id:5:initdefault


I investigate my ubuntu, the default runlevel for me is 2, the user of this page is red hat user i suppose.


Linux's startup files live in a set of directories under /etc/rc.d. The actual startup scripts themselves live in /etc/rc.d/init.d,and the directories that relate to the various runlevels have symbolic links (like Windows shortcuts) to these main scripts.

Each runlevel has a directory within /etc/rc.d – these are called rc1.d, rc2.d, and so on – the number relates to the runlevel.So for runlevel 5, we care about the contents of /etc/rc.d/rc5.d.


Instead, for debian, runlevel script store directly in /etc such as /etc/rc0.d till /etc/rc5.d


If you want to disable something in your current runlevel,you'll need to change its "S" script to a "K" script. The trick here is to figure out what you need to change the ordering to – for instance, Sendmail starts up as S80sendmail, but stops as S30sendmail. The trick is to look in the runlevel 0 (halt) directory, as this shuts down pretty well everything, for a "K" script from which you can crib the appropriate number. So let's assume we want to stop the CUPS (printing) service from running. Its startup script in /etc/rc.d/rc5.d is called S90cups, so let's do a quick scan for items in /etc/rc.d/rc0.d that are called K??cups:



That is cool, i think i will try it tonight.

my Debian first snapshot

, ,

This is the first view after i have beautify my debian linux.

WMA support for XMMS and Beep Media Player (bmp)

, ,

In order to support wma media format, plugin is needed.

As usual i try to find it using apt-get, even i found a source for it, but it can't be install due to some silly error which i do not understand what is that.

So i decided to compile the source code. to compile xmms plugin ,you need to install xmms-dev

apt-get install xmms-dev


Then search for the xmms-wma source code, i found at this page http://mcmcc.bat.ru/xmms-wma/

The compilation shows bellow:

sudo su -
  ##put in your password
cd /usr/src 
wget http://mcmcc.bat.ru/xmms-wma/xmms-wma-1.0.5.tar.bz2
tar -xjvf xmms-wma-1.0.5.tar.bz2
cd xmms-wma-1.0.5
make
make install


The plugin file while had compiled is actually "libwma.so"

At the period of searching xmms wma support, I discover a new media player for linux "bmp"

apt-get install beep-media-player


and i copy the "libwma.so" to /home/<userusername>/.bmp/Plugins

Now i have two media player xmms and bmp :D

Setup my printer

,

Okay, I forgot i need to setup my printer and share, or else my sister is unable to print.

Currently look at this reference, hope that it helps

http://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/pdf/Debian-and-Windows-Shared-Printing.pdf
December 2009
S M T W T F S
November 2009January 2010
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31