Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

linuxÏÂDBUS·½·¨µ÷ÓõÄÎÊÌâ

´ó¼Ò¶¼ÖªµÀlinuxµÄÆÕͨÓû§²»ÄÜÖ±½Ó¹Ø»ú£¬ÎÒÏëд¸ö³ÌÐò£¬ÈóÌÐò²»ÌáȨ¾Í¿ÉÒԹػú£¬ÕÒ°¡ÕÒ°¡£¬×îºó·¢ÏÖÖ»ÄÜͨ¹ýDBUS·¢ËÍÇëÇó¸øÓÐȨÏ޵ijÌÐò£¬ÈÃËû°ïæ¹Ø»ú£¬ÓÚÊÇÎÒ¾ÍÔÚDBUSÖÐÕÒ£¬·¢ÏÖDBUSµÄsession busÖÐÓиöorg.freedesktop.PowerManagement£¬ÏÂÃæÓÖÓиö/org/freedesktop/PowerManagement£¬ÔÚËûÌṩµÄ½Ó¿ÚÀïÓиöShutdown·½·¨£¬ÇëÎÊÎÒÔõô²ÅÄܵ÷ÓÃËû¹Ø»ú£¿


ÎÒÊÇÖ±½ÓÓÃDBUSµÄ»ù±¾º¯Êý£¬Ã»ÓÃglib£¬ÒòΪÎҾ͵÷ÓÃÕâôһ¸öº¯Êý£¬glib·â×°µÄdbusÆäʵҲºÜÄѶ®£¬Ã»¿´¶®¡«¡«¡«¡«


ÕâÊÇÎÒÕÕÍøÉÏÀý×ӸĵĴúÂ룬µ«ÊÇÔËÐк󲻹ػú£¬555555

#include <dbus/dbus.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>

int main(int argc, char** argv)
{
DBusMessage* msg = NULL;
DBusMessageIter args;
DBusConnection* conn;
DBusError err;
DBusPendingCall* pending;
int ret;
bool stat;
dbus_uint32_t level;
char* param = "Shutdown";

printf("Calling remote method with %s\n",param);

//³õʼ»¯´íÎó±äÁ¿
dbus_error_init(&err);

//Á¬½Óµ½ÏµÍ³×ÜÏß²¢¼ì²é´íÎó
conn=dbus_bus_get(DBUS_BUS_SESSION,&err);

if(dbus_error_is_set(&err))
{
fprintf(stderr,"Coonection Error(%s)\n",err.message);
dbus_error_free(&err);
}


if(conn==NULL)
{
exit(1);


Ïà¹ØÎÊ´ð£º

ÓйØlinux°²×°½Å±¾kickstartµÄ±àд

ÎÒ֮ǰÖÆ×÷µÄlinux×Ô¶¯°²×°isoÒѾ­³É¹¦ÁË£¬ÏÖÔÚÏë¶ÔÆä½øÐÐһЩ¶¨ÖÆÐ޸ģ¬±ÈÈ磬¸ü¸ÄgrubͼƬµÈ¡£
ÎÒÔÚks.cfgµÄ%post¶ÎÀïÃæÊÇÕâÑùдµÄ£º
%post --nochroot
# Move the contents of the tar into their new locati ......

LinuxÈçºÎÔÚͼÐνçÃæºÍÃüÁîÐÐÖ®¼äÇл»

¸÷λ´óϺ£¬ÎÒÕýÔÚѧϰLinux£¬¿ÉÊÇLinuxͼÐνçÃæºÍÃüÁîÐÐÖ®¼äÇл»Óöµ½À§ÄÑ£¬ÔÚÃüÁîÐÐÏÂÊäÈëstartx£¬²»ÊǽøÈëͼÐνçÃæ
¶øÊdzöÏÖ
ÇëÎʸ÷룬ÕâÊÇΪʲô£¿ ¶øÇÒ°´Ctrl+Alt+F7£¬Ò²²»ÄÜÃüÁîÐнøÈëͼÐνçÃæ¡£
¼±¼±¼±

......

¸ü¸ÄlinuxĿ¼

Ó¦ÓÃϵͳÊÇ°²×°ÔÚ /opt Ŀ¼Ï£¬/opt Ŀ¼ÊÇÊôÓÚ¸ùĿ¼ / ϵġ£ÁíÍâÒ»¸öÎļþϵͳµÄ¹ÒÔصãÊÇÔÚ/aaaĿ¼Ï£¬¿É·ñ½«/optĿ¼ÏµÄËùÓÐÎļþcopyµ½/aaaĿ¼Ï£¬umount ÔÚ/aaaĿ¼ÏµĹÒÔص㣬½«/aaa¸ÄÃû/optĿ¼£¬ÔÙ½«Ô­À ......

linuxÏÂCÓïÑÔ¿ª·¢oracleµÄÎÊÌâ¡£

Á½¸öÎļþ1.PC£¬1.inc
1.PCÓвÙ×÷oracleÊý¾Ý¿âµÄ ,1.incÒ²ÓвÙ×÷oracleÊý¾Ý¿â 
ÔÚÆäËûÊý¾ÝÖÐÈçinformix ÖÐ$include 1.inc¾Í¿ÉÒÔʹÓÃÁË
ÔÚORACLEÊý¾Ý¿âÖØ $include 1.inc²»¿ÉÓà EXEC SQL include 1.incÒ²²»¿É ......

¹ØÓÚlinuxÏÂsocket±à³ÌµÄÎÊÌ⣡ - C/C++ / CÓïÑÔ

ÓÉÓÚÎҲŸոսӴ¥socket±à³Ì£¬×Ô¼ºÐ´ÁËÒ»¸ö¼òµ¥³ÌÐò£¬µ«¾ÍÊÇÔÚÔËÐеÄʱºò³öÏֶδíÎó£¬ÎÞ·¨½â¾ö£¬ÏÖÔÚÎÒ°ÑÔ´´úÂëÌù³öÀ´£¬Çë¸÷λ´óϺָÕýһϣ¡Ð»Ð»£¡
#include<stdio.h>
#include<stdlib.h>
#include& ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