'데비안'에 해당되는 글 1건

  1. 2009.03.27 Debian xtrlock - Minimal X display lock program
2009. 3. 27. 09:28

Debian xtrlock - Minimal X display lock program

Ratpoison (rp) is a different animal. While everybody else is trying to make
their desktop environment or window manager "prettier", rp is into speed and
functionality. No icons, no themes, screens are maximized by default, its
main purpose is just plain speed, simplicity, and no mouse. This may not
appeal to many users, but it does to certain people, mainly, developers,
programmers, power users, and other plain users who cannot be distracted by
the mouse, icons, clocks, blinking applets, and other moves that momentarily
take their hands off the keyboard, robbing them of precious time.

INSTALLATION
$ sudo apt-get install ratpoison menu 9menu xtrlock

BOOT
$ jpico .xinitrc

**************
#!/bin/sh

numlockx &
unclutter &
ratpoison
*************

save/exit

Ctrl+Alt+Backspace

startx (Enter)


You're in the X system looking at a gray screen, the default meta key combo
is C-t (Ctrl+t). This, in combination with another key will be the
keybinding to reach the app or function you are looking for.

C-t + ? -will give you a help screen with the cheat code combinations.
C-t + a -will give you the time and date in the upper right corner
C-t + c -will launch your terminal
C-t + : -will give you a Run box
C-t + ; -will give you a command line for rp commands

But to me, the combo C-t is a PITA, so i googled for a different
configuration in which C-t is replaced, and found one in which it's replaced
by the sole key 'Insert' (the key on top of Delete or Supr).

Example:
Insert + a = time/date (I found this much easier)
It will appear at the top, right hand corner.

The keybindings and other characteristics go into your ~/.ratpoisonrc,
here's mine.

Note: to cancel anything, press Escape

$ jpico .ratpoisonrc it gives you an empty file, copy/paste this:

#What's the shell?
alias term exec aterm

##Setting the prefix keys
###Set the ctrl-t key to something easier
escape less

###Set the ctrl-t key to something easier
definekey top Insert readkey root
definekey root Insert link less

##Set the mouse warping option.
warp on
##Hush up, ratpoison. I know what the prefix key is.
startup_message off

##There are three different ways ratpoison can "name" frames.
##By title, name, or class. Title gets you gunk like
##"emacs@localhost.localdomain";
##but name and class give you the sensible "emacs" or "Emacs".
set winname class

##Graphics tweaks
###Not quite sure what these do, copied from Reactor Core.
###Supposedly make borders take up less space.
defborder 0
defpadding 0 0 0 0
defbarpadding 0 0

###Change the background and pointer in X
exec xsetroot -solid black -cursor_name left_ptr

##aliasing keys within ratpoison
###make semicolon invoke ratpoison command, and colon shell command.
bind semicolon colon
bind colon exec

###Show-the-root-window script
alias showroot exec ratpoison -c fdump; ratpoison -c 'select -' -c only
alias unshowroot exec ratpoison -c "frestore at $HOME/.rpfdump"
bind B showroot

###Shortcut for apps
bind F12 exec xfe
bind F11 exec xchat
bind F10 exec xzgv
bind F9 exec aterm -e elinks
bind F5 exec opera
bind F6 exec iceweasel
bind F7 exec icedove
bind F8 exec aterm -e scrot -c -d 10
bind c exec aterm
bind x exec xtrlock
bind r restart
bind Delete exec sudo halt
bind W exec ~/bin/windows

#numpad numbers work to select window
bind KP_0 select 0
bind KP_1 select 1
bind KP_2 select 2
bind KP_3 select 3
bind KP_4 select 4
bind KP_5 select 5
bind KP_6 select 6
bind KP_7 select 7
bind KP_8 select 8
bind KP_9 select 9

In the 'shortcut for apps' section, 'bind' is the meta combo, in our case,
the key 'Insert' (to the right of the main keys block and on top of Delete).
Notice i set my everyday's apps near the key Insert for ease of use:

