Wednesday, May 25, 2005

MSVDM - Microsoft Virtual Desktop Manager

Hmm, hari ni kurang sihat sikit. Kaki sakit, kepala pun sakit. Badan pun sakit. So, minda pun terganggu sikit. Kerja-kerja yang hendak dibuat tak boleh nak difokus.

While my mind was on something else (and my finger is busy tapping the keyboard and dragging the mouse on the laptop..which runs Ms Windows). Normally I use to work in Linux, so normally we have this virtual desktop functionality in the windows managers, such as KDE, Fluxbox. Suddenly, lepas dah clutter kan gila-gila desktop tu.."Argh..kenapa la tak ada VIRTUAL DESKTOP dalam Windows ni?"

Sometimes, we have to be flexible. Tiba-tiba aku dapat satu idea. "Kenapa tak cuba cari?"

So, I manage to minimize all the running application. So, I opened up my browser and redirect it to Google.com and start searching "windows virtual desktop".


So by now, for you all who is not very familiar with all this virtual desktop, maybe you are wondering, what the hell is virtual desktop? A virtual desktop is err.. desktop. But virtual. Susah nak terangkan. Kena cuba sendiri baru tahu. It is some sort like, having multiple desktop/monitor, in a sense which you can dedicate each desktop/monitor to run certain job/application only, so that you don't have to fit all the things/applications into one desktop. As a summary and to make things easier, it is like having two or more monitor at one time. This virtual desktop completely useful for a user who multitasks (working with a lot of applications concurrently) heavily..

So I found a few relevant results. Ada yang free, ada yang kena bayar. But I prefer to choose the one which Microsoft officially release. Yes, it is one of tools grouped into XP Power Toys (such as TweakUI) and it is free (make sure you pay for the OS :-P). It is called 'Microsoft Virtual Desktop Manager'. So, I click to enter the website and downloaded the installer. As usual, double click the file to install :)

Enable it
After finishing the installation process, it is a bit 'cacat' because the installer did not instruct anything, expecting the user to know everything. Damn it. Kena cari pulak satu-satu kat mana dia letak virtual desktop punya some sort like controllong panel.

Seems that I've been using virtual desktop in Linux for a while, so I can guess it should be located somewhere around the taskbar. Cari punya cari, at last jumpa. By default, it is not enabled/showed. So to enable it :

Taskbar (right click) > Toolbars > Virtual Desktop Manager

So, you will get a 'MSDVM' panel in your taskbar. 4 blue numbered button and 1 green button.
As you can see, MSVDM limits you to have only no more or less than 4 virtual desktops at a time (represented by the blue button). Maybe it is suffiecient enough, I guess. The green button is to view the overall view of your virtual desktops.

Give it a try
If you still don't get the idea, let me say that now you are now given 4 'virtual' desktop/monitor. Lets give this a try. First, click button '1'.(which means "show me the content of Desktop/Monitor 1"). Now, open any application, e.g Notepad. This will open Notepad in Desktop 1.

Now, without closing the Notepad application, click button 4 (which means "show me the content of Desktop/Monitor 4"). You might think, "Hey, where's my Notepad?". We will get to that later. But now, open another ,preferable different application, e.g My Computer. This will open My Computer in Desktop 4.

As you can see, you have open 2 applications (Notepad and MyComputer) in two different virtual desktop/monitor. So, incase you already starting to miss your Notepad, click the Button 1 ;) . Tadaa! There it is (in Desktop 1).

But wait.. what if you don't remember which applications sits where ? This is where the green button comes handy. Click it. You will see the overall view. Just click to the desired desktop to open that desktop.

Configuration
Easy. It is located in a single location. Just right click at the 'MSVDM' text and you will be able to see all the options you can set, such as shortcut key to switch virtual desktop. Maybe you will like to disable 'Shared Desktop' as it can sort the task based on the desktop, which means you can hide the application you are running for while, lol ;-D

For me, it is sufficient by having all disable but only 'Show Quick Switch buttons' and 'Show Title' options are enabled. I manage to disable 'Show animation' because the animation tends to be a little bit slow on my machine when I click the 'Green' button to view all the desktops.

Pros and cons

Pros
  1. Now you can work productively, without having to clutter all your things/application into a single desktop/display.
  2. You can differentiate every desktop, let say, Desktop 4 for your 'not so important' application such as Yahoo! Messenger and Winamp, Desktop 3 for your 'maximized' web browser, Desktop 2 for your OpenOffice/Micrososft Office application, Desktop 1 for general computer browsing, etc. So, when every time you superior comes, you can actually 'hide' your unwanted application for a while especially when you disable 'Shared Desktop' ;)

Cons
  1. In KDE, you can give a name for every virtual desktops you have, e.g Work, Entertainment,etc. In MSVDM, you can't. You just have to stick with numbers.
  2. MSVDM statically set only 4 (not more or less), while in KDE,Fluxbox, they allow you so set how many virtual desktops you want, be it 1,2,3,4,5,10..16
  3. You can't move one application in one desktop to another desktop..sigh. Fluxbox/KDE does! :-P

Have fun :)

Ref :
http://www.microsoft.com/windowsxp/downloads/powertoys/xppowertoys.mspx
http://download.microsoft.com/download/whistler/Install/2/WXP/EN-US/DeskmanPowertoySetup.exe

Tuesday, May 24, 2005

Fareth Ismeth Amir

Hari ni, ada seorang 'trainee' borak2 jap dengan aku.
So lebih kurang cam ni la perbualannya.


Dia : Encik, encik pernah tengok Berita Jam 10 tak kat TV1 RTM? Yang pemberita dia tu namanya 'Fareth' ape tah.."

Aku pun blasah je. Ingat2 lupa.

Aku : Ya, pernah tengok, Fareth Ismeth Amir. Kenapa?

Dia pun balas..

Dia : Pernah tak orang cakap suara encik ni macam pemberita tu?
Aku : Tak.

Dalam hati aku, "Sabar je la.. ni nak perli aku la ni sebab banyak sangat berleter macam 'pemberita'". Tetiba dia sambung cakap..

Dia : Suara tu leh carik makan tu.
Aku : ????

Dalam hati aku.. "amboih!". Kakakaka :-P
Then dia sambung lagi..

Dia : Kalau dah boring keje bidang ni, boleh kerja penyampai berita TV1. Boring la asik tengok Fareth tu.

Macam2 :)



p.s : Lama jugak yer Farith Ismeth Amir jadi pembaca berita.

Friday, May 20, 2005

[GNU/Linux] Processes and network ports

Ever wonder which ports (and its resposible processes) in your current machine are active or listening for connection, etc?

Thankfully, we have our lightsabers**.
Introducing 'netstat' and 'lsof'.


NETSTAT
What is netstat? From the infamous 'man' pages..

netstat - Print network connections, routing tables, interface statistics, masquerade con­nections, and multicast memberships

Let's get started..

To list down current active ports (TCP and UDP):
# netstat -ntup

To list down all ports (with its respective process) which listen for connection:
# netstat -nltup


LSOF
But there is also a much more powerful command which can perform the same thing. Welcome to UNIX, where everything is a file. Seems that everything is a file, we can use 'lsof' (LiSt Open File).

List all active and listening connection :
# lsof -Pni


This will reveal IMPORTANT information such as related process name/ID, connection status, with its related source and destination IP address and port number.



As a summary, with the power of our lightsabers**, netstat/lsof, hopefully you can catch some unwanted darkside** (network) services (e.g trojan horse, backdoor,etc) out there, and disable/kill it. ;)


Have fun! :)

** Happy Star Wars'ing

Thursday, May 19, 2005

Phishing

Today, I received an email, which claims it comes from a legal bank association or whatsoever. Most of my colleagues received it too.

Guess what, it is just another "phishing" email. Just like the one before this which affects Maybank2U, again MyCERT has certified on this
. Just wondering, how many non IT techie (or the worst part is when there are IT techies who just does not realize this, what a shame..) people outside who just simply fall over to this phishing scam?

Anyway, what the hell is phishing? If you are concern about the security of your virtual belongings (such as email accounts, bank accounts,etc) please.. do read.


" Phishing, pronounced 'fish ing', is the act of sending an e-mail to a user falsely claiming to be an established legitimate enterprise in an attempt to scam the user into surrendering private information that will be used for identity theft. The e-mail directs the user to visit a Web site where they are asked to update personal information, such as passwords and credit card, social security, and bank account numbers, that the legitimate organization already has. The Web site, however, IS BOGUS AND SET UP ONLY TO STEAL THE USER'S INFORMATION."


Actually, I have seen quite a lot of this kind of email (and websites too). I remembered there is one stupid website (which was forwarded through my Yahoo! Messenger) which when you visit/click on it, it really looks EXACTLY the same as a Geocities/Yahoo! error page, saying "your Yahoo ID is not valid/session terminated, please Re-login". Normally, people just does not realized it is a fake login page and they simply log in using that page. Say bye-bye to the Yahoo! account (email, instant messenger, etc). as all the information which the user enters in that page (username, password) is forwarded to another non Yahoo! server as he/she clicks the submit/login button.

What is the moral of all this?
Simple. DO NOT
(I repeat, DO NOT) trust anybody/anything on the Internet.


Ref :
http://www.mycert.org.my/advisory/MA-092.052005
http://www.webopedia.com/TERM/p/phishing.html

Monday, May 16, 2005

[GNU/Linux] - 'Yum' GPG Key for Fedora Core 3

"You have enabled checking of packages via GPG keys. This is a good thing. However, you do not have any GPG public keys installed. You need to download the keys for packages you wish to install and install them.
You can do that by running the command:
rpm --import public.gpg.key
For more information contact your distribution or package provider."

Oh, what the hell is that? I just want to get my package installation done, now! First thing first..

Yum (YellowDog Updater, Modified) is a packaging tool, which means that it can be used to search, install and remove packages from your system. Originally built for the use of YellowDog Linux, it is adopted by Fedora based distribution to be use as their packaging tools. By default, it is already installed in your Fedora Core 3.

Yum allows you to search for packages from servers (or mirror servers) over the Internet (which all the available server is defined in the file "/etc/yum.conf"). So, get a nearby mirror server address to help some speedup in the package installaton/searching process.

Tips : If you are in Malaysia, you can use mirrors located inside Malaysia, for faster downloads. One of it is MAMPU's Open Source Competency Centre (OSCC) mirror, located in Cyberjaya. Visit http://mirror.oscc.org.my for more information.

When installing, Yum tends to check the integrity of the packages to be install by using GPG keys. (which can be turned off, by editing "/etc/yum.conf", which is not a very good thing to do, unless you really want to do it). Initially, you need to import the 'GPG key' provided by Fedora Core 3, so that Yum can use the GPG keys to check the reliability of the files downloaded from mirror servers, in a sense that the file downloaded from mirrors should be exactly the same (not tempered or modified in any way) as the one originally distributed by Fedora Core/RedHat developers.

In a normal Fedora Core 3 installation, the GPG key provided by RedHat/Fedora in located in "/usr/share/doc/fedora-release-3/RPM-GPG-KEY"

The Solution
So, to import the key, type :
# rpm --import /usr/share/doc/fedora-release-3/RPM-GPG-KEY

Note: This only applies to Fedora Core 3. For other distribution, you can use the same command format but try to lookup somewhere else as different distribution store their GPG key in diferrent directory.

This will import the GPG key. No need to run it again every time you want to install any packages using Yum as long as you have did it once.

Now you can continue your "yum install <package-name>"

Have fun! :)

[GNU/Linux] Viewing RPM Package Contents and Dependencies

Hi,

It seems this is the first time I'm posting in this blog huh ? :)
Nevermind, I'll mumble on that later. let's get back to work.

Normally, I install packages in Linux using source code, which means that I compile it manually using the "configure, make, blabla, ...".

But on somewhat reason, we sometimes DO need to use RPM especially to ease the process of managing a large amount of machines.. and guess what? I'm wondering "How can I view the content of the RPM package I have just downloaded?" Additionally, "How can I list down its (the package) dependencies?".

Today, I did some searching the web and found something interesting to be shared. So, enough craps, here's the summary.


View Package Contents
To view the content of RPM package, use :
rpm -qlp <package-name>.rpm

Let's have a look at Yahoo! Messenger RPM Package (which can be downloaded at
Yahoo! Messenger Website ) :

$ rpm -qlp rh9.ymessenger-1.0.4-1.i386.rpm
/opt/ymessenger/bin/yahoo_gnome.png
/opt/ymessenger/bin/yahoo_kde.xpm
/opt/ymessenger/bin/ymessenger
/opt/ymessenger/bin/ymessenger.bin
/opt/ymessenger/bin/ymessenger.desktop
/opt/ymessenger/bin/ymessenger.kdelnk
/opt/ymessenger/bin/ymessenger.local
/opt/ymessenger/lib/libgtkhtml.so.6
/usr/bin/ymessenger
/usr/bin/ymessenger.local
/usr/share/applications/ymessenger.desktop


Guess what? It also shows the directory where all the files (inside the package) will be installed (if you decided to install the package). Cool eh?


View Dependencies
Another nice feature of the command 'rpm' is you can view a package dependencies.

Example :
rpm -qp --requires <package>.rpm


Let's give it a try:
# rpm -qp --requires rh9.ymessenger-1.0.4-1.i386.rpm
/bin/sh
/bin/sh
gdk-pixbuf >= 0.8.0
libX11.so.6
libXext.so.6
libXi.so.6
libXmu.so.6
libc.so.6
libc.so.6(GLIBC_2.0)
libc.so.6(GLIBC_2.1)
libc.so.6(GLIBC_2.1.3)
libc.so.6(GLIBC_2.3)
libdl.so.2
libgdk-1.2.so.0
libgdk_pixbuf.so.2
libglib-1.2.so.0
libgmodule-1.2.so.0
libgtk-1.2.so.0
libgtkhtml.so.6
libm.so.6
rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1


As you can see, it shows all the file it depends to, and in some cases, it shows the version of the package it depends on too.

So, now we know how to :
1) View all files inside a RPM file/package (and its installation directory)
2) How to see the dependencies


There you go. :)
Have fun!

Ref:
http://xpt.sourceforge.net/techdocs/linuxsm/RpmTools/linuxsm02.000.html