Archive for category Linux
KDE 4.2
Pred kratkim je izsla nove verzija KDEja, pa sem se odlocil da jo malo sporobam…

Pozitivno presenecen. Priporocam. Vsaj test.
lpm
ssh client | per-server connect settings
Kolega me je opozoril na eno zelo uporabno stvar za ssh povezave… Vedno mi je najedalo, da sem moral pisati Username, port itd za ssh povezavo, kot npr: ssh username@server -p 12345 Ob vecjem stevilu streznikov zelo hitro pozabis na katerem portu poslusa kaksen streznik, povezes se brez usernamea in ti pograbi lokalnega,… Skratka en kup nepotrebnih tezav in izguba casa.
Resitev je v ~/.ssh/config fajlu, kjer lahko specificiramo kako naj se ssh poveze na kaksen streznik, lahko specificiramo tudi default nastavitve (globalno za vse userje lahko to nastavljamo v ssh_configu). Za nas primer bi torej napisali:
# server1 Host x.x.x.x User root Port 12345
Sedaj se na server povezemo s komando ssh server namesto z ssh username@server -p 12345
vse ostale nastavitve pobere iz omenjenega fajla. Seveda lahko nastavimo tudi default nastavitve, npr da po defaultu vzame root userja, ipv4, itd kot npr:
# default Host * User root TCPKeepAlive yes AddressFamily inet
Vse ostale nastavitve najdete tukaj.
lpm
GPRS AT komande
Ko sem nazadnje pisal o Merlin express kartici sem spustil nekaj pomembnega, kar sem kmalu ugotovil, ko sem se hotel namesto na 2,5 prikljuciti na 3,5 G omrezje in vpisati PIN kodo za kartico.
Skratka, opisal bom najpogostejse AT komande, preko katerih komuniciramo direktno z modemi, jim podajamo ukaze ter nadziramo njihovo delovanje. V Linuxu bomo to naredili rocno, medtem ko v windowsih to delajo namesto nas programi
Pri tem bom predvideval, da imate kernel support etc urejen, v kolikor ga nimate si preberite post o Merlin express kartici
Pravi moski uporabljajo konzolo!

GPRS AT komande
unix | list open files
uporabno, za v arhiv.
http://www.linuxjournal.com/content/list-open-files
Torej, ce ne moremo odmountati diska/naprave itd ker je device "busy" oz in use moramo najprej koncati vse procese/programe ki ta disk uporabljajo. Kateri so to zvemo s sledeco komando:
lsof /mnt/imediska
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME bash 6925 root cwd DIR 8,17 4096 1 /mnt/usbdisk/ xmms 6979 root cwd DIR 8,17 4096 1 /mnt/usbdisk/
lpm
Mozilla minefield | latest firefox build
Na voljo tukaj: http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/
Zadeva je res hitra, JS je celo hitrejsi od googlovega v8 – komplaksne strani prebavi brez tezav. Koncno tudi podpira multi-touch gestures na macu.
lpm
unix | terminal shortcuts
Uporabno.
Za Applov terminal:
| ⌘ + N | Create a new shell window |
| ⌘ + T | Create a new shell tab |
| ⌘ + ` | Next Terminal window |
| ⌘ + ~ | Previous Terminal window |
| ⌘ + } | Next Terminal tab |
| ⌘ + { | Previous Terminal tab |
| ⌘ + W | Close window or tab |
Pa se splosno za *unix sisteme:
| Ctrl-A | Move the cursor to the beginning of the command line. |
| Ctrl-B | Move the cursor back one character. |
| Ctrl-C | Break out of the command without any change to the settings. |
| Ctrl-D | Delete the character at the cursor. |
| Ctrl-E | Move the cursor to the end of the command line. |
| Ctrl-F | Move the cursor forward one character. |
| Ctrl-I | Recall a complete command name; same as the Tab key operation. |
| Ctrl-K | Delete all characters from the cursor to the end of the command line |
| Ctrl-L | Redisplay the current command line, same as the Ctrl-R key. |
| Ctrl-N | Recall the most recent command in the command history relative to the current pointer in the history list. |
| Ctrl-P | Recall the oldest command in the command history, beginning with the most recent command. |
| Ctrl-R | Redisplay the current command line; same as Ctrl-L key. |
| Ctrl-T | Transpose the characters to the left of the cursor with the character located at the cursor. |
| Ctrl-U | Delete all characters from the cursor to the beginning of the command line. |
| Ctrl-V | Insert a code to indicate that the immediately following value is a command entry. |
| Ctrl-W | Delete the word to the left of the cursor. |
| Ctrl-X | Delete all characters from the cursor to the beginning of the command line. |
| Ctrl-Y | Recall the most recent entry in the buffer (which contains the last ten items you deleted). |
| Esc-B | Move the cursor back one word. |
| Esc-C | Capitalize the word at the cursor. |
| Esc-D | Delete from the cursor to the end of the word. |
| Esc-F | Move the cursor forward one word. |
| Esc-L | Change the word at the cursor to lowercase. |
| Esc-Q | Insert a code to indicate that the immediately following value is a command entry. |
| Esc-U | Capitalize letters from the cursor to the end of the word. |
| Esc-Y | Recall the next deleted buffer. (Effective after using Ctrl-Y.) |
lpm
OpenSSH Socks proxy | secure browsing
OpenSSH ima built-in SOCKS proxy support – torej se lahko obnasa kot SOCKS proxy. wow.
Se ena lepa lastnost tega je da vse poteka preko kriptirane ssh povezave, torej lahko npr brskamo po spletu na varen nacin, tudi ce smo v "open omrezjih" kjer bi nas lahko kdo nadzoroval in nam snifal promet, kot na primer letalisca. Druga uporabnost pa je da lahko dostopamo do spletnih strani brez da bi IT team izvedel za to, vidijo se samo ssh kriprirani paketki.
Kaj potrebujemo? OpenSSH streznik z dostopom do interneta ter OpenSSH klienta.
1. Vzpostavimo kriptiran SSH tunel do streznika.
ssh -ND 9999 username@server_ip
voila, simple kot burek!
Tunel je vzpostavljen, s tem dvignemo socks proxy na svojem racunalniku na portu 9999 – karkoli pride na ta naslov se poslje v tunel na OpenSSH streznik, od tam pa v internet.
2. Nastavitev klientov
Sedaj moramo samo se nastaviti kliente, da bodo posiljali zahteve preko proxy streznika. To je seveda odvisno od vsakega browserja posebej in od osa – lahko celo kompleten promet posiljate preko proxy streznika.
nastavitve: tip: socks5, streznik: localhost, port: 9999
-firefox: tools – options – general – connection (http://broadband-proxies.com/configure-proxy-for-firefox.html)
- Internet Explorer: tools – internet options – connections – LAN settings (http://support.microsoft.com/kb/135982)
- OsX Leopard: Naredimo si nov location in skonfiguriramo proxy, vse ostale kliente potem lahko nastavimo naa system settings (http://www.tcd.ie/iss/internet/osx_leopard_proxy.php)
Seveda lahko nastavimo tudi vse druge povezave, like MSN chat, …, skratka karkoli kar podpira socks proxy-ing.
Naslednjic pa se instalacija in konfiguracija SOCKS streznika.
lpm
EDIT: En simple in uporaben programcek, ki naredi zgornje stvari namesto vas (MAC only) – secret socks.
linux | grep uncommented lines
Ce je ogromen config fajl je zoprno iti cez celega da vidis, katere vrstice niso zakomentirane… Tale komanda pomaga:
grep -v ^# fajl | grep -v ^$
lpm

