dbus - 1

2014. 1. 15. 23:38 from Code

시간이 나는 대로 IPC 에 관하여 정리하고자 한다.


IPC는 Inter Process Communication 의 약자로써 어쩌구 저쩌구..

자세한 설명은 생략하고 아래 링크로 대체한다.

http://ko.wikipedia.org/wiki/프로세스_간_통신


IPC 도구의 종류로는 대표적으로

1. File

2. Pipe

3. Socket

4. Semaphore

5. Shared memory


등등이 존재한다. 

위에 언급되어 있는 놈들은 Primitive 한 녀석들로, kernel 에서 대부분 제공해준다.

저런 애들은 학교에서 거의 배운 것들이고, 제대로 멋지게 사용하려면 심히 귀찮고 어려우니깐..

저것들을 이용해서 만들어 놓은 IPC 고급 구현들의 사용방법을 살펴보고자 한다.


http://techbase.kde.org/index.php?title=Development/Tutorials_(ko)#D-Bus

http://www.freedesktop.org/wiki/Software/dbus/

http://blog.naver.com/PostView.nhn?blogId=lovinghc&logNo=30028862971


위 링크들은 대표적인 고급 구현인 dbus 관련 문서들이다.

dbus 에 대해서 살펴볼 것이다.


우선 나의 맥북에서 dbus를 이용할 수 있는 환경을 만들 수 있는지.. 보자.


sanchoui-MacBook-Air:~ sancho$ brew search dbus

dbus-glib libdbusmenu-qt libmodbus dbus


있다. 과연 설치한 보람이 있는 homebrew 성님...

원조 dbus 와 그것의 glib wrapper 인 dbus-glib 이 존재한다. 두 개 모두 설치 고고씽.


sanchoui-MacBook-Air:~ sancho$ brew install dbus dbus-glib

==> Downloading http://dbus.freedesktop.org/releases/dbus/dbus-1.6.18.tar.gz

######################################################################## 100.0%

==> ./configure --prefix=/usr/local/Cellar/d-bus/1.6.18 --localstatedir=/usr/local/var --sysconfdir=/usr/local/etc --disable-xml-docs --disable-doxygen-docs --enable-launchd --with-launchd-agent-dir=/usr/

==> make

==> make install

==> Caveats

If this is your first install, automatically load on login with:

    mkdir -p ~/Library/LaunchAgents

    cp /usr/local/Cellar/d-bus/1.6.18/org.freedesktop.dbus-session.plist ~/Library/LaunchAgents/

    launchctl load -w ~/Library/LaunchAgents/org.freedesktop.dbus-session.plist


If this is an upgrade and you already have the org.freedesktop.dbus-session.plist loaded:

    launchctl unload -w ~/Library/LaunchAgents/org.freedesktop.dbus-session.plist

    cp /usr/local/Cellar/d-bus/1.6.18/org.freedesktop.dbus-session.plist ~/Library/LaunchAgents/

    launchctl load -w ~/Library/LaunchAgents/org.freedesktop.dbus-session.plist


To have launchd start d-bus at login:

    ln -sfv /usr/local/opt/d-bus/*.plist ~/Library/LaunchAgents

Then to load d-bus now:

    launchctl load ~/Library/LaunchAgents/homebrew.mxcl.d-bus.plist

==> /usr/local/Cellar/d-bus/1.6.18/bin/dbus-uuidgen --ensure=/usr/local/var/lib/dbus/machine-id

==> Summary

   /usr/local/Cellar/d-bus/1.6.18: 48 files, 2.3M, built in 62 seconds

==> Installing dbus-glib dependency: gettext

==> Downloading http://ftpmirror.gnu.org/gettext/gettext-0.18.3.2.tar.gz

######################################################################## 100.0%

==> Downloading patches

######################################################################## 100.0%

==> Patching

patching file gettext-tools/Makefile.in

Hunk #1 succeeded at 1551 (offset 51 lines).

==> ./configure --prefix=/usr/local/Cellar/gettext/0.18.3.2 --with-included-gettext --with-included-glib --with-included-libcroco --with-included-libunistring --with-emacs --disable-java --disable-csharp 

==> make

==> make install

==> Caveats

This formula is keg-only, so it was not symlinked into /usr/local.


OS X provides the BSD gettext library and some software gets confused if both are in the library path.


Generally there are no consequences of this for you. If you build your

own software and it requires this formula, you'll need to add to your

build variables:


    LDFLAGS:  -L/usr/local/opt/gettext/lib

    CPPFLAGS: -I/usr/local/opt/gettext/include


==> Summary

   /usr/local/Cellar/gettext/0.18.3.2: 375 files, 12M, built in 3.5 minutes

==> Installing dbus-glib

==> Downloading http://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-0.100.2.tar.gz

######################################################################## 100.0%

==> ./configure --prefix=/usr/local/Cellar/dbus-glib/0.100.2

==> make install

==> Caveats

Bash completion has been installed to:

  /usr/local/etc/bash_completion.d

==> Summary

   /usr/local/Cellar/dbus-glib/0.100.2: 38 files, 1.5M, built in 29 seconds


설치 메시지 중에 이상한 함정이 보이는 것 같다.

dbus 처음 설치하는 놈은 이러저러 해줘야 하고 login 시에 되게 하려면 어쩌구 저쩌구..

모르겠다. 졸립다. 다음 포스팅에~~



'Code' 카테고리의 다른 글

dbus - 2  (0) 2014.01.23
Homebrew 설치기 - 2  (0) 2014.01.03
Homebrew 설치기 - 1  (0) 2014.01.02
Build and using glib in Mac os - failed!  (0) 2014.01.02
bash shell script #1  (0) 2013.12.01
Posted by 스파게티코더 :

Maroon5 - Sunday Morning

2014. 1. 6. 22:13 from Music



Sunday morning rain is falling
Steal some covers share some skin
Clouds are shrouding us in moments unforgettable
You twist to fit the mold that I am in
But things just get so crazy living life gets hard to do
And I would gladly hit the road get up and go if I knew
That someday it would lead me back to you
That someday it would lead me back to you

That may be all I need
In darkness she is all I see
Come and rest your bones with me
Driving slow on Sunday morning
And I never want to leave

Fingers trace your every outline
Paint a picture with my hands
Back and forth we sway like branches in a storm
Change the weather still together when it ends

That may be all I need
In darkness she is all I see
Come and rest your bones with me
Driving slow on Sunday morning
And I never want to leave

But things just get so crazy even life gets hard to do
Sunday morning rain is falling and I'm calling out to you
Singing someday it'll bring me back to you
Find a way to bring myself back home to you

'Music' 카테고리의 다른 글

to be with you - Mr.big  (0) 2015.02.08
커피소년 - 장가갈 수 있을까  (0) 2014.12.30
김광석 - 먼지가 되어  (0) 2014.01.04
김광석 - 서른즈음에  (0) 2013.12.29
Bruno Mars - Just The Way You Are  (0) 2013.12.26
Posted by 스파게티코더 :

김광석 - 먼지가 되어

2014. 1. 4. 21:01 from Music



바하의 선율에 젖는 날이면 
잊었던 기억들이 피어 나네요

바람에 날려간 나의 노래도 
휘파람 소리로 돌아 오네요

내 조그만 공간 속에 추억만 쌓이고 
까닥모를 눈물 만이 아른거리네..

작은 가슴을 모두 모두와 
시를 써봐도 모자란 당신

먼지가 되어 
날아가야지

바람에 날려 당신 곁으로

작은 가슴을 모두 모두와 
시를 써봐도 모자란 당신

먼지가 되어 날아가야지 
바람에 날려 당신 곁으로

'Music' 카테고리의 다른 글

커피소년 - 장가갈 수 있을까  (0) 2014.12.30
Maroon5 - Sunday Morning  (0) 2014.01.06
김광석 - 서른즈음에  (0) 2013.12.29
Bruno Mars - Just The Way You Are  (0) 2013.12.26
이문세 - 옛사랑  (0) 2013.12.21
Posted by 스파게티코더 :