Re-enabling "Genie Effect" using "Magic Lamp"

picture taken from http://dengpeng.name/blog/index.php?s=%E5%B7%A6%E5%8F%B3


I know some of the guys like me who uses Magic Lamp effect of Compiz appreciate MacOSX’s “genie effect” very much. To some extent, I can say that Magic Lamp is born to imitate this visual eye-candy. But you may find out that in recent Compiz versions, the lowest possible value of the parameter minimum waves of Magic Lamp effect that can be altered in the Compiz Config Setting Manager is limited to 3 which, formerly zero, becomes an obstacle for us to tweak this effect more like the one in MacOSX.

Reason for this is that Apple has already received the patent for the genie effect, therefore the developers of Beryl, with the intention to make Beryl a legal software, have to set such a constraint in order not to infringe Apple’s patent by giving users ability to generate the “same” effect. Some one has come with a solution to re-enable it by downloading source code, recompiling, risking breaking dependencies and such.

But there is a better/quicker way:
What you need: A Hex editor, I use ghex2.
You can install it using:
sudo apt-get install ghex

* You have to be root to modify the following files:

1. Use Hex editor (I used ghex) to open “/usr/lib/compiz/libanimation.so”

# sudo ghex2 /usr/lib/compiz/libanimation.so

2. Find “magic_lamp_max_waves”, look for following “3”, change “3″ to “0″

3. Save, Close

4. Use Text Editor to open “/usr/share/compiz/animation.xml”

# sudo gedit /usr/share/compiz/animation.xml

5. Find “magic_lamp_max_waves”, look for following “3”, change “3″ to “0″

6. Save, Close

7. Restart GDM if the 3D desktop is currently running otherwise start compiz

8. Set Minimization effect to “Magic Lamp”, change Max Waves to “0″

(install ccsm if you dont have this tool)
# sudo apt-get install compizconfig-settings-manager

(start ccsm)
# ccsm

8. Use magic lamp as your minimize effect

Thanks Funkyrider! This info was taken from http://ubuntuforums.org/showthread.php?t=557491
and thanks to e.a.s.e. http://dengpeng.name/blog/2007/05/09/magic-lamp-vs-genie-effect/

Read more >>

How to move your windows 8 User Profile to another partition or disk

Overview

Both Windows 7 and 8, by default, place all user accounts on the system drive in the "C:\Users" folder. This guide explains how to move the "Users" folder completely to a new drive or folder.

In case you are wondering, there are very good reasons to keep all your data on a separate partition or physical drive than your windows:
  • almost no need to backup to re-install your OS, all your data is safe in case you decide to re-install
  • if you have an SSD, you might have a very low amount of space, you might want to move all your music, video, documents and program settings to HDD and keep only programs and windows on SSD.
  • you might want to have a backup solution for your data drive or partition, not worrying about were it all was and not having your program and windows folders occupying space (cloud backup comes to mind)
  • you are a control freak and like to have everything tidy and neat.
You could do all this just by moving your documents, music and pictures libraries, but you'll be missing most of the data if you doing it this way (like program settings). Or (I do not recommend this) by chaging the default user location.

Also, this whole procedure if done right should be painless and very straight forward.

If this sounds logical to you, read on....


You'll need: 


  1. A windows install /repair disk just in case (not actually needed, but usefull).
  2. A program called JunctionBox: http://sourceforge.net/projects/junctionbox/

Instructions:

(This post is based on the instructions found here, and here. Thank you to everyone who collaborated.)
  1. Create a System Restore point (don't skip this step):
    1. Go to Control Panel\System and Security\System or hit WIN+Pause.
    2. Select the System Protection, click Create.
    3. Type a description and click Create.
  2. (Re)name your drives something obvious:
    1. Open Explorer
    2. Click on your System Disk (probably C:) and hit F2. Type in a description, e.g., "Windows" and click OK.
    3. Click on your target HDD (probably D:), hit F2, and type in a description, e.g., "Data", and click OK. 
  3. Extract and Execute JunctionBox to backup your junctions points (don't skip, this will be used later)
    1. Accept the alpha notice
    2. Click "Backup Junctions" and save the file on your desktop (do not overwrite Defaultjunctions.ntj, you'll need it later). No need to fill Profile Folder, just click "Backup".
    3. Click Quit
  4. Boot into Windows 8's System Recovery Command Prompt:
    1. Hit Win+C to access Charms Bar, then "Settings", "Power", and click "restart" while holding Shift, and keep it hold until you see a blue screen of options
    2. Hit "Troubleshoot", "Advanced Options"
    3. In the list of recovery tools choose "Command Prompt".
    4. After reboot and login, you should now be located at the virtual Windows drive in the command prompt.
  5. Your drive letters WILL be different from your normal windows installation. You'll need to find them. To check what's what:

    1. type:  wmic logicaldisk get name, deviceid, volumename press Enter
    2. it will list all the present drive letters, description and volume name. You need to find your Data and Windows drives which you renamed earlier. 
  6. Backup and copy your Window's Users folder to your new partition or drive:
    1. type: robocopy /copyall /mir /xj C:\Users D:\Users (this is tricky!! these are your virtual drive letters, not your real ones, they may will vary on your installation and will not be the same as your windows installation), press Enter
    2. go drink some coffe, if you had this drive with actual data it may take a while
    3. Make sure no files failed to copy (FAILED column should = 0). If you have any failed files you should probably stop now. Skipped files should be related to Simlinks and Junctions that we'll recreate later.
    4. type: C: press Enter (C is your windows drive)
    5. type: cd / press Enter
    6. type: rename Users UsersOld press Enter
  7. Create a "Super Shortcut" (aka Junction/symlink) for your actual C:/Users to point to D:/Users
    1. The is the confusing part. We'll be creating a link on our virtual SSD to point to our actual HDD. Because my actual HDD's drive letter is the same as my virtual SSD's drive letter the following command looks wrong, but it's not.
    2. type: mklink /J C:\Users D:\Users
      • IMPORTANT!!! The first C:\Users is referring to my virtual SSD's drive letter. it could be anything in your case, even X or D.
      • IMPORTANT!!! The second D:\Users is referring to my actual HDD's drive letter. This is the one you use in windows to access your actual drive. It will most certainly be different than the letter you used to copy your data earlier to, on 6.1.
      • Note: for reference the comand on another computer was: mklink /J D:\Users D:\Users (yes both times D:)
    3. Press Enter
  8. Verify the shortcut was created by typing: dir C:. You should find Users [D:\Users] in the list.
  9. type: exit press Enter
  10. Restart
  11. Login with your username and run JunctionBox again.
    1. Open Notepad and click open, find the folder where you extracted JunctionBox, there should be a file named DefaultJuctions.ntj (it need to be DefaultJunctions.ntj and not the file you saved earlier, it took me a while to figure this out).
    2. Find the line where it says OSVersions and add WIN_NT4,UNKNOWN to the list. It would be something similar to this:
      1. OSVersions=WIN_VISTA,WIN_7,WIN_2008,WIN_2008R2, WIN_LONGHORN,WIN_NT4,UNKNOWN
      2. Save and close
      3. Note: If you are using a other language Edition than English you should check in the "JunktionBackup.ntj" and look for the Line "OSLanguages=". You should add the number found in there to your DefaultJuctions.ntj you created in 3.2. (Thanks thonesz for the information).
    3. Execute junctionbox.exe and this time fill out Profile Folder to:
      * All Profles and System Junctions *
    4. Click "Restore Junctions" and find the ntj file you save on your desktop (look for the one you saved, not DefaultJunctions.ntj)
  12. That's it, restart just in case, but that's not needed :)
Keep the C:/UsersOld directory around for a while just in case. :-)

End post.
Read more >>

FIX: Nautilus hangs when delete large files or folders

Nautilus started to freeze a few days ago, I haven't really looked up to what was underneath until I had to clean up and archive my documents. After some digging around, it turned out Vineyard (a wine configuration tool) was the culprit. As it turned out, the author on the tool published this on a bug tracker and instructions on how to fix.

"As the author of Vineyard, I can confirm that one of the extensions installed caused this behaviour.
I'm of course sorry for the trouble and would like to point out that this is already fixed and that the next version won't have this issue."

For now a simple:

$ sudo rm /usr/lib/nautilus/extensions-2.0/python/vineyard-configuration-selection.py

will do the trick.

Read more >>

Installing PM Fastrack exam simulation tool in ubuntu using wine

If you are studying for the PMP exam, then you need some kind of exam simulation tool like PM Fastrack. The problem is that it's not available for Linux and only works on Windows.
I solved this by finding a way to make it work with Wine.

Instructions are as follows:

1) Install the latest Wine using apt-get. In a terminal type:

# sudo apt-get install wine

2) Download winetricks.

# wget http://www.kegel.com/wine/winetricks
# chmod +x winetricks

3) Setup a new wine directory and install msdac28. We'll use .wine-fastrack to install the application.

# WINEPREFIX=~/.wine-fastrack ./winetricks mdac28 gecko

# rm -rf ~/.wine-fastrack/drive_c/windows/system32/user32.dll

# rm -rf ~/.wine-fastrack/drive_c/windows/system32/kernel32.dll

4) Now that we have a separate "bottle" for running our application, we'll download the trial and install. Go here and register yourself to download the trial.

5) Now type the following:

# WINEPREFIX=~/.wine-fastrack wine /path/to/fastrack.exe

(this will install the software, just follow the installation wizard)

6) After it's done, you just can double-click the icon the installer put on your desktop to run it.

Note: I actually used crossover linux to install, this would be the translated to wine instructions. If you have any problems following them, please let me know and I'll try to help.

Additionally if you want smooth fonts (anti-aliased) then execute the following:

# WINEPREFIX=~/.wine-fastrack winetricks corefonts tahoma droid fontsmooth-rgb

If you get a dialog about date format, just press ESC to close and continue.

Enjoy you PMP exam.
Read more >>

Put windows live messenger back to the system tray in Windows 7


If you are working in Windows 7, either the 32 or 64 bits versions, and you are as annoyed as I am by having every little app just wondering around in the "superbar", this trick may be for you.
It simple eliminates the program from the taskbar while the main window is not open and put it back to the system tray as in Windows Vista / XP / 2000.
The trick is to run msnmsgr.exe in Vista compatibility mode.

1. press the windows key and type msnmsgr.exe
2. right-click the file and choose properties
3. go to compatibility tab and choose Windows Vista (which version doesn't matter)

That's it, you have the icon back to where it belongs. Enjoy!




msnmsgr.exe is normally located at "C:\Program Files\Windows Live\Messenger" or "C:\Program Files (x86)\Windows Live\Messenger" if you are running the 64 bit version of Windows 7.

Thanks to Marcus F. and the supersite blog for posting the tip.


Read more >>