View Single Post
Old 02-20-2013, 11:00 AM   #11
eureka
but forgot what it's like
eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.
 
Posts: 741
Karma: 2345678
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
Quote:
Originally Posted by anakod View Post
Okay, but I don't know how I could rewrite this. This is very simple

PHP Code:
      switch(fork())
      {
        case 
0:
          {
            
execlp("/bin/sh""sh""-c""/usr/bin/lipc-set-prop -s com.lab126.keyboard open net.fabiszewski.leafpad:Abc:1"NULL);
          }
        case -
1:
          
perror("Failed to open keyboard\n");
          exit(
1);
      }

      switch(
fork())
      {
        case 
0:
          {
            
execlp("/bin/sh""sh""-c""/usr/bin/lipc-set-prop -s com.lab126.keyboard close net.fabiszewski.leafpad"NULL);
          }
        case -
1:
          
perror("Failed to open keyboard\n");
          exit(
1);
      } 
It's all under GPL.
These commands use CLI interafce to /usr/lib/liblipc.so. You can reverse engineer this library and link to it with using appropriate functions directly.
eureka is offline   Reply With Quote