Depends.. How did you implement the remmina startup?
Let's look at 2 options for controlling ratpoison startup behaviour:
1. Using ~/.xinitrc
2. Using ~/.ratpoisonrc
1. using ~/.xinitrc
If you are using
~/.xinitrc to start ratpoison and remmina during your X initialisation sequence, then just add the shutdown (or halt, whichever..) command to that file:
Code: Select all
#~/.xinitrc
# Fire up ratpoison in the background (note the trailing ampersand).
exec /usr/bin/ratpoison&
# Run the remmina rdp client. No trailing ampersand here,
# meaning the init script will wait until the command completes.
# (i.e. when you close your rdp session).
/usr/bin/remmina -c /path/to/example_config_file
# Flush file system buffers and shut down the system
sudo sync && sudo poweroff
2. Using ~/ratpoisoinrc
Ratpoison's internal startup sequence can be controlled through a set of rc files. This is useful if you're starting ratpoison in a less controlled way, for example as default window manager for your X session. When ratpoisoin starts, it will try to read
~/.ratpoisonrc -- and if that does not exist
/etc/ratpoisonrc -- and execute each command therein when starting up.
You can add commands to ~/.ratpoisonrc or /etc/ratpoisoinrc by editing them in a text editor.
Code: Select all
# Run the remmina rdp client. Note we don't use the ampersand here,
# meaning the init script will wait until the command completes.
# (i.e. when you close your rdp session).
/usr/bin/remmina -c /path/to/example_config_file
# Flush file system buffers and shut down the system
sudo sync && sudo poweroff
Both these examples use a remmina config file to auto-connect to a pre-defined remote system.
You may envision this differently, please implement as desired.
In case you're launching remmina in a different way, then please explain (or use the above method instead).
P.S. if all you need is the RDP session, then you can probably do away with ratpoison entirely:
Code: Select all
#~/.xinitrc
/usr/bin/remmina -c /path/to/example_config_file
sudo sync && sudo poweroff
Try that -- good luck and have fun!
Dave Driesen
Linux dev and oldskool elite.