On screen display of a command

Bookmark this category
delay: 2d On screen display of a command. $ date|osd_cat This is very useful if you need to show someone some text from a distance. (Like someone standing over your shoulder…)

I\’d recommend aliasing it to something like:

alias osd_cat=\”osd_cat -o 400 -s 8 -c blue -d 60 -f osd_cat -f -*-bitstream vera sans-*-*-*–200-*-*-*-*-*-*-*\”

xosd is the utility that provides osd_cat.

* View this command to comment, vote or add to favourites * View all commands by din7

commandlinefu.com

by David Winterbottom (codeinthehole.com)

URL: http://feedproxy.google.com/~r/Command-line-fu/~3/fWCQvX-EYxw/on-screen-display-of-a-command.

root shell auditing and syslog entry for all commands of shell

A lot of times there is a need to log all the messages and the output of the shell to the file or syslog. Sometimes I need that for some user too. script command can be used to do this but then sometimes you cannot tell the user the session is logged or you can ask the user to run this command and it should be automatically done. And sometimes there is a need put the output in the syslog so that the root user has more control and also mail for syslog is sufficient to be analyzed rather than looking for other files. Finally I found this :

Rootsh is a wrapper for shells which logs all echoed keystrokes and terminal output to a file and/or to syslog. Its mail purpose is the auditing of users who need a shell with root privileges. They start rootsh through the sudo mechanism.

This package is there in the Fedora repo\’s so all you need to do to install this is:

yum install rootsh

While you try to run this you might get a error like this:

/var/log/rootsh/amitag.20081215084812.04771: No such file or directory

One quick way to fix this is to run with \”-d\” option.

This problem mainly comes becomes it is mainly designed to be used with sudo. So the choice of how to use is left to you, but indeed a great tool for auditing.

top command with rc to make it more useful and beautiful.

Just for fun, somedays back I was reading the top command. This command is something that I have been using since long time and have never read the man page so I thought let me do that. And yes, it was worth while to look at that page. I came to know that top supports toprc file and that it can be used to configure the way top looks. So:

Here\’s how top looks without the rc file

\"top\"

And here\’s how it looks with the rc file:

\"top

And here is the ~/.toprc file:

RCfile for \”top with windows\” # shameless braggin\’

Id:a, Mode_altscr=0, Mode_irixps=1, Delay_time=5.000, Curwin=0

Def fieldscur=mfcAbdEgHIursOpQTvyzWjKNLX

winflags=32184, sortindx=10, maxtasks=0

summclr=2, msgsclr=1, headclr=7, taskclr=7

Job fieldscur=ABcefgjlrstuvyzMKNHIWOPQDX

winflags=62777, sortindx=0, maxtasks=0

summclr=6, msgsclr=6, headclr=7, taskclr=6

Mem fieldscur=ANOPQRSTUVbcdefgjlmyzWHIKX

winflags=62777, sortindx=13, maxtasks=0

summclr=5, msgsclr=5, headclr=4, taskclr=5

Usr fieldscur=ABDECGfhijlopqrstuvyzMKNWX

winflags=62777, sortindx=4, maxtasks=0

summclr=3, msgsclr=3, headclr=2, taskclr=3

This is just an example, but you can do much more with the rc file.