I have a simple script that I want to run every time x starts up.
#! /bin/sh
/home/kevin/.dropbox-dist/dropboxd &
I have run chmod 755 on it, so it's fully executable. And it just will. not. work.
If I put the script as .xsession then the display manager (testing with SLiM and LightDM) repeatedly asks for login information unless the specific desktop is selected (xmonad). It loads xmonad fine as the default session when there is no .xsession file. No matter what though, the script never runs.
I should mention that I've tried variants of the script. Loading a desktop background instead of dropbox, with and without "exec xmonad" statements. I have not tried a switch-case statement based on the session argument, because xmonad is my only possible session at this time.
I have placed it (without exec statements) into .xprofile, I have added a line in /etc/X11/xinit/xinitrc telling it su into my user, run the script, and exit out. I've also made it my .xinitrc, uninstalled all my display managers, and tried to startx. It threw errors at me that went away only when every single line was commented or the file itself deleted/moved.
I know the script itself is fine, because I can execute it once I'm logged in and it runs, does everything it's supposed to do.
I'm running a roll-your-own debian 8 with xmonad. Nothing else of merit is installed on my system.