Flavour settings for LXDE
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.

lxde-cheatcodes 1.6KB

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