unixwz0r

profile.sh (This a script to autostart cdm)

Jan 19th, 2015
444
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. # To avoid potential situation where cdm(1) crashes on every TTY, here we
  2. # default to execute cdm(1) on tty1 only, and leave other TTYs untouched.
  3. # Put this script code into .bashrc or .zshrc or any shell profile
  4. # You can also add this in the /etc/profile.d/ name it zzz-cdm.sh for Arch Linux
  5. if [[ "$(tty)" == '/dev/tty1' ]]; then
  6. [[ -n "$CDM_SPAWN" ]] && return
  7. # Avoid executing cdm(1) when X11 has already been started.
  8. [[ -z "$DISPLAY$SSH_TTY$(pgrep xinit)" ]] && exec cdm
  9. fi
Advertisement
Add Comment
Please, Sign In to add comment