Sunday, September 24, 2006

Linux:: How to make a substitution in VIM?

Just type:
and then
To highlight a string, just move the cursor to the strinf, then press and then # to move from one occurrence to another, just press n.

Linux:: Use of ssh-agent

You often connect remotely by using ssh… and you are fed up of always having to enter your password: ssh-agent is made for you. ssh-agent is a daemon whose only goal is to keep in memory (in a protected way) the “passphrase” so that it is not necessary to type it with each use of ssh.
The following order creates the variable SSH_AUTH_SOCK which contains the way of a socket that ssh, SCP (and other orders) will use to dialogue with ssh-agent:
$ ssh-agent

To communicate the private key and the sentence of master key to ssh-agent by means of ssh-add:
$ ssh-add ~/.ssh/id_rsa
Enter the passphrase for /home/user/.ssh/id_rsa:

The private key is thus deciphered and stored in the mask of ssh-agent, lends to being used

One can now use ssh and SCP without having to enter the password.

Linux:: How to install IMVU on Linux

Sorry, I do not have a magic receipt, I tested Wine and Crossover well, but I had some problems with glu32.dll and opengl32.dll… I have thus to try the vitualisation and my Windows machine in Qemu. It is great, it works! I launch only that, and I have to remove the updates automatic of Windows, But yes, I can regenerate my virtual machine, therefore in the worst case the virus or the Trojan will remain there only one hour or two: -) not of chance for hackers. Moreover I am seeking how to accelerate my virtual machine: there that could become really a magic receipt, moreover if you have some already: as usual leave me a message

Friday, September 22, 2006

Linux:: How to compare two list and find common element with Perl?

This trick can only be used if you are sure that there is no double value in a same list. You will understand why. First create an hash table (%seen), the basic idea is for each element ($_) of the merge of the two list, we will store it in the hash table. The first time the value is store; seen value is equal to 0, so the grep filter prevents this value to be record in @common. The second and other time an element will be seen, because it will be store with the same key value, the $seen{$_ } will be not null and so the element pass the test of the filter and is recorded.

my %seen;
my @common = grep {$seen{$_}++} @list_1 , @list_2;

but for doing that you need that list are unique (not two times the same element in the same list.) For doing that you can use this function:

sub Array_Uniq
my @List = @_;
my %FutureList;
$FutureList{$_} = 1; # delete double values
return (keys(%FutureList));

Friday, September 15, 2006

Linux:: XEN

It makes a long time that I didn't speak about virtualisation However it is a subject which will be discussed more and more . Moreover the RedHat company has just announced the nearest installation of technology XEN within its version for professional. Contrary to other technologies of virtualisation such VMWare or Qemu which simulates the material and the bios, the virtual machines under XEN has access to the material thanks to XEN modified kernel. The result of this other paradigm is a virtual machine almost as fast as the machine host. So enjoy the virtualization!!! The only constraint is that the architecture of the virtual machines must enable them to use the technology XEN… contrary to VMWare and Qemu which does not require modification of guest” OS. It is not a problem with opensource OS such Linux, whose code was already modified to be able to turn with XEN, on the other hand what is at stake is Windows… And it is there that the real difficulty arises: much user of Linux uses a virtual machine to make turn Windows, even if the team of XEN said to have modified Windows to allow to make it turn under XEN, some licences prevent the team from publishing Let us hope that the agreement between Microsoft and XEN could change the situation. In addition the arrival of dual the core and technologies of virtualisation directly within the processors should end licence's problems mentioned herebefore and another side to still improve quality of virtualisationThe bootloader could thus belong very soon to last and the stories of I am under such OS, I must rebootwill be finished soon.

Friday, September 01, 2006

Linux:: DVB-T Freecom TV on your PC

I have just bought a DVB-T usb key Freecom. I thus took one having best price quality: Freecom DVB-T

I bought it on the Amazon web site for some 45$ It works well under Windows: even if the installation program is quite bad… that still finish to work. The good point is that the antenna comes with a MediaCenter software: very interesting when as me you have only one Windows XP pro without the media center. But you suspect well that I have to install it under Linux; -) Guess? YES! It works better: no problem the image never freeze : a pleasure and all that with only the small provided antenna! To install the DVB-T key, do not try modify your kernel and to add modules to it; best is to use tools from linuxtv:
  1. Download the firmware: dvb-usb-wt220u-fc03.fw
  2. cp dvb-usb-wt220u-fc03.fw /usr/lib/hotplug/firmware/
  3. apt-get mercurial build-essential (et les header de votre kernel si vous avez un kernel standard)
  4. mkdir /usr/src/modules
  5. cd /usr/src/modules
  6. hg clone
  7. cd v4l-dvb
  8. make-config
Answer to the questions as there:

