[mythtv-users] Dual monitors solved

Greg Estabrooks greg at phaze.org
Wed Apr 30 20:01:49 UTC 2008


> about.  This is a pet project of mine; I am working on a true multi-myth
> sharing logins).  So far I have some basic functionality but nothing that
> is usable.


 I do this on my main frontend box now as well.

 I've done it in the past with a single card with multiple outputs DVI+VGA, 
but currently I use 2 nvidia cards with dvi out

1 feeds my projector, the other my lcd flatscreen.


Basically I have 2 seperate users I run the frontends as.

User mythtv = lcdflatscreen - Controlled via LIRC
User projector = projector. - Currently using keyboard  but eventually
LIRC as well when I have a non lazy moment.

 I have a ~/.mythtv/mysql.txt for each of them and I use the 
LocalHostName option to give them unique names so the configurations 
can be different without conflicting.

I start each of the X sessions using seperate layouts in my xorg.conf 
and launch them with this at the end of my rc.local.  No gdm/cdm/whatever 
login stuff required.


if ! grep noautologin /proc/cmdline 1> /dev/null 2> /dev/null ; then
    echo "Launching XWindows"
    su - mythtv -c "bash -l startx -- :0 -novtswitch -sharevts -layout LCDTV -dpi 100" &
    su - projector -c "bash -l startx -- :1 -novtswitch -sharevts -layout PROJECTORSCREEN "&
fi


Each user has a .xinitrc launching xfce Like the following:
mythtv at bork:~$ cat .xinitrc
DISPLAY=:0 /usr/local/bin/xvattr -a XV_COLORKEY -v 66048
xset s off
xset -dpms 
exec /usr/bin/xfce4-session
xset s off

Each users XFCE hsa an autostartfile to launch the frontend for the user.
I use a looping shell script to auto launch mythfrontend again if the 
app crashes. This makes it pretty simple to also auto grab backtraces 
from crashes if I choose to do that as well.

mythtv at bork:~$ cat .config/autostart/MythFE.desktop 
[Desktop Entry]
Encoding=UTF-8
Version=0.9.4
Type=Application
Name=MythFE
Comment=MythFrontend
Exec=/usr/local/bin/runfe.sh
StartupNotify=false
Terminal=false
Hidden=false



And I have the 2 looping scripts as follows:

mythtv at bork:~$ cat /usr/local/bin/runfe.sh
#!/bin/sh

export DISPLAY=:0
cd /home/mythtv
while true; do

        logger -t runfe.sh "Running Mythfrontend"
        mythfrontend -v playback -l mythfrontend.log
        sleep 5
done
echo "Exiting"


mythtv at bork:~$ cat /usr/local/bin/runfeproj.sh
#!/bin/sh

export DISPLAY=:1
cd /home/projector
while true; do

        logger -t runfeproj.sh "Running Mythfrontend"
        mythfrontend -v playback -l mythfrontend.log
        sleep 5
done
echo "Exiting"


 So after all of that I end up with 2 unique frontends in seperate X 
sessions on 1 box, logging to seperate logfiles and auto launching 
if one were to crash.





More information about the mythtv-users mailing list