Insert + F12 - xfe, my favorite file manager
Insert + F11 - xchat, for irc chat
Insert + F10 - xzgv, image viewer
Insert + F9 - elinks, my favorite browser

Being my usual anal self, i trimmed the fat and my .ratpoisonrc looks now
like this:

alias term exec aterm
escape less
definekey top Insert readkey root
definekey root Insert link less
warp on
startup_message off
set winname class
defborder 0
defpadding 0 0 0 0
defbarpadding 0 0
exec xsetroot -solid black -cursor_name left_ptr
bind semicolon colon
bind colon exec

alias showroot exec ratpoison -c fdump; ratpoison -c 'select -' -c only
alias unshowroot exec ratpoison -c "frestore at $HOME/.rpfdump"
bind B showroot

###Shortcut for apps
bind F12 exec xfe
bind F11 exec xchat
bind F10 exec xzgv
bind F9 exec aterm -e elinks
bind F8 exec opera
bind F7 exec iceweasel
bind F6 exec icedove
bind F5 exec aterm -e scrot -c -d 10
bind x exec xtrlock
bind r restart
bind Delete exec sudo halt
bind W exec ~/bin/windows

#numpad numbers work to select window
bind KP_0 select 0
bind KP_1 select 1
bind KP_2 select 2
bind KP_3 select 3
bind KP_4 select 4
bind KP_5 select 5
bind KP_6 select 6
bind KP_7 select 7
bind KP_8 select 8
bind KP_9 select 9


LOCKING THE SCREEN
Insert + x - launches xtrlock to lock the screen (a blue lock appears) to
unlock:type your user password (will not be seen) press Enter and that's it.
Obviously, you need to have the package xtrlock installed.

RESTART
Insert + r - will restart rp, (used after making changes etc)

SHUTDOWN
Insert + Delete - will shutdown the box - cool, huh? one key on top of the
other. Badda bing, you're outta Dodge Smile

WINDOWS
Insert + w - will show what windows you got open
Insert + # of window - will take you to the window you want

Insert + s - if you got more than one window open and want to see them
simultaneously, this combo will split the windows horizontally, you will be
able to read more than one window. Pretty cool when reading from xchat and
writing something.

Insert + S - will split the window vertically.
Insert + arrow (up/down) will make active the window
Insert + Q - will separate the windows back to normal (full screen)

SWITCHING TO ANOTHER WM
Insert + ; - will give you a command space to write, example:

tmpwm icewm-lite

will switch window managers you got installed (does not work with gnome/kde)

RUN BOX
Insert + : or Insert + ! - gives you a Run Box to launch other apps
for example: sudo reboot.

Insert + b - will banish the mouse pointer
Insert + v - will show the rp version you're using

SWITCHING WINDOWS
Insert + Insert - will go to next window (like Alt+Tab in other wm)
Insert + Space bar - same as above
Insert + Enter - same as above

Insert + n - next window
Insert + p - previous window

CLOSING APPS
Insert + k - will close an app
Or use the bindings of the app to close

DEBIAN MENU
Insert + period (.)
Use Enter to move

This is by no means a complete description of what you can do, i'm just
learning. if you do:

$ man ratpoison

(you'll find it pretty concise and to the point)

Obviously, this window manager is not for everybody, but its users are loyal
to it. After a couple of days, i was so used to it, i made it my default
window manager. Also, the app 'screen' is a natural compliment to this wm.
If you do a 'ps aux' from the terminal, you will see that rp uses only 1.4
MB of RAM. Not bad for old boxes not having too much RAM. This wm is fast.

NOTE: i haven't figured out how to create workspaces and switch between
them, if you know this, please post it.

Have fun,

Luis Lima aka macondo/Lou
10 May 2007


출처 : http://forums.debian.net/

Trackback 0 Comment 0