Smallpoke's Blog

hard to say…

Bunch of tips from Linux

How-to check your line speed? – iperf

Iperf is clinet/server application, on one side you have to start listener, on the other client. You need 2 computers for our test. Let’s start with server at myserver.mydomain.eu :

$ iperf -s -p 12222
------------------------------------------------------------
Server listening on TCP port 12222
TCP window size: 85.3 KByte (default)
------------------------------------------------------------

Client side yourclient.yourdomain.eu:

$ iperf -c myserver.mydomain.eu -p 12222 -t 60
------------------------------------------------------------
Client connecting to myserver.mydomain.eu, TCP port 12222
TCP window size: 16.0 KByte (default)
------------------------------------------------------------
[  3] local 192.168.1.21 port 36809 connected with 74.125.45.100 port 12865
[  3]  0.0-61.5 sec  1.51 MBytes    206 Kbits/sec

The example above shows communication between both computers through port 12222 (server listen port) and port # 36809 (its random outgoing port from client side). There is again a lot of settings, for more information use:

$ iperf --help

How-to disable Ctrl+Alt+Backspace? – xorg.conf

Find and modify your xorg.conf file (usually ‘/etc/X11/xorg.conf’ ) and put/modify there following section:

Section "ServerFlags"
        Option      "DontZap" "yes"
EndSection

Restart X server and try key-combination Ctrl+Alt+Backspace.

How-to change Windows/Linux encoding – iconv

File encoding on Windows is different to Linux. Sometimes we need to change it, so here is few examples:

$ iconv -f windows-1252 -t utf8 <file-with-win1252.txt >file-with-utf8.txt

There is a list of allowable types of encoding:

$ iconv -l

If you don’t know which encoding the file actually uses, you can try another utility:

Which encoding does this file use? – enca

$ enca my-file.txt

What about hundred files? – find

Example below changes all *.txt files in current directory from Win1252 to UTF8:

$ find . -type f -exec iconv -f cp1252 -t utf-8 {} \;
Advertisements

7 January, 2009 Posted by | Linux | , | Leave a comment

FlashPlayer 64bit – Firefox

This is a short HOWTO run Flash in Fedora10 and Firefox 3.0.x:

Download flashplayer from macromedia, eg.:

wget http://download.macromedia.com/pub/labs/flashplayer10/libflashplayer-10.0.d20.7.linux-x86_64.so.tar.gz

unpack it:

tar -zxvpf libflashplayer-10.0.d20.7.linux-x86_64.so.tar.gz

move file into library directory ( FF = 3.0.1):

mv libflashplayer.so /usr/lib64/firefox-3.0.1/plugins/libflashplayer.so

restart Firefox and enjoy!

31 December, 2008 Posted by | Uncategorized | , , | Leave a comment

General knowledge

There are many myths and half-truth about Linux. When I see some of them, I have to laugh, but sometimes I’m almost crying.

Stupid people know no bounds:

(i know, that you’re clever, but just for sure: this is an irony)

  • Linux is only for experts and technoids
    I always thought my 60-year-old father is an expert
  • Linux is too complicated
    Yes, my mother says the same all the time (i don’t know why she said the same about Windows).
  • Linux does not support games
    No, thousands users play from Linux the same game as you, but you can’t (is too complicated for you to read some README or HOWTOs – you are busy of course).
  • Linux is too large
    Yes, each person can choose from thousands of SW, but you can’t choose anything during installation, so you have to install whole internet to your computer. (because you can’t read)

And you can read much more nonsense through the internet about Linux … you know, stupid people are all around the world.

What you should really know about Linux:

  • Anyone can use Linux (dad, daughter, wife, girlfriend…)
  • Linux is as simple as possible (it’s up to you, how deep you want to understand it)
  • Linux supports many games (native code or you can use emulator for windows application wine)
  • There is distributions which can be running from floppy disk (but usually it takes 20min to install average desktop environment and it uses about 1GB disk space)

Trivia:

  • did you know, that there is about 50.000 Linux distributions? (most famous: RedHat, SuSe, Debian, Mandriva, Slax…)
  • most of distributions are provided for free
  • you can usually choose from many similar applications for same purpose
  • after install/update new SW you don’t have to reboot computer (there is about 1% chance that you have to reboot)
  • you can easy build WWW/FTP/DB/Game/Stream server

So don’t hesitate, try Linux!

31 December, 2008 Posted by | Linux | , | Leave a comment