website

My personal website
git clone git://git.ckyln.com/website
Log | Files | Refs

20200812-starting-x-without-xinit.txt (677B)


      1 Starting X without Xinit
      2 ================================================================================
      3 
      4 Most people who don't use a desktop environment use the `startx` command to
      5 initialize their X windowing system. Now, `startx` is a shell script that runs
      6 the C program `xinit` which basically runs `xorg-server`. Using xinit obviously
      7 has some nice perks. It makes some checks and runs your .xinitrc file. We don't
      8 need any of that though. Here is my X launcher:
      9 
     10 ```sh
     11 #!/bin/sh
     12 
     13 export DISPLAY=${DISPLAY:-:0}
     14 trap "$HOME/.xinitrc" USR1
     15 
     16 (
     17     trap '' USR1
     18 
     19     exec X -keeptty :0 vt1
     20 ) &
     21 
     22 wait
     23 ```
     24 
     25 You need to keep in mind that your .xinitrc should be an executable.