Advertisement
s243a

/usr/bin/startlxde

Mar 8th, 2019
265
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.41 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. if [ -z "$XDG_CONFIG_HOME" ]; then
  4.     export XDG_CONFIG_HOME="$HOME/.config"
  5. fi
  6.  
  7. if [ -z "$XDG_DATA_HOME" ]; then
  8.     export XDG_DATA_HOME="$HOME/.local/share"
  9. fi
  10.  
  11. # Ensure the existance of openbox config file
  12. OPENBOX_CONF_DIR="$XDG_CONFIG_HOME/openbox"
  13. if [ ! -f "$OPENBOX_CONF_DIR/lxde-rc.xml" ]; then
  14.     mkdir -p "$OPENBOX_CONF_DIR"
  15.     cp /etc/xdg/openbox/LXDE/rc.xml "$OPENBOX_CONF_DIR/lxde-rc.xml"
  16. fi
  17.  
  18. # Ensure the existance of the 'Desktop' folder
  19. if [ -e "$XDG_CONFIG_HOME/user-dirs.dirs" ]; then
  20.     . "$XDG_CONFIG_HOME/user-dirs.dirs"
  21. else
  22.     XDG_DESKTOP_DIR="$HOME/Desktop"
  23. fi
  24. mkdir -p "$XDG_DESKTOP_DIR"
  25.  
  26. # Ensure the existance of the user applications folder
  27. USER_APPS_DIR="$XDG_DATA_HOME/applications"
  28. mkdir -p "$USER_APPS_DIR"
  29.  
  30. # Clean up after GDM (GDM sets the number of desktops to one)
  31. xprop -root -remove _NET_NUMBER_OF_DESKTOPS -remove _NET_DESKTOP_NAMES -remove _NET_CURRENT_DESKTOP 2> /dev/null
  32.  
  33. # Enable GTK+2 integration for OpenOffice.org, if available.
  34. export SAL_USE_VCLPLUGIN=gtk
  35.  
  36. # Launch DBus if needed
  37. if which dbus-launch >/dev/null && test -z "$DBUS_SESSION_BUS_ADDRESS"; then
  38.     if test -z "$XDG_RUNTIME_DIR" -o ! -S "$XDG_RUNTIME_DIR/bus" -o ! -O "$XDG_RUNTIME_DIR/bus"; then
  39.         eval "$(dbus-launch --sh-syntax --exit-with-session)"
  40.     fi
  41. fi
  42.  
  43. export XDG_MENU_PREFIX="lxde-"
  44. export XDG_CURRENT_DESKTOP="LXDE"
  45.  
  46. # Start the LXDE session
  47. exec /usr/bin/lxsession -s LXDE -e LXDE
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement