Search Ali's Blog

Saturday, March 21, 2009

How to pass California DMV written test

I just had my DMV (Department of Motor Vehicles) written test.
Here are some tips to pass it easily:
1. First make sure you have all the requirements for the DMV test.
2. Make an appointment via DMV website, this will save about 30 minutes waiting time in the office (the appointment is usually scheduled for 2 weeks later), but if you are in a rush, you can go directly to the DMV office. NOTE: if you are eligible for a SSN (Social Security Number) you must have it before you apply to the DMV test, otherwise they will not let you have the test unless you come back with SSN.
3. Read California Driver Handbook (a night before the test should be sufficient), this is very important, also check these sample tests here, here and here, many questions may appear in your exam "as is".
4. I recommend to watch these videos (this is the channel) on youtube, they explain a lot of things visually which makes it easier to understand.
5. When you're ready, got to closest DMV office, pay the fee (it's 27 dollars) you will have a vision exam (bring your glasses) and your fingerprint and picture will be taken. After that you get to the test, it's composed of 36 questions you're allowed to have 6 mistakes (if you're applying to new driver license), if you read the handbook this should be very easy (I passed it in 5 minutes with 100% grade)
6. When you pass the test, you will have a temporary license until your "behind the wheel" test, go ahead and make an appointment for the practical "behind the wheel" test, this can be done by phone call, online, or in the DMV office right after you finish the written exam. It's usualy scheduled for 3 weeks later.

Tips for the driving test (behind the wheel):
- Memorize hand signals.
- You should know the car you're driving, hand breaks, emergency lights..

Friday, March 20, 2009

it's much more.

She: I made you cry once, I feel bad about it.
I: once?

KDE konsole tips

I found KDE konsole to be most convenient for Linux programming and scripting.
Here are few tips that may make your life easier:

1. Change colors to something more friendly to you (and your eyes), I personally prefer dark font on light background (many others prefer black background), go to "settings", select "schema", select "black on light yellow". to make this change permanent; go to "settings", select "save as default"

2. Change tab name automatically; when you have many tabs, this change is handy: go to "settings", select "configure konsole", select "set tab title to match windows title"

3. Run command on all sessions: when you're running on multiple tabs on multiple machines, and you want to run same command on all of them, use this feature: open a tab for each machine, then go to one of them and right click then select "Send input to all sessions", after that everything you type will be replicated on all other sessions (machines).. nice one.

4. If you're waiting for an activity on specific session and you're tiered watching/checking each tab frequently, you can easily right click on the tab and select "monitor for activity", then when a new output appears on that session you will see a "pop up' windows reporting that, even if you are in different application.

5. Shortcuts! of course you must know these shortcuts as a Linux user :)
- New tab: ctrl + alt + n
- Rename tab: ctr + alt + s
- Close tab: ctrl + d (depends on your shell)
- Browse tabs: shift + right/left arrow
- Move tab: ctrl + shift + right/left arrow

Enjoy!
Ali;

Tuesday, March 17, 2009

bash vs. tcsh


I find it much easier to use BASH rather than TCSH, many articles in the wen explains why, so I will save few bits for Google robot and will not replicate this info.
However, it may be useful to know that to switch shell you can easly use 'chsh' or 'ypchsh' (make sure you have the correct permissions, otherwise contact your admin :-/) I had to contact my IT admin to do it for me.

Ah, and also here is a very nice (and advanced) bashrc file, to use it; copy the file to your home directory (named .bashrc) and you'll feel like superman, I mean root :)


Bash, feels like home :)

VNC Auto Start and Copy & Paste

Since I use VNC intensively, I needed to automaticly start VNC session when the Linux machine comes up, a lot of posts in the internet explains how to hack gdm, init.d services, rc.local, etc.. but it seems that VNC developers already thought about this and here is the simplest way:
1. Edit /etc/sysconfig/vncserver and include the line VNCSERVERS="sessionnumber:myusername"
For example:
VNCSERVERS="1:ali"
VNCSERVERARGS[1]="-geometry 1016x710 -nolisten tcp -nohttpd"
2. Enable vncserver on runlevel system services, run: chkconfig vncserver on



That's it, you can try to reboot your machine and check how VNC session is automatically up!


Tips:
o If you're having troubles to launch a graphical (kde/gnome) vnc session, you need to change your ~/.vnc/xstartup file, here is mine:
#!/bin/sh


# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc


[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 1024x768 -ls -title "$VNCDESKTOP Ali Ayoub Desktop" &
autocutsel &
gnome-session &
#startx &


o Copy & Paste troubleshooting:
Copy and paste feature may be problematic in VNC, a work around that worth checking is to run manually: vncconfig -iconic &
I tried to add this line to xstartup but it doesn't seem to solve the problem, I had to run it manually after the VNC session is open, and only then copy and paste between VNC session (Linux) and Windows work!

Sunday, March 01, 2009

Linux Recovery Software

Recently, a friend of mine had to recover some damaged pictures on his SD camera card, I tried few free application, none of them worked.
Finally, R-Linux application (Linux hackers rock!) running on Windows (!) worked and recovered most of the deleted/damaged files. The GUI is very intuitive and easy.. very recommended.