Wednesday, February 25, 2009

헤더파일이 꼬이는 경우

missing storage-class or type specifiers

라는 에러 메시지를 출력한다.

서로가 서로를 인클루드 할 때 발생한다.

필요로 하는 클래스를 전방위 선언한다.

그리고 구현 파일에서 해당 헤더 파일을 인클루드 한다.

Monday, January 19, 2009

Dual Monitor-Portrait and Landscape

두 개의 모니터를 하나의 데스크탑으로 사용하기 위해서는
TwinView를 이용하면 된다. 이는 비디오카드 드라이버에서 제공한다.
그리고 하나의 모니터만 회전시킬 수 있다.

Option "RandRRotatation" "true"

하지만 이는 두 개의 모니터가 모두 회전된다.

TwinView가 아닌 Seperate X screen으로 설정하면 하나의 모니터만 회전 할 수 있지만
두 개의 모니터가 독립된 작업 영역을 가진다.

Xinerama 를 이용한다.

Option "Rotate" "CW"

시계방향으로만 회전한다.
반시계방향은 "CCW" 로 설정한다.
하지만 Xinerama를 이용하면 Compiz 기능을 사용할 수 없다.
그리고 "Rotate" 를 사용하면 디스플레이 속도가 느려진다고 한다.
Compiz 기능을 유지하며, "RandRRotation"을 사용하여 속도 저하 없이
하나의 모니터만 회전할 수 있다면 정말 좋을 것이다.

Monday, December 29, 2008

How to fix eclipse "resource is out of sync with the file system"

If you edit a workbench resource outside of Eclipse, this problem occurs.

To fix the problem, refresh the project.

Tuesday, November 25, 2008

install Realtek RTL8168 driver

우분투는 기본적으로 r8169 드라이버를 설치한다

r8168 드라이버를 설치하고자 한다면 r8169를 지우고
realtek 홈페이지에서 다운로드 받은 r8168을 설치해야 한다.
설치방법은 다운로드 받은 파일을 압축해제 한 후, readme 파일에서 볼 수 있다.
설치 방법은 아래와 같다.

1. 우선 r8169 모듈을 삭제한다.
$ lsmod | grep r8169
$ rmmod r8169

하지만 리부팅한 후, 확인하면 지워지지 않는 경우가 있다.
이 경우, readme 파일에서는 /etc/modprobe.conf 의 'alias eth0 r8169' 부분을 삭제하라고 되어 있는데, 우분투에는 modprobe.conf 파일이 없다.
우분투에는 이에 해당하는 파일들이 /etc/modprobe.d/ 디렉토리 아래에 있다.

$ cd /etc/modprobe.d
$ vi blacklist-network
blacklist r8169

$ update-initramfs -u #to make the change permanent
$ reboot

$ lsmod | grep r8169
로 확인하면 r8169 모듈이 로딩되지 않았음을 확인 할 수 있다.

2. r8168 설치

역시나 readme 파일을 참조한다.

$ make clean modules
$ make install
$ depmod -a
$ insmod ./src/r8168.ko (or r8168.o in linux kernel 2.4.x)
$ lsmod | grep r8168

Wednesday, November 12, 2008

DNS 주소 설정

1. edit /etc/resolv.conf

nameserver [address]

Tuesday, November 11, 2008

VirtualBox 공유폴더

Host OS : Ubuntu
Guest OS : Windows XP

1. VirtualBox 에서 공유폴더 설정

2. Guest OS 에서 네트워크 드라이브 연결
\\VBOXSRV\[공유폴더이름]

to configure host networking of Virtualbox

1. install bridge-utils to be able to create network bridges

$ apt-get install bridge-utils

2. back up the current interfaces file

$ cp /etc/network/interfaces /etc/network/interfaces.backup

3. edit /etc/network/interfaces

for static ip address,

auto eth0
iface eth0 inet manual
auto br0
iface br0 inet static
address 192.168.0.100
netmask 255.255.255.0
gateway 192.168.0.1
bridge_ports eth0 vbox0 vbox1

# The loopback network interface
auto lo


for dynamic address,

auto eth0
iface eth0 inet manual

auto br0
iface br0 inet dhcp
bridge_ports eth0 vbox0

# The loopback network interface
auto lo
iface lo inet loopback


3. restart networking

$ /etc/init.d/networking restart

4. declare virtual interfaces

$ vi /etc/vbox/interfaces
# Each line should be of the format :
# [interface name] [user name] [bridge]
vbox0 [user name] br0
vbox1 [user name] br0
...

for VirtualBox OSE
$ /etc/init.d/virtualbox-ose restart

for pre-compiled proprietary version
$ /etc/init.d/vboxnet restart

5. set permission on /dev/net/tun

$ chown root:vboxusers /dev/net/tun
$ chmod g+rw /dev/net/tun

6. This file is created with the default permissions every time the system
restarts, edit the file /etc/udev/rules.d/20-names.rules to make the new permissions permanent

KERNEL=="tun", NAME="net/%k"

to

KERNEL=="tun", NAME="net/%k", GROUP="vboxusers", MODE="0660"