Archive

Archive for the ‘Linux’ Category

Linux command line reference for common operations

May 24th, 2008 karlosp No comments
Categories: Linux Tags:

Linux: add | delet route

May 22nd, 2008 karlosp No comments

Checking the route table in Linux

CODE:
  1. netstat -rn
  2. route -n

Adding and Removing a Network in Linux

CODE:
  1. route add -net 10.10.10.0/24 gw 192.168.0.1
  2. route del -net 10.10.10.0/24 gw 192.168.0.1

Adding and Removing a specific host in Linux

CODE:
  1. route add -host 10.10.10.45 gw 192.168.0.1
  2. route del -host 10.10.10.45 gw 192.168.0.1

Adding a Default GW in Linux

CODE:
  1. route add default gw 192.168.0.1
  2. route del default gw 192.168.0.1

Categories: Linux Tags:

Resize a VMWare disk

April 23rd, 2008 karlosp No comments

Turn off the virtual machine;
Commit/remove all the snapshots first! (I forgot to mention this, thanks JimO)
Create a good backup of the files!;

Open a Command Prompt and go to:
C:\Program Files\VMWare\VMWare Server

Run this command to expand the virtual disk:

CODE:
  1. vmware-vdiskmanager -x 12GB "My harddisk.vmdk"

Note: Because this only expands the disk and not the partition, you'll need to resize the partition table as well. This can be done by 3rd party tools like 'Partition Magic', but also with 'diskpart.exe', builtin into Windows. In my case, this disk is a boot disk, meaning it can't be done on the virtual machine itself. I used another my 2nd virtual machine, running Windows XP.

Add the increased hard disk to a second virtual machine (must be turned off first!).

http://www.leonmeijer.nl/archive/2007/05/07/25.aspx

Categories: Linux Tags: , ,

Linux set eth0

April 23rd, 2008 karlosp No comments
CODE:
  1. ifconfig eth0 192.168.0.1 netmask 255.255.255.0 broadcast 192.168.0.255 up

Če

CODE:
  1. route

pri gateway nima vpisanega wireless gatewaya je potrebno ponovno nastaviti rute tabelo

CODE:
  1. route del default

Categories: Linux Tags:

Nastavitve za FRI eduroam linux wpa supplicant

April 22nd, 2008 karlosp No comments

wpa_supplicant.conf

CODE:
  1. ctrl_interface=/var/run/wpa_supplicant
  2. ctrl_interface_group=0
  3. eapol_version=1
  4. ap_scan=1
  5. network={
  6.      ssid="eduroam"
  7.      proto=WPA WPA2
  8.      key_mgmt=WPA-EAP
  9.      group=CCMP TKIP
  10.      eap=TTLS
  11.      phase2="auth=PAP"
  12.      identity="fri63050XXX@campus.fri.uni-lj.si"
  13.      password="geslo"
  14. }

Prijava v omrežje

CODE:
  1. wpa_supplicant -iwifi0 –Dwext –c/etc/wpa_supplicant.conf

Nekatere distribucije zahtevajo da proces teče v ozadju.

CODE:
  1. wpa_supplicant -iwifi0 –Dwext –c/etc/wpa_supplicant.conf -B

Če povezava ni uspešno vzpostavljena in bi radi preverili, kje je težava, vpišite ukaz in preverite, kje je težava:

CODE:
  1. wpa_supplicant -iwifi0 –Dwext –c/etc/wpa_supplicant.conf –dd

Če je potrebno: Nastavite še vmesnik na nivoju IP z ukazom:

CODE:
  1. dhclient wifi0

Categories: Linux Tags: , , , , , , ,

Share internet connection

April 21st, 2008 karlosp No comments
CODE:
  1. echo 1> /proc/sys/net/ipv4/ip_forward
  2.  
  3. /sbin/iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
  4. /sbin/iptables -A FORWARD -i eth0 -o wlan0 -j ACCEPT
  5. /sbin/iptables -A FORWARD -i wlan0 -o eth0 -j ACCEPT

