Friday, November 25, 2011

XFCE: Set volumen function keys

Go to Settings > Keyboard > Shortcuts and add three shortcuts for your function keys. The commands should be:

amixer set Master 5%+

amixer set Master 5%-

amixer set Master toggle

This requires that the function keys are actually recognized by your system but have no command assigned till now

Thursday, November 10, 2011

VirtualBox: ResizeHD

In general the following should work:

VBoxManage modifyhd MYHD.vdi --resize 20000

 

Were 20000 is more or less 20 GB.

If the command fails several reasons could be the cause.

  • The virtual disk is already larger. Till now you cannot shrink drives that way. Take a close look in the VM whether you already use that space actually. In Windows this information is under Computer Management --> Storage --> Disk Management

  • The virtual disk has the wrong type. Issue the command:


 VBoxManage showhdinfo MYHD.vdi


If the result is not:


Format variant: dynamic default


you have to migrate your disk to that dynamic system. Since this is the default container for newer versions you can simply clone your HD file and then enlarge the new one:


VBoxManage clonehd MYHD.vdi MYNEWHD.vdi




  • I did not encounter other errors, please comment if you have any problem and/or solution




 

 

 

Tuesday, November 8, 2011

WINDOWS: Build Boost for Visual Studio 2010

Source:

http://stackoverflow.com/questions/2629421/how-to-use-boost-in-visual-studio-2010

If you are using headers only libraries, then all you need to do is to unarchive the boost download and set up the environment variables. The instruction below set the environment variables for Visual Studio only, and not across the system as a whole. Note you only have to do it once.

  1. Unarchive the latest version of boost (1.47.0 as of writing) into a directory of your choice (e.g.C:\boost_1_47_0).

  2. Create a new empty project in Visual Studio.

  3. Open the Property Manager and expand one of the configuration for the platform of your choice.

  4. Select & right click Microsoft.Cpp.<Platform>.user, and select Properties to open the Property Page for edit.

  5. Select VC++ Directories on the left.

  6. Edit the Include Directories section to include the path to your boost source files.

  7. Repeat steps 3 - 6 for different platform of your choice if needed.


If you want to use the part of boost that require building, but none of the features that requires external dependencies, then building it is fairly simple.

  1. Unarchive the latest version of boost (1.47.0 as of writing) into a directory of your choice (e.g.C:\boost_1_47_0).

  2. Start the Visual Studio Command Prompt for the platform of your choice and navigate to where boost is.

  3. Run: bootstrap.bat to build b2.exe (previously named bjam).

  4. Run b2: (Win32) b2 --toolset=msvc-10.0 --build-type=complete stage ; (x64) b2 --toolset=msvc-10.0 --build-type=complete architecture=x86 address-model=64 stage. Go for a walk / watch a movie or 2 / ....

  5. Go through steps 2 - 6 from the set of instruction above to set the environment variables.

  6. Edit the Library Directories section to include the path to your boost libraries output. (The default for the example and instructions above would be C:\boost_1_47_0\stage\lib. Rename and move the directory first if you want to have x86 & x64 side by side (such as to<BOOST_PATH>\lib\x86 & <BOOST_PATH>\lib\x64).

  7. Repeat steps 2 - 6 for different platform of your choice if needed.


If you want both x64 & win32 side by side, add "--stagedir=lib/win32" and "--stagedir=lib/x64" to the respective builds