Ok, update.
Have something working using lightdm-gtk-greeter
instead of unity-greeter
(which hung at login). Thanks to the poster for mentioning he got it to work with lightdm-gtk-greeter
or I probably would not have tried another. Here are the steps I used to get the multi-monitor control login-screen fully working -- even though it's not working with unity-greeter, this is at least some form of a solution for now:
sudo apt-get install lightdm-gtk-greeter
Also make sure arandr is installed:
sudo apt-get install arandr
Configure your monitors how you like them for your layout using the Displays settings under System Settings
Back in a shell, load up arandr:
arandr
A user interface will load with a graphical representation of your current monitor layout displayed. From the arandr Ui menu, Layout choose Save As and save monitor layout, it will save a shell script that you can use in your lightdm.conf
file. It defaults to save the layout shell script in .screenlayout directory in your home folder. I just kept it there so it's easier to update later if I switch monitors around more. Specifically I saved it to a file named: ~/.screenlayout/monitors.sh
Finally, last step, go to a shell and save a new lightdm.conf:
sudo gedit /etc/lightdm/lightdm.conf
If your system is like mine, you won't have a lightdm conf file yet so gedit will be blank, that's fine, copy in the following settings (editing the path with the place you saved the monitor layout file from the arandr in the previous step):
[SeatDefaults]
greeter-setup-script=/home/username/.screenlayout/monitors.sh
More information about config settings and hooking up callback scripts to run before and after events around LightDM can be found here:
https://wiki.ubuntu.com/LightDM#Adding_System_Hooks
Ok, if anyone is reading this and having the same issue, at least this worked for me when several other attempts using other config parameters and methods slightly similar failed.
Good luck, and if anyone has a solution that works with Unity-Greeter that would still be really great.
It would also still be great to find out the answer to the original question: Where does Unity/Unity-Greeter Load X Configuration From?
Best Answer
First put your script into
/usr/bin
and give execute permission.Now create .desktop file in
/home/[user-name]/.config/autostart/
which run your script which runs at startup.Example:- Let your filename of script is "example" or "example.sh"
Create .desktop file with gedit with following lines and save as filename.desktop in
/home/[user-name]/.config/autostart/
Here
Exec=sudo example
orExec=sudo example.sh
runs your script as a root from/usr/bin
Give execute permission to .desktop file.Now, Script runs on startup.