-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bash_profile
89 lines (63 loc) · 2.81 KB
/
.bash_profile
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# ~/.profile: executed by the command interpreter for login shells.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.
#------------------------------------------------------------------------------
# basic setting #
#------------------------------------------------------------------------------
# the default umask is already set in /etc/profile
umask 022
#------------------------------------------------------------------------------
# environment variables #
#------------------------------------------------------------------------------
# set PATH to include user's private bin ,if it exists
if [ -d "${HOME}/bin" ] ; then
PATH="${PATH}:${HOME}/bin"
fi
# use ibus as input method anywhere
export GTK_IM_MODULE="ibus"
export QT_IM_MODULE="ibus"
export XMODIFIERS="@im=ibus"
# If under X window environment,
if [ -n "$DISPLAY" ] ; then
#grant root the access to X server
xhost +local:root
# start devilspie, a nice rule matcher based on window property
if which devilspie &> /dev/null ; then
devilspie &
fi
fi
#------------------------------------------------------------------------------
# load bashrc #
#------------------------------------------------------------------------------
# if running bash
if [ -n "${BASH_VERSION}" ]; then
# include .bashrc if it exists
if [ -f "${HOME}/.bashrc" ]; then
source "${HOME}/.bashrc"
fi
fi
#------------------------------------------------------------------------------
# SSH keyring #
#------------------------------------------------------------------------------
# keychain is preferred, because the ssh-agent it start persists across login
# if keychain is not available, start ssh-agent in normal way
if which keychain &> /dev/null ; then
eval $(keychain --agents ssh --eval id_rsa)
else
SSHAGENT=/usr/bin/ssh-agent
if [ -z "${SSH_AUTH_SOCK}" -a -x "${SSHAGENT}" ]; then
# now, all application within this session know how to communicate with
# ssh-agent by enviroment variable $SSH_AGENT_PID
eval `${SSHAGENT} -s`
# kill this session's ssh-agent before login-shell exits
trap "kill -9 ${SSH_AGENT_PID}" 0
fi
# prompt user to load private key into ssh-agent
#ssh-add
fi
#------------------------------------------------------------------------------
# start gappproxy client #
#------------------------------------------------------------------------------
if [ -x "${HOME}/bin/gappproxy" ];then
~/bin/gappproxy &
fi