I know that this has been sitting here for a while, but as a new Pi user trying to implement a headless display system for a client I know that an answer to this would have vastly sped up my implementation of it. Below I will detail the setup that I arrived at. It is not going to be the best way I am sure, and I can guarantee that it is not pretty. But here it is in case it helps anyone else in the same situation.
1) To auto-login to LXDE you can just use the raspi-config tool and select boot to desktop - this will automatically log you in as the user 'pi'.
2) To start omxplayer automatically (within the LXDE session) I had to do a bit of a botch job. Basically, because omxplayer is a command line player when I just added it to the LXDE autostart list it would boot it in the console running behind the desktop. As in, my processor would show that it was active doing it but it was not shown. And then when I went to shutdown the pi as soon as the desktop closed suddenly the video would be playing on the screen instead.
So the way around this is to launch omxplayer within a terminal instance running inside the LXDE session. To do this I installed xterm (apt-get install xterm).
Once xterm is installed I then created an entry in the LXDE autostart file to boot it up (for my purposes I had a script to check if a suitable movie file existed in the desired directory and then, if it did, to launch it in omxplayer running in xterm. Assuming that you have a movie file already on the pi then you can skip this part - if requested I can provide details of how I did this).
To boot xterm (running omxplayer) on start I added a listing in the
/etc/xdg/lxsession/LXDE-pi/autostart file. I added the line:
@xterm -fn fixed /etc/init.d/USBMp4Check
I used the
-fn fixed parameter to suppress an error in xterm to do with a font file (no known fix for raspberry pi).
/etc/init.d/USBMp4Check file I then had it check for a suitable file to open (a requirement of the setup the client wanted) and then, if it existed, open and play it on an endless loop.
The file check was created from the VNC autostart tutorial on the Raspberry Pi website (http://www.raspberrypi.org/documentation/remote-access/vnc/README.md). I changed the lines after "export USER HOME" to read:
if [ -e /tmp/*.mp4 ] #checks if an mp4 file exists at the temp directory
/usr/local/bin/vplay.sh /tmp/*.mp4 #calls vplay.sh targeting the file
echo "No movie found"
I did this by checking the existence of the file and then, if it existed, opening the file via a shell script. The contents of this shell script are:
sleep 5 #This ensures that the LXDE session has started up fully before attempting to open the file
exec xterm -fn fixed -fullscreen -fg black -bg black -e omxplayer -o hdmi --no-osd --loop -r "$1""
The parameters called here suppress the font error and opens xterminal in fullscreen with a black foreground and background. It then executes omxplayer within xterminal passing audio to hdmi, with on screen display turned off (otherwise you get an annoying seek message when the file loops back to the beginning), with the file looped, at the resolution of the video. I called the script vplay.sh as per the tutorial that I was gutting. Both of the files I created had to be executable (chmod 755). I know that it is not an ideal setup, but this is just a basic setup for the client to use immediately while I sort out a better setup.
Thus by autostarting the xterm calling the file check, the command was then passed to use/open this shell script pointing at the video file. This makes it play as desired.
3) I've covered the endless loop part in the above (use --loop as a parameter when opening omxplayer). I cannot speak for any flash as I do not get one here (using the latest version of omxplayer).
Apologies for the meaty write-up. If anything is not clear then let me know and I can provide further details.
Wanted to list the walkthroughs I used but apparently don't have enough rep to post multiple links yet. The parameters came from the github page for omxplayer, the rest from a whole load of other websites, lots of googling and too much trial and error. But it works (well enough for the moment)!
Hope that it helps someone else (or at least points them in the right direction).