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

Enable/Disable Linux mousekeys

 
gcc mousekey.c -lX11 -IX11
´ò¿ªmousekeysÔËÐÐ./a.out
¹Ø±ÕmousekeysÔËÐÐ./a.out 1,ÕâÀïÔÚa.outºóÃæËæ±ã¼ÓÒ»¸ö²ÎÊý¾Í¿ÉÒÔÁË£¬ÒòΪÅжÏÌõ¼þΪ if(argc < 2)
/*********source code***************/
#include <stdio.h>
#include <string.h>
#include <X11/Xlib.h>
#include <X11/XKBlib.h>
int main(int argc, char *argv[])
{
 Display *display;
 unsigned long which;
 XkbDescPtr xkb;
 unsigned int status_mask = 0;
 unsigned short mk_delay = 160;
 unsigned short mk_interval = 50;
 unsigned short mk_time_to_max = 30;
 unsigned short mk_max_speed = 50;
 short mk_curve = 0;
 Status S;
 status_mask = XkbMouseKeysMask;
 display = XOpenDisplay(NULL);
 xkb = XkbGetMap(display, 0, XkbUseCoreKbd);
 if((int)xkb == BadAlloc || xkb == NULL)
 {
  printf("ERROR: unable to allocate storege.\n");
  return 1;
 }
 
 if((S = XkbGetControls(display, XkbAllControlsMask, xkb)) != Success)
 {
  if(S == BadAlloc)
   printf("ERROR: Unable to allocate storage.\n");
  else if(S == BadMatch)
   printf("ERROR: Unable to query state of keyboard.\n");
  else printf("ERROR: Unable to get state of keyboard controls. \n");
   return 2;
 }
 unsigned int changeEnabled = 0;
 unsigned int enabled = 0;
 changeEnabled |=status_mask;
 if(argc < 2)
  enabled |= status_mask;
 if(xkb->ctrls)
 {
  xkb->ctrls->enabled_ctrls &=~changeEnabled;
  xkb->ctrls->enabled_ctrls |=(changeEnabled & enabled);
  xkb->ctrls->mk_delay = mk_delay;
  xkb->ctrls->mk_interval = mk_interval;
  xkb->ctrls->mk_time_to_max = mk_time_to_max;
  xkb->ctrls->mk_max_speed = mk_max_speed;
 &nb


Ïà¹ØÎĵµ£º

ʵսLinux Bluetooth±à³Ì£¨Èý£© HCI²ã±à³Ì

1. HCI²ãЭÒé¸ÅÊö£º
HCIÌṩһÌ×ͳһµÄ·½·¨À´·ÃÎÊBluetoothµ×²ã¡£ÈçͼËùʾ£º
´ÓͼÉÏ¿ÉÒÔ¿´³ö£¬Host Controller Interface(HCI)  ¾ÍÊÇÓÃÀ´¹µÍ¨HostºÍModule¡£Hostͨ³£¾ÍÊÇPC£¬ ModuleÔòÊÇÒÔ¸÷ÖÖÎïÀíÁ¬½ÓÐÎʽ£¨USB,serial,pc-cardµÈ£©Á¬½Óµ½PCÉϵÄbluetooth Dongle¡£
ÔÚHostÕâÒ»¶Ë£ºapplication,SDP,L2capµÈЭÒé ......

Linuxϳõ²½ÅäÖÃApache+Subversion

×°ºÃapacheºÍsubversionºó½ÓÏÂÀ´ÅäÖÃÅäÖÃÎļþ,ÏÈÓÃÃüÁîsvnadmin svnadmin create /home/repository/svn1 svnadmin create /home/repository/svn2 ÔÚ/home/repository/Ŀ¼ÀïÃæ´´½¨ÁË2¸ö²Ö¿âsvn1ºÍsvn2 ÐÞ¸Ähttp.conf¼ÓÉϹØÓÚsvnµÄÅäÖÃÑ¡Ïî LoadModule dav_svn_module modules/mod_dav_svn.so
LoadM ......

Linux·þÎñcannot change directory´íÎó½â¾ö·½·¨

Linux·þÎñcannot change directory´íÎó½â¾ö·½·¨
ÔÚ°²×°Íêvsftp·þÎñºóµÇ½ʱ¿ÉÄÜÓöµ½cannot change directoryºóÃæÊǵǽÕßµÄĿ¼µÄ´íÎó¡£ÕâÊÇÒòΪSEÉèÖõĹرÕÁËftpµÄÔ­Òò¡£
ʹÓÃÃüÁî
getsebool ftpd_disable_trans
¿ÉÒԲ鿴µ±Ç°µÄ״̬Èç¹û²»ÊÇon
ÄÇôÊÇÊäÈëÃüÁî
setsebool ftpd_disable_trans 1
µ±È»Ò²¿ÉÒÔ¼ÓÈë-P² ......

linuxÏ°²×°gd¿â²¢ÇÒÖ§³Ösocket

Ò»¡¢ÏÂÔØ
gd-2.0.33.tar.gz http://www.boutell.com/gd/
jpegsrc.v6b.tar.gz http://www.ijg.org/
libpng-1.2.7.tar.tar http://sourceforge.net/projects/libpng/
zlib-1.2.2.tar.gz http://sourceforge.net/projects/zlib/
freetype-2.1.9.tar.gz http://sourceforge.net/projects/freetype/
php-4.3.9.tar.g ......

Linux ÍøÂç½Ó¿ÚÅäÖÃÎļþ¼°Ïà¹Ø¹¤¾ß——ת

 1¡¢ ¹ØÓÚÍøÂç½Ó¿Ú¼°ÅäÖù¤¾ß˵Ã÷£»
ÍøÂç½Ó¿Ú(interface)ÊÇÍøÂçÓ²¼þÉ豸ÔÚ²Ù×÷ϵͳÖеıíʾ·½·¨£¬±ÈÈçÍø¿¨ÔÚLinux²Ù×÷ϵͳÖÐÓà ethX,ÊÇÓÉ0¿ªÊ¼µÄÕýÕûÊý£¬±ÈÈçeth0¡¢eth1...... ethX¡£¶øÆÕͨèºÍADSLµÄ½Ó¿ÚÊÇ pppX£¬±ÈÈçppp0µÈ£»
ÔÚLinux²Ù×÷ϵͳÖÐÅäÖÃÍøÂç½Ó¿Ú£¬Ò»°ãÊÇͨ¹ýÍøÂçÅäÖù¤¾ßʵÏֵģ¬µ«×îÖÕÄ¿µÄ»¹ÊÇͨ¹ýÍ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