# using defaults found in .config
* Linux Kernel Configuration
* Multimedia devices
Video For Linux (VIDEO_DEV) [N/m/y/?] n
* Digital Video Broadcasting Devices
DVB For Linux (DVB) [Y/n/?] y
DVB Core Support (DVB_CORE) [N/m/y/?] m
* Supported SAA7146 based PCI Adapters
* Supported USB Adapters
Support for various USB DVB devices (DVB_USB) [N/m/?] (NEW) m
Enable extended debug support for all DVB-USB devices (DVB_USB_DEBUG) [N/y/?] (NEW) n
AVerMedia AverTV DVB-T USB 2.0 (A800) (DVB_USB_A800) [N/m/?] (NEW) n
DiBcom USB DVB-T devices (based on the DiB3000M-B) (see help for device list) (DVB_USB_DIBUSB_MB) [N/m/?] (NEW) n
DiBcom USB DVB-T devices (based on the DiB3000M-C/P) (see help for device list) (DVB_USB_DIBUSB_MC) [N/m/?] (NEW) n
HanfTek UMT-010 DVB-T USB2.0 support (DVB_USB_UMT_010) [N/m/?] (NEW) n
Conexant USB2.0 hybrid reference design support (DVB_USB_CXUSB) [N/m/?] (NEW) n
Nebula Electronics uDigiTV DVB-T USB2.0 support (DVB_USB_DIGITV) [N/m/?] (NEW) n
TwinhanDTV Alpha/MagicBoxII, DNTV tinyUSB2, Beetle USB2.0 support (DVB_USB_VP7045) [N/m/?] (NEW) n
TwinhanDTV StarBox and clones DVB-S USB2.0 support (DVB_USB_VP702X) [N/m/?] (NEW) n
GENPIX 8PSK->USB module support (DVB_USB_GP8PSK) [N/m/?] (NEW) n
Hauppauge WinTV-NOVA-T usb2 DVB-T USB2.0 support (DVB_USB_NOVA_T_USB2) [N/m/?] (NEW) n
WideView WT-200U and WT-220U (pen) DVB-T USB2.0 support (Yakumo/Hama/Typhoon/Yuan) (DVB_USB_DTT200U) [N/m/?] (NEW) m
Technotrend/Hauppauge Nova-USB devices (DVB_TTUSB_BUDGET) [N/m/?] (NEW) n
Technotrend/Hauppauge USB DEC devices (DVB_TTUSB_DEC) [N/m/?] (NEW) n
Terratec CinergyT2/qanu USB2 DVB-T receiver (DVB_CINERGYT2) [N/m/?] (NEW) n
* Supported FlexCopII (B2C2) Adapters
Technisat/B2C2 FlexCopII(b) and FlexCopIII adapters (DVB_B2C2_FLEXCOP) [N/m/?] (NEW) n
* Supported BT878 Adapters
* Supported Pluto2 Adapters
Pluto2 cards (DVB_PLUTO2) [N/m/?] (NEW) n
* Supported DVB Frontends
* Customise DVB Frontends
* DVB-S (satellite) frontends
ST STV0299 based (DVB_STV0299) [N/m/?] (NEW) n
Conexant CX24110 based (DVB_CX24110) [N/m/?] (NEW) n
Conexant CX24123 based (DVB_CX24123) [N/m/?] (NEW) n
Philips TDA8083 based (DVB_TDA8083) [N/m/?] (NEW) n
Zarlink VP310/MT312 based (DVB_MT312) [N/m/?] (NEW) n
VLSI VES1893 or VES1993 based (DVB_VES1X93) [N/m/?] (NEW) n
Samsung S5H1420 based (DVB_S5H1420) [N/m/?] (NEW) n
* DVB-T (terrestrial) frontends
Spase sp8870 based (DVB_SP8870) [N/m/?] (NEW) n
Spase sp887x based (DVB_SP887X) [N/m/?] (NEW) n
Conexant CX22700 based (DVB_CX22700) [N/m/?] (NEW) n
Conexant cx22702 demodulator (OFDM) (DVB_CX22702) [N/m/?] (NEW) n
LSI L64781 (DVB_L64781) [N/m/?] (NEW) n
Philips TDA10045H/TDA10046H based (DVB_TDA1004X) [N/m/?] (NEW) n
NxtWave Communications NXT6000 based (DVB_NXT6000) [M/?] (NEW) n
Zarlink MT352 based (DVB_MT352) [M/?] (NEW) m
Zarlink ZL10353 based (DVB_ZL10353) [N/m/?] (NEW) m
DiBcom 3000M-B (DVB_DIB3000MB) [N/m/?] (NEW) n
DiBcom 3000P/M-C (DVB_DIB3000MC) [N/m/?] (NEW) n
* DVB-C (cable) frontends
VLSI VES1820 based (DVB_VES1820) [N/m/?] (NEW) n
Philips TDA10021 based (DVB_TDA10021) [N/m/?] (NEW) n
ST STV0297 based (DVB_STV0297) [N/m/?] (NEW) n
* ATSC (North American/Korean Terrestrial/Cable DTV) frontends
NxtWave Communications NXT2002/NXT2004 based (DVB_NXT200X) [N/m/?] (NEW) n
Oren OR51211 based (DVB_OR51211) [N/m/?] (NEW) n
Oren OR51132 based (DVB_OR51132) [N/m/?] (NEW) n
Broadcom BCM3510 (DVB_BCM3510) [N/m/?] (NEW) n
LG Electronics LGDT3302/LGDT3303 based (DVB_LGDT330X) [N/m/?] (NEW) n
* Miscellaneous devices
LNBP21 SEC controller (DVB_LNBP21) [N/m/?] (NEW) n
ISL6421 SEC controller (DVB_ISL6421) [N/m/?] (NEW) n
DABUSB driver (USB_DABUSB) [N/m/?] n

  1. make
  2. make install
Now you only need to reboot your pc and there is a small orange light… You do it: congratulation! Now go in Kaffeine: play a little with the configuration menu and now you should be able to watch TV programs on your computer: cool isn't it. Of course before that I had some problem but if you have problem write a post and I will try to help you