Commands tagged xwindows (3)

  • A lot of X applications accept --geometry parameter so that you can set application size and position. But how can you figure out the exact arguments for --geometry? Launch an application, resize and reposition its window as needed, then launch xwininfo in a terminal an click on the application window. You will see some useful window info including its geometry. Show Sample Output


    3
    xwininfo
    jackhab · 2009-08-13 14:15:39 3
  • a quick one-line way to disable caps lock while running X.


    2
    xmodmap -e "remove Lock = Caps_Lock"
    mzandrew · 2009-02-27 16:44:22 8
  • After executing this, click on a window you want to track X Window events in. Explaination: "xev will track events in the window with the following -id, which we get by greping window information obtained by xwininfo" Show Sample Output


    2
    xev -id `xwininfo | grep 'Window id' | awk '{print $4}'`
    ktoso · 2009-09-19 22:47:16 6

What's this?

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.

Share Your Commands


Check These Out

Top 10 Memory Processes (reduced output to applications and %usage only)
Top 10 Memory Processes (reduced output to applications and %usage only)

To have only unique lines in a file

Converts uppercase chars in a string to lowercase
Another alternative is to define a function: lower() { echo ${@,,} } lower StrinG

Clean your broken terminal
When some console full-screen program (minicom, vi, some installers) breaks down your terminal, try this command to revert all options to "sane" settings (sane is a built-in combo of a lot of stty options)

Sort output by column
(separator = $IFS)

Start dd and show progress every X seconds
Adjust "sleep X" to your needs. *NOTE: First sleep is required because bash doesn't have a "post-test" syntax (do XXX while).

Capture screen and mic input using FFmpeg and ALSA
Yet another x11grab using ffmpeg. I also added mic input to the capturing video stream using alsa. Yet I need to find out how to capture audio which is currently playing.

Detach a process from the current shell
Continue to execute the command in background even though quitting the shell.

Which processes are listening on a specific port (e.g. port 80)
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"

check open ports without netstat or lsof


Stay in the loop…

Follow the Tweets.

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

Subscribe to the feeds.

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: