Thursday, August 25, 2011

working with jsctags

I've been a C programmer for sometime, I still miss those good days.
Working fine on a Linux machine, using (g)Vim and plugins as an IDE.


Because I use gentoo, not Ubuntu, I had to install those tools without support of apt-get thing.

Here's how I did it.

  1. Install node.js
    Download the source code from here.
    Extract the tar ball, sudo ./configure, make, make install.
    Or you can emerge the masked nodejs package.

  2. Install jsctags
    Do not download source file from github.com!!!
    You should
    git clone --recursive git://github.com/mozilla/doctorjs.git .
    Clone it with "--recursive" or you will fail to build because of the narcissus sub package.
    Then, you can make and make install.


  3. Setup for jsctags
    You should add
    export NODE_PATH="/usr/local/lib/jsctags/:$NODE_PATH"
    in your .bashrc or .profile.

I hope this post helps.

Thursday, August 18, 2011

Xinerama + Compiz Fusion (Gentoo, NVidia)

Even after turning on window decorations on ccsm, you can't see the window decorations, your terminal turns blank, if you are using xinerama.

I figured that your /etc/X11/xorg.conf or /etc/X11/xorg.conf.d/20-nvidia.conf thing should look like this.



Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0" 0 0
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
Option "Xinerama" "0"
EndSection

Section "InputDevice"
# generated from data in "/etc/conf.d/gpm"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol"
Option "Device" "/dev/input/mice"
Option "Emulate3Buttons" "no"
Option "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
# generated from default
Identifier "Keyboard0"
Driver "kbd"
EndSection

Section "Monitor"
Identifier "Monitor0"
VendorName "Unknown"
ModelName "Samsung SyncMaster"
HorizSync 30.0 - 81.0
VertRefresh 56.0 - 75.0
Option "DPMS"
EndSection

Section "Monitor"
Identifier "Monitor1"
VendorName "Unknown"
ModelName "Samsung SyncMaster"
HorizSync 30.0 - 81.0
VertRefresh 56.0 - 75.0
EndSection


Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "GeForce 8600 GT"
EndSection

Section "Device"
Identifier "Device1"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "GeForce 8600 GT"
BusID "PCI:1:0:0"
Screen 1
EndSection

Section "Screen"
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24
Option "AddARGBGLXVisuals" "True"
Option "TwinView" "1"
Option "TwinViewXineramaInfoOrder" "CRT-1"
Option "metamodes" "CRT: nvidia-auto-select +0+0, DFP: nvidia-auto-select +1280+0"
SubSection "Display"
Depth 24
EndSubSection
EndSection

Section "Screen"
Identifier "Screen1"
Device "Device1"
Monitor "Monitor1"
DefaultDepth 24
Option "AddARGBGLXVisuals" "True"
Option "metamodes" "DFP: nvidia-auto-select +0+0"
SubSection "Display"
Depth 24
EndSubSection
EndSection




I hope this could help someone. :-)