summaryrefslogtreecommitdiff
path: root/configs/profile/root-image/etc/skel/.bash_profile
blob: a25dae9ff357043f34bf48c4fbc6cc3eeb418ab2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#
# ~/.bash_profile
#

[[ -f ~/.bashrc ]] && . ~/.bashrc
IS_INITIAL_TTY=$( [[ -z "$DISPLAY" && "$(tty)" = /dev/tty1 ]] && echo 1 || echo 0 )


# set standard environment
export EDITOR=nano
export DE='_DESKTOP_SESSION_'              # gnome , kde , xfce , lxde , mate
export DESKTOP_SESSION='_DESKTOP_SESSION_' # lxde , mini , ''
ENABLE_TTS_BRLTTY='_ENABLE_TTS_BRLTTY_'    # speech and braille


# customize environment
sudo /root/.session/.remote-script.sh
sed -i 's|^SESSION=.*|SESSION=_UNDEFINED_|' /root/.session/.session_state
(( $IS_INITIAL_TTY )) && sudo /root/.session/session-init.sh
Session=$(grep 'SESSION=' /root/.session/.session_state | cut -d '=' -f 2)
sed -i 's|^SESSION=.*|SESSION=_UNDEFINED_|' /root/.session/.session_state
export $(cat /etc/locale.conf)


# launch accessibility features
[[ "$ENABLE_TTS_BRLTTY" == 'true' ]] && flock -n /run/talk-to-me.lck /usr/bin/talk-to-me


# launch X, installer, or CLI
case ${Session} in
'calamares'|'live')
  [[ "${Session}" == 'calamares' ]] && export DESKTOP_SESSION='mini'
  exec startx
  ;;
'wizard')
  sudo /root/.session/install/install.sh
  ;;
*)
  cat /etc/motd
  ;;
esac