DBus 실행 시에 Autolaunch error: X11 initialization failed. 가 나타납니다.

hyde1004의 이미지

안녕하세요.

어제부터 dbus를 공부하고 있습니다.
제가 별도의 ubuntu서버를 두고, ssh로 연결하여 접속을 하는데요.
그런데 아주 간단한 예제를 실행하면 다음 에러가 나옵니다.

hyde1004@Pleiades:~/Programming$ ./dbus-test
Error connecting to the daemon bus : //bin/dbus-launch terminated abnormally with the following error: Autolaunch error: X11 initialization failed.
hyde1004@Pleiades:~/Programming$

GUI 관련 사항인 것 같아서, 서버의 GUI 환경 터미널에서 실행하면 정상 동작합니다.
코드 자체는 graphic 요소는 없는데요. 다만 glib-1-dev 패키지를 설치하긴 했습니다만.
외부 터미널에서 접속하는 것이라 권한 문제인것 같기도 하구요.
어떻하면, 텍스트 터미널에서도 실행할수 있을까요?

#include <stdio.h>
#include <dbus/dbus.h>
 
int main()
{
        DBusConnection *connection;
        DBusError error;
 
        dbus_error_init(&error);
 
        connection = dbus_bus_get(DBUS_BUS_SESSION, &error);
 
        if (dbus_error_is_set(&error))
        {
                printf("Error connecting to the daemon bus : %s", error.message);
                dbus_error_free(&error);
        }
 
        return 0;
}