paste2.org
On Ubuntu 12.04 it doesn't work, that is in e.g. XMonad I can't switch keyboard layouts. setxkbmap ru works, though. What could be the problem?
Жуйк, как сделать это из баша? #include <unistd.h> #include <sys/types.h> #include <sys/ioctl.h> int main (int argc, char **argv) { pid_t pid; /* * parent exits * child gets rid of its tty and then shift-runs its arguments */ pid = fork(); if (pid < 0) { return 1; } else if (pid == 0) { ioctl (0, TIOCNOTTY); execvp (argv[1], argv + 1); } else { return 0; } }