Run a startup script with lightdm
I would like to add that display-setup-script=/path/to/some/script
goes into the [Seat:*]
([SeatDefaults]
in older versions) section of /etc/lightdm/lightdm.conf
.
I use the script to setup the correct resolution and screen orientation for the greeter. This looks like:
xrandr --output DVI-0 --mode 1920x1200 --rotate left --primary
xrandr --output HDMI-0 --mode 1920x1080
You might want to try adding pre-start or post-start scripts to
/etc/init/lightdm.conf
(see http://upstart.ubuntu.com/getting-started.html for an introduction to upstart that parses this file)
Also /etc/lightdm.conf allows to specify scripts to be loaded. You have a detailed description of all (many) the options that can be used in the configuration file lightdm.conf at /usr/share/doc/lightdm/lightdm.conf.
Try insert your script in ~/.xprofile
file, like below
#! /bin/sh
# ~/.xprofile: execute commands at the beginning of the X user
# session - before the window manager is started.
#
# The xprofile files are natively sourced by the following
# display managers:
#
# GDM - /etc/gdm/Xsession
# LightDM - /etc/lightdm/Xsession
# LXDM - /etc/lxdm/Xsession
# SDDM - /usr/share/sddm/scripts/Xsession
#
# More in https://wiki.archlinux.org/index.php/Autostarting
/usr/bin/nm-applet &