[mythtv-users] Re:Installing Ratpoison (was: Which Window Manager?)

Phill Edwards philledwards at gmail.com
Fri Aug 26 06:56:54 UTC 2005


> I'd like to see those if you don't mind.

Here you go.

.xsession calls ratpoison.

.ratpoisonrc calls mythfrontend via a script called
/usr/local/bin/mythrestart.sh which checks to see if it's already
running or not.

HTH,
Phill
-------------- next part --------------
# This is a sample .ratpoisonrc file
#
# $Id: sample.ratpoisonrc,v 1.6 2003/09/10 22:25:32 sabetts Exp $

# 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
#xloadimage -onroot -quiet -center -border black /home/.mythtv/mythtvstart.jpg
###xloadimage -onroot -quiet -center /home/mythtv/.mythtv/mythtvstart.jpg

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-bold-r-*-24-*'
#bind x exec xterm -j -fn '*-courier-bold-r-*-20-*'
bind x exec xterm -j -fn '*-courier-*-r-*-14-*'
# 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

### Start remote control checker - if no remote detected in 1st 10 mins then
### mythfrontend gets killed automatically.
exec /usr/local/bin/remote_chk.sh
exec /usr/local/bin/mythrestart.sh
-------------- next part --------------
#!/bin/bash
#exec /etc/X11/xdm/Xsession ratpoison
#xset -dpms s off
#ratpoison &
#kde &
#irxevent &
#irexec &
#mythfrontend 2>&1 >> /var/log/mythtv/mythfrontend.log &

### Added by PME to setup x11vnc to accept VNC connections
### Only start x11vnc listeners if there isn't one already running.
#X11VNCSTATUS=`ps -e | grep x11vnc | grep -v grep | wc -l | awk '{print $1}'`
#if [ $X11VNCSTATUS -eq 0 ]
#then
#    /usr/bin/x11vnc -nap -wait 50 -passwd perkins2 -display :0 -forever -o /var/log/x11vnc.log -bg -allow 192.168.0. -norepeat
#fi

/usr/X11R6/bin/xset s noblank
/usr/X11R6/bin/xset s off
/usr/X11R6/bin/xset -dpms s off

### Only start irexec if there isn't one already running.
#IREXECSTS=`ps -e | grep irexec | grep -v grep | wc -l | awk '{print $1}'`
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
#irexec --daemon /home/mythtv/.mythtv/lircrc

###/usr/bin/ratpoison &
###exec mythfrontend
nvidia-settings --load-config-only &
exec /usr/bin/ratpoison
#mythfrontend
#mythfrontend 2>&1 >> /var/log/mythtv/mythfrontend.log
#/usr/local/bin/remote_chk.sh &
#/usr/local/bin/mythrestart.sh


More information about the mythtv-users mailing list