My goal is an Arch based HTPC which on one tty runs XBMC and on another runs a minimalistic desktop (mainly for web browsing).
I haven't yet started on the XBMC slice of the pie, but at the moment it automatically logs in to the desktop user's account via
c1:2345:respawn:/sbin/agetty -a USERNAME -8 -s 38400 tty1 linux
then via ~/.bash_profile it does a
startx which does a
startxfce4. This is fine until you switch to another tty, then back to tty1. Upon switching back it seems to reexecute the ~/.bash_profile which then has a tantrum because an xsession is already running.
My questions are:
Is this a sensible way of implementing a desktop & XBMC configuration? It was the easiest thing I could think of (not being particularly pro on linux) for me and the end user.
Is there a way I can check for a correctly operating XFCE session running on tty1 and switch to it if there is, and run a new one if not?
Or is there a better way of performing an auto-start of XFCE on login which wouldn't get called every time you switch to the console?
(Better ways of implementing this which don't directly answer these questions would be useful too; I'm aiming for light-weight & simple).