Flavour settings for Xorg
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

xorg-cheatcodes 1.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. #!/bin/sh
  2. PATH=/sbin:/usr/sbin:/bin:/usr/bin
  3. NAME="nox-cheatcodes"
  4. if [ -r /etc/default/distro ]; then
  5. . /etc/default/distro
  6. fi
  7. . /lib/lsb/init-functions
  8. . /lib/init/fll
  9. systemctl stop wpa_supplicant.service
  10. systemctl mask wpa_supplicant.service
  11. systemctl stop NetworkManager.service
  12. systemctl enable --now iwd.service
  13. systemctl start NetworkManager.service
  14. if [ -r /etc/default/fll-locales ]; then
  15. . /etc/default/fll-locales
  16. fi
  17. FLL_LIVE_USER_HOME=$(getent passwd ${FLL_LIVE_USER} | cut -d \: -f 6)
  18. ###
  19. # cheatcode handling
  20. ###
  21. for param in $(cat /proc/cmdline); do
  22. case "${param}" in
  23. flldebug=*)
  24. if [ "${param#flldebug=}" = "${NAME}" ] || [ "${param#flldebug=}" = "all" ]; then
  25. fll_redirect
  26. fi
  27. ;;
  28. nointro)
  29. NOINTRO="nointro"
  30. ;;
  31. esac
  32. done
  33. no_intro() {
  34. if [ -z "${NOINTRO}" ] ; then
  35. [ ! -f ${FLL_LIVE_USER_HOME}/.config/autostart/${FLL_DISTRO_NAME}.desktop ] && \
  36. sudo -u ${FLL_LIVE_USER} ln -sf "${FLL_LIVE_USER_HOME}/Desktop/${FLL_DISTRO_NAME}.desktop" \
  37. "${FLL_LIVE_USER_HOME}/.config/autostart/"
  38. elif [ -e "${FLL_LIVE_USER_HOME}/.config/autostart/${FLL_DISTRO_NAME}.desktop" ]; then
  39. # toram + persistency
  40. rm -f "${FLL_LIVE_USER_HOME}/.config/autostart/${FLL_DISTRO_NAME}.desktop"
  41. fi
  42. }
  43. do_start() {
  44. if [ -f ${FLL_LIVE_USER_HOME}/Desktop/${FLL_DISTRO_NAME}.desktop ]; then
  45. no_intro
  46. fi
  47. }
  48. case "${1}" in
  49. start)
  50. log_daemon_msg "${NAME}"
  51. do_start
  52. log_end_msg "${?}"
  53. ;;
  54. stop)
  55. ;;
  56. restart|force-reload)
  57. echo "Error: argument '${1}' not supported" >&2
  58. exit 3
  59. ;;
  60. *)
  61. echo "Usage: ${NAME} {start|stop}" >&2
  62. exit 3
  63. ;;
  64. esac