-
Notifications
You must be signed in to change notification settings - Fork 0
/
startsde.in
executable file
·59 lines (48 loc) · 1.48 KB
/
startsde.in
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
#!/bin/sh
if [ -z "$XDG_CONFIG_HOME" ]; then
export XDG_CONFIG_HOME="$HOME/.config"
fi
if [ -z "$XDG_DATA_HOME" ]; then
export XDG_DATA_HOME="$HOME/.local/share"
fi
# Ensure the existance of the 'Desktop' folder
if [ -e "$XDG_CONFIG_HOME/user-dirs.dirs" ]; then
. "$XDG_CONFIG_HOME/user-dirs.dirs"
else
XDG_DESKTOP_DIR="$HOME/Desktop"
fi
mkdir -p "$XDG_DESKTOP_DIR"
# Ensure the existance of the user applications folder
USER_APPS_DIR="$XDG_DATA_HOME/applications"
mkdir -p "$USER_APPS_DIR"
# Clean up after GDM (GDM sets the number of desktops to one)
xprop -root -remove _NET_NUMBER_OF_DESKTOPS -remove _NET_DESKTOP_NAMES -remove _NET_CURRENT_DESKTOP 2> /dev/null
# Enable GTK+2 integration for OpenOffice.org, if available.
export SAL_USE_VCLPLUGIN=gtk
# Launch DBus if needed
if test -z "$DBUS_SESSION_BUS_ADDRESS"; then
if which dbus-launch >/dev/null; then
eval "$(dbus-launch --sh-syntax --exit-with-session)"
fi
else
if which dbus-update-activation-environment >/dev/null; then
dbus-update-activation-environment --systemd --all
fi
fi
# Trying to locate an installed application menu
check_menu_prefix()
{
if [ -z "$XDG_MENU_PREFIX" ]; then
if [ -f "@sysconfdir@/xdg/menus/${1}applications.menu" ]; then
export XDG_MENU_PREFIX="$1"
fi
fi
}
check_menu_prefix "sde-"
check_menu_prefix "lxde-"
check_menu_prefix "mate-"
check_menu_prefix "xfce-"
check_menu_prefix "lxqt-"
export XDG_CURRENT_DESKTOP="SDE"
# Start the SDE session
exec @prefix@/bin/sde-session-manager -s SDE -e SDE