-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathberryos-xsession
executable file
·94 lines (90 loc) · 2.09 KB
/
berryos-xsession
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
90
91
92
93
94
#!/bin/sh
# ©2010-2015,2021 YUICHIRO NAKADA
### Set up i18n environment
##if [ -r /etc/profile.d/lang.sh ]; then
## . /etc/profile.d/lang.sh
##fi
##
# /etc/X11/xinit/xinitrc.d/*.sh
# 00-start-message-bus.sh
if which dbus-launch >/dev/null && test -z "$DBUS_SESSION_BUS_ADDRESS"; then
eval "$(dbus-launch --sh-syntax --exit-with-session)"
fi
# 50-xinput.sh
##export XMODIFIERS="@im=kimera"
##export GTK_IM_MODULE=xim
##export QT_IM_MODULE=xim
##kimera &
##export GDK_BACKEND=wayland CLUTTER_BACKEND=wayland
##export XMODIFIERS="@im=gim"
export GTK_IM_MODULE=gim
export QT_IM_MODULE=gim
xmodmap /etc/X11/Xmodmap
## Get the parameter
[ $# -eq 1 -a -n "$1" ] && DESKTOP="$1"
if [ -z "$DESKTOP" -o "$DESKTOP" == "startlxde" ]; then
CMDLINE="$(cat /proc/cmdline)"
getparam()
{
case "$CMDLINE" in *$1=*)
result="${CMDLINE##*$1=}"
result="${result%%[ ]*}"
echo "$result"
;;
esac
}
DESKTOP="$(getparam desktop)"
[ -z "$DESKTOP" ] && DESKTOP=/usr/bin/startlxde
fi
##case "$DESKTOP" in
##*kde)
#### kwin &
## ;;
##*)
## kimera &
## ;;
##esac
case "$DESKTOP" in
berry)
compiz --replace decoration wobbly fade switcher minimize cube rotate zoom scale move resize place water &
(emerald || openbox) &
/usr/libexec/gnome-settings-daemon
(nautilus || pcmanfm --desktop --profile lxde) &
[ -x /usr/bin/adeskbar ] && exec adeskbar
exec /usr/bin/ck-launch-session startlxde
;;
kde3)
LD_LIBRARY_PATH=%LD_LIBRARY_PATH%:/opt/trinity/lib
exec /opt/trinity/bin/startkde
;;
gnome)
exec gnome-session
;;
xfce4)
exec startxfce4
;;
icewm)
icewmbg &
icewmtray &
exec icewm
;;
*)
## if [ -x /usr/bin/startkde ]; then
## FOUNDMEM="$(awk '/MemTotal/{print $2}' /proc/meminfo)"
## [ $FOUNDMEM -lt 250000 ] && exec startlxde
## exec /usr/bin/startkde
## fi
##
if ! [ -z "$XDG_SESSION_COOKIE" ]; then
CK_XINIT_SESSION=
elif [ -x /usr/bin/ck-launch-session ]; then
CK_XINIT_SESSION="/usr/bin/ck-launch-session"
fi
##
## if which dbus-launch >/dev/null && test -z "$DBUS_SESSION_BUS_ADDRESS";
## then
## eval "$(dbus-launch --sh-syntax --exit-with-session)"
## fi
exec -l $SHELL -c "$CK_XINIT_SESSION $DESKTOP"
;;
esac