Table of Contents
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | from subprocess import Popen, PIPE | |
| from time import sleep | |
| # run the shell as a subprocess: | |
| p = Popen(['python', 'shell.py'], | |
| stdin = PIPE, stdout = PIPE, stderr = PIPE, shell = False) | |
| # issue command: | |
| p.stdin.write('command\n') | |
| # let the shell output the result: | |
| sleep(0.1) | 
These are only examples, for a few very common actions. You are expected to write your own rules for the rest. The syntax is regular JavaScript, but see the polkit(8) manpage for the object structure and available API.
- 
If you don't know the action name, run pkaction:pkaction | grep cups
- 
The possible results are YES,AUTH_SELF(_KEEP),AUTH_ADMIN(_KEEP),NO. Returning a result is final. Returningnullwill continue checking other rules.
- 
Put your rules in /etc/polkit-1/rules.d/*.rules. (You can check everything in one giant addRule, or you can have a separate file and separate addRule for each program; it doesn't matter.)
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | FONTS Earnestly | |
| Better Defaults for Freetype | |
| Contents | |
| Introduction ....................................................... 16 | |
| Better Defaults .................................................... 43 | 
From N1256: (See http://port70.net/~nsz/c/c99/n1256.html#J.2)
- A "shall" or "shall not" requirement that appears outside of a constraint is violated (clause 4).
- A nonempty source file does not end in a new-line character which is not immediately preceded by a backslash character or ends in a partial preprocessing token or comment (5.1.1.2).
- Token concatenation produces a character sequence matching the syntax of a universal character name (5.1.1.2).
- A program in a hosted environment does not define a function named mainusing one of the specified forms (5.1.2.2.1).
- A character not in the basic source character set is encountered in a source file, except in an identifier, a character constant, a string literal, a header name, a comment, or a preprocessing token that is never converted to a token (5.2.1).
- An identifier, comment, string literal, character constant, or header name contains an invalid multibyte character or does not
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/bin/bash | |
| xhost local:root > /dev/null | |
| if ! [ -d /sys/fs/cgroup/cpuset/windows ]; then | |
| sudo cgcreate -t $USER:users -a $USER:users -g cpuset:windows | |
| fi | |
| /bin/echo "2-7" > /sys/fs/cgroup/cpuset/windows/cpuset.cpus | |
| /bin/echo "0" > /sys/fs/cgroup/cpuset/windows/cpuset.mems |