Categories: Linux Tags:

Ubuntu 7.10 – Mjpeg streamer – Logitech QuickCam 5000 – ZoneMinder

April 6th, 2008 karlosp No comments

1. Installing UVC driver: klik
2. Installing ZoneMinder
3. Installing Mjpeg streamer:

      3.1 download from SF.net
      3.2 To compile and start the tool:
      CODE:
      1. tar xzvf mjpg-streamer.tgz
      2. cd mjpg-streamer
      3. make clean all
      4. export LD_LIBRARY_PATH=.
      5. sh start.sh

If missing jpeglib.h .... install: libgd2-xpm-dev

4.1 ZoneMinder configuration: zoneminder Wiki

Installing X (Fluxbox) on Debian

April 2nd, 2008 karlosp No comments

Installing X (Fluxbox) on Debian

I decided to use fluxbox, because it is light, and has all I need to work on my laptop, it the window manager that DSL uses, and I like DSL :) .

sudo aptitude install fluxbox

Now install the X-server

CODE:
  1. sudo aptitude install xserver-xorg

OK now we should have Fluxbox up and running, lets go for the basing menus, copy the default menu example to be your first menu

CODE:
  1. sudo cp /etc/X11/fluxbox/system.fluxbox-menu /etc/X11/fluxbox/fluxbox-menu

And copy the default user menu to your own Home directory to be your first fluxbox menu

CODE:
  1. cp /etc/X11/fluxbox/fluxbox.menu-user $HOME/.fluxbox/menu

Add X-term

I know you want to start fluxbox, but we need two more things to be able to start working in a GUI environment, the first thing is to install Xterm

CODE:
  1. sudo aptitude install xterm

Then add it to the Fluxbox menu, read how to add programs to Fluxbox menu to know how to do it.

Note that we have not installed KDM, GDM or XDM so we will have to start GUI in the old way

CODE:
  1. startx

If you do not want this, you can install gdm, or xdm, or kdm as you prefer, I want to keep this installation really light.
Beautifying the Desktop

Before installing the applications, lets make our Desktop a little bit more "eyecandy" if this word can be used, we will install conky which is one of my favorite applications in DSL, be sure to have own_window option to "no", for it to appear directly on your Desktop, as it do on DSL

To make Conky start each time you log into Fluxbox, add this line to $HOME/.fluxbox/startup

CODE:
  1. conky &

be sure it to appear before this other line

CODE:
  1. exec /usr/bin/fluxbox

Install fonts

In case of error

CODE:
  1. apt-get install --reinstall xfonts-base

Source:http://www.go2linux.org/installing-a-light-linux-operating-system-debian-fluxbox

Categories: Linux Tags:

ClarkConnect 4.2 mount USB disk

December 8th, 2007 karlosp No comments

mount -o umask=0000 -t vfat /dev/sdb5 /mnt/disk/

Categories: Linux Tags:

PCLinuxOS on VMware Mouse Scroll Problem

November 28th, 2007 karlosp No comments

Edit /etc/X11/xorg.conf

CODE:
  1. Section "InputDevice"
  2. Identifier "Configured Mouse"
  3. Driver "vmmouse"
  4. Option "CorePointer"
  5. Option "Device" "/dev/input/mice"
  6. Option "Protocol" "ImPS/2"
  7. Option "Emulate3Buttons" "false"
  8. Option "Buttons" "5"
  9. Option "ZAxisMapping" "4 5"
  10. EndSection

Categories: Linux Tags: , , , ,

Linux Set Mouse Speed

November 11th, 2007 karlosp No comments

xset m 3/2 1

Categories: Linux Tags: , , ,

Apache mod_rewrite cheat sheet

October 2nd, 2007 karlosp No comments

Hitra referenca za mod_rewrite
Apache mod_rewrite cheat sheet

.htaccess & .htpasswd

September 28th, 2007 karlosp No comments
94310 pages viewed, 377 today
49928 visits, 77 today
FireStats icon Powered by FireStats