[mythtv-users] Ratpoison on dedicated frontend

Phill Edwards philledwards at gmail.com
Tue Oct 10 11:02:17 UTC 2006


> My guess is that the machine is just barely too slow so I decided to try
> ratpoison to free up some resources. I yum installed it, selected it from
> custom session, clicked to make it default and setup a ~mythtv/.xsession
> file just as it says here
>
> http://www.gossamer-threads.com/lists/mythtv/users/98133?nohighlight=1#98133
>
> However I don't think this file is every executed as mythfrontend never
> starts.  So I RTFM at ratpoison site (which doesn't mention anything about
> how to install ratpoison btw). and decided to create a .ratpoisonrc file
> too. Doesnt seem that this gets executed either since frontend still doesnt
> start up. Also when I ctrl-t or ctrl-c, no terminal pops up. I obviously
> don't know anything about ratpoison and the documentation is horrible unless
> you already know how to use it.
>
> Anyone have any idea what boneheaded thing I'm doing wrong ;)

Here's my ~/.ratpoisonrc (excuse all the commented out crud):

# This is a sample .ratpoisonrc file
#
# $Id: sample.ratpoisonrc,v 1.6 2003/09/10 22:25:32 sabetts Exp $
###
### NB - this file is invoked by ~mythtv/.xsession
###

# Set the prefix key to that of screen's default
escape C-a

# Gets rid of that ugly crosshairs default cursor
# and set the background to black
###exec xsetroot -solid black -cursor_name left_ptr
#exec xsetroot -solid blue -cursor_name left_ptr
exec xsetroot -cursor_name left_ptr
exec xloadimage -onroot -quiet -center /home/mythtv/.mythtv/mythtvstart.jpg

# Emulate screen by starting with a new xterm
###exec xterm

# Bind e to our favorite editor
###bind e exec emacs

# bind s to interactively run a surfraw query on freshmeat
###bind s colon exec xterm -e freshmeat

# bind b (`b' for browse) to interactively ask for an URL to open
###bind b colon exec mozilla http://www.
bind b exec firefox

# bind f (`f' for frontend) to start up mythfrontend
bind f exec /usr/local/bin/mythrestart.sh

# Use the name of the program rather than the title in the window list
defwinname name

# bind M-! to store the current frame layout in slot #1
bind M-exclam exec ratpoison -c "setenv fs1 `ratpoison -c 'fdump'`"

#bind M-1 to restore the frame layout in slot #1
bind M-1 exec ratpoison -c "frestore `ratpoison -c 'getenv fs1'`"

# Do the same for slot #2 and bind it to M-@ and M-2, respectively.
###bind M-at exec ratpoison -c "setenv fs2 `ratpoison -c 'fdump'`"
###bind M-2 exec ratpoison -c "frestore `ratpoison -c 'getenv fs2'`"

# Give ourselves another slot on M-# and M-3, respectively.
###bind M-numbersign exec ratpoison -c "setenv fs3 `ratpoison -c 'fdump'`"
###bind M-3 exec ratpoison -c "frestore `ratpoison -c 'getenv fs3'`"

# Here's a hack from John Meacham:

bind a exec ratpoison -d :0.0 -c "echo `date +'%r - %A %n    %D - %B'`
 `cal | tail +2 | sed -e 's/^Su/\n\n Su/' -e 's/.*/ & /' -e \"s/\
$(date +%e)\ /\<$(date +%e)\>/\"`"

# it produces output like the following in the message window, very handy:
#         +-----------------------+
#         |05:05:24 PM - Tuesday  |
#         |   09/09/03 - September|
#         |                       |
#         |Su Mo Tu We Th Fr Sa   |
#         |    1  2  3  4  5  6   |
#         | 7  8< 9>10 11 12 13   |
#         |14 15 16 17 18 19 20   |
#         |21 22 23 24 25 26 27   |
#         |28 29 30               |
#         +-----------------------+

### These added by PME
bind x exec xterm -j -fn '*-courier-*-r-*-14-*'
bind t exec thunderbird
bind c exec ratpoison -d :0.0 -c "echo `sudo /usr/bin/mbmon -c 1`"

# Ctrl-A PrintScrn does screenshot from X. Remember - if you want to screenshot
# video you have to turn off XV 1st.
bind Print exec import -silent -window root /tmp/scrshot-$(date
+%Y%m%d%H%M%S).png

# Since running a 720x576 definition the ratpoison screens are too big for the
# display so we reduce the size of them with defpadding to make them fit
#defpadding 25 25 25 25

# This xvattr ensures that there's no blue line at the top of the screen when
# using the bobdeint filter on playbacks - no longer needed for 0.17 onwards.
#exec xvattr -a XV_COLORKEY -v 0

###exec setleds +num &> /dev/null

### Call mythwelcome
exec mythwelcome




And here's my ~/.xsession:

/usr/bin/xset s off    # Disable dynamic power management (screen blanking)
/usr/bin/xset s noblank

# Set numlock on
#exec setleds +num >/dev/null
#/usr/bin/numlockx

# Get rid of that ugly crosshairs default cursor and put up the mythtv
# background img.
#exec xsetroot -cursor_name left_ptr
#exec xloadimage -onroot -quiet -center /home/mythtv/.mythtv/mythtvstart.jpg

### Only start irexec if there isn't one already running.
IREXECSTS=`ps -e | grep irexec | grep -v grep | wc -l | awk '{print $1}'`
if [ $IREXECSTS -eq 0 ]
then
   irexec --daemon /home/mythtv/.mythtv/lircrc
fi

### Only start irxevent if there isn't one already running.
IRXEVENTSTS=`ps -e | grep irxevent | grep -v grep | wc -l | awk '{print $1}'`
if [ $IRXEVENTSTS -eq 0 ]
then
   irxevent /home/mythtv/.mythtv/lircrc &
fi

# Load saved nVidia driver custom settings
###    nvidia-settings --load-config-only &

# Start xbindkeys to get keyboard shortcuts - not needed for ratpoison
xbindkeys &

# Run script which starts mythfrontend
mythwelcome &

# Run window manager of choice here. I like ratpoison best but SoftSqueeze
# doesn't display properly under it :(
###exec /usr/bin/evilwm
exec /usr/bin/ratpoison
###exec /usr/bin/blackbox

HTH,
Phill


More information about the mythtv-users mailing list