Grab X11 input and create an MPEG at 25 fps with the resolution 800x600
Have you ever had to scp a file to your work machine in order to copy its contents to a mail? xclip can help you with that. It copies its stdin to the X11 buffer, so all you have to do is middle-click to paste the content of that looong file :)
That works in all softs, CLI or GUI... I don't want to waste time to all the time typing the same stuff . So, I have that command in my window manager shortcuts ( meta+l ). All the window managers have editable shortcuts AFAIK. If not, or you don't want to use it that way, you can easily use the xbindkeys soft.
I you're using kde4, you can run :
systemsettings
then open "inputs actions" and create a new shortcut.
For Gnome take a look there : http://www.cyberciti.biz/faq/howto-create-keyboard-shortcuts-in-gnome/
A more advanced one, with strings and newlines :
xvkbd -xsendevent -text "---8<-----\nToday date is: $(date +%Y%m%d)\n---8<-----"
For complicated or long paste, you can feed xvkbd with a file :
xvkbd -xsendevent -file <file>
You can simulate ^C ( control+c ) too or others combinations of keys :
xvkbd -text "\C\Ac"
There's no man page nor help ( On my Archlinux distro ), but you can see online doc there : http://homepage3.nifty.com/tsato/xvkbd/
Show Sample Output
Requires: imagemagick and graphviz
On Debian systems, displays a graph of package dependencies. Works also with other image formats, like svg :
apt-cache dotty bash | dot -T svg | display
i spent way too many hours trying to fiddle with /etc/X11/xorg.conf trying to hook up various external projectors. too bad i didn't know this would solve all my problems.
This will save your open windows to a file (~/.windows).
To start those applications:
cat ~/.windows | while read line; do $line &; done
Should work on any EWMH/NetWM compatible X Window Manager.
If you use DWM or another Window Manager not using EWMH or NetWM try this:
xwininfo -root -children | grep '^ ' | grep -v children | grep -v '<unknown>' | sed -n 's/^ *\(0x[0-9a-f]*\) .*/\1/p' | uniq | while read line; do xprop -id $line _NET_WM_PID | sed -n 's/.* = \([0-9]*\)$/\1/p'; done | uniq -u | grep -v '^$' | while read line; do ps -o cmd= $line; done > ~/.windows
Show Sample Output
This starts a very basic X session, with just a simple xterm. You can use this xterm to launch your preferred distant session.
ssh -X john@otherbox gnome-session
Try also startkde or fluxbox or xfce4-session.
To switch between your two X servers, use CTRL+ALT+F7 and CTRL+ALT+F8.
Reads a username from Show Sample Output
I'm not sure what apt this is, but it seems to work on most X screens, an is useful for saving power, and not straining your eyes Show Sample Output
Requires consolekit (works in e.g. Ubuntu). Here x11-display is DISPLAY Show Sample Output
This command first determines whether a second screen is connected. If this is the case, it sets the screen's RGB gamma via xrandr. Useful for cheap or slightly defective monitors with a tint. In this example a yellowing/champagne color deviation is compensated for by decreasing the red and the green portion of the image.
a typical X11vnc command
Useful for window managers like i3. With a plugin like Mailbox Alert on can run this command each time a new mail arrives and it will be lighlighted by the window manager.
commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.
Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):
Subscribe to the feed for: