Linux Commands Examples

A great documentation place for Linux commands


displays an image or image sequence on any X server.


display [options] input-file

add an example, a script, a trick and tips

: email address (won't be displayed)
: name

Step 2

Thanks for this example ! - It will be moderated and published shortly.

Feel free to post other examples
Oops ! There is a tiny cockup. A damn 404 cockup. Please contact the loosy team who maintains and develops this wonderful site by clicking in the mighty feedback button on the side of the page. Say what happened. Thanks!



Triple (3) Monitors under Linux

I have 2 displays. Configuration was just easy with the nvidiasettings tool, and there seems to be no trouble with adding a new head to the existing configuration.

Everything you mention works fine :)


Continuously monitor files opened/accessed by a process

Try with strace -p 12345; it should do what you are trying to achieve.


Is there a quick/automatic way to change monitor brightness at night on Windows 7 or Linux?

Useful Answer: Well, for something clickable on screen, there's the Display Brightness Gadget. Also on the page is a command line utility for getting/setting the screen brightness. You can use that with the Task Scheduler or your favorite hotkey tool of choice for timed or hotkeyed modification of your brightness.

Snarky Answer: It's not your monitor's brightness keeping you up, it's the upright position, focusing on a screen, and brain engagement (maybe :-P ) from interacting with your PC keeping up awake.

Snarky Answer #2: Your monitor has a power button -- use it.


Linux "Top" command for Windows Powershell?

There's nothing that I know of that in single cmdlet form, but like you say, scripts are easy to right to emulate top.

while (1) { ps | sort -desc cpu | select -first 30; sleep -seconds 2; cls }


How to watch Youtube fullscreen on one monitor of a dual-monitor display?

This is the default behavior of Flash in a browser, and you need to tweak Flash itself to work around the issue. I've had luck with FlashHacker in the past, and the dev now has a Chrome-specific version:


How to disable the screen (Linux without X)

If you have a serial port on your machine you could run it headless.

Do a web search for "linux serial console howto".


Faking monitor EDID information

You might try

Option "IgnoreEDID" "TRUE"

and then specify your monitor's information manually. If IgnoreEDID doesn't work for you, try

Option "UseEDIDFreqs" "FALSE"
Option "UseEDIDDpi" "FALSE"


Netbook screen too small, Software fix?

Virtual Screen

Use a virtual screen larger than the physical screen size.

Often this can be done by:

  1. Adding something like "Virtual 1024x800" to /etc/X11/xorg.conf then
  2. Restarting X11 (using Ctrl+Alt+Backspace on those distributions/configurations that support this).

What if I have Ubuntu?

On Ubuntu Ctrl+Alt+Backspace does not restart X11. If using Ubuntu, your options are one of:

  • sudo /etc/init.d/gdm restart
  • System -> Preferences -> Keyboard -> Layout -> Key to kill X -> [/] Ctrl+Alt+BS
  • Reboot if you can't figure out a better way to restart X11.

Moving windows that are larger than screen

As JamesGecko's Answer suggests ...

The KDE window manager, Kwin "lets you easily move windows by pressing the ALT button. You can then just click on a window's content. While you hold the left mouse button pressed, windows will move". -

You can therfore grab a window somewhere in it's lowest visible region and drag it up to reveal any [OK], [Cancel] or other buttons at the bottom that were formerly offscreen and inaccessible.


How can I use my laptop's monitor as my PC's ONLY monitor?

There are a number of open source software projects that create software that allows you to control multiple computers using just the keyboard and mouse of one of the computers. The best known is probably Synergy:

There are some others that people advocate, as well as some forks of Synergy that people prefer to Synergy itself.

Just remoting into the PC using VNC might be enough for your needs, too.

[Edit: SORRY, after thinking a moment I realize Synergy is not at all what you want. Synergy would allow you to control the PC from your laptop's keyboard (which is great) but it would generally be used in dual-monitor situation where your pc also had its own monitor. VNC is solution you want if you want to see the PC"s display on your laptop display. ]


X on one monitor, a bare, tty terminal on another? (linux)

The problem you have with running the setup you mention is the keyboard. The keyboard will be captured by the x server running on your primary display (high-res). You will not be able to switch to the other terminal if you would like to type something in it.

Even if your secondary monitor is low resolution, you could run an xterm session on it that's separate from your main x screen. You will want to setup the 2 displays as completely different screens (not using xinerama). You will end up with 0.0 and 0.1 displays. Your primary display would be the 0.0 whereas your DISPLAY environment variable will be as follows:

export DISPLAY=:0.0

This configuration will allow you to move your mouse between the 2 screens to choose where your keyboard input will be passed. In your .xinitrc (in your home dir), you could then do something as follows:

xsetroot -solid black
xsetroot -display :0.1 -solid darkblue
xterm -display :0.1 -fn 9x16 -geometry 86x36+1+1 &

This would start by setting the background of your primary display to black. Next it will set your secondary display background to darkblue (I use this color because I use my secondary screen for watching movies). Next line starts an xterm on your second display with a preset geometry. You will want to adjust the geometry to fit your screen the best for you. You cannot specify pixel width and height because the geometry for xterm measures in characters. If you choose the 9x16 font size as in my example and your secondary screen resolution is 800x600, you would do the following math:

font size = 9x16
screen size = 800x600
xterm width = ( 800 / 9 ) = 88.888
xterm height = ( 600 / 16 ) = 37.5

You want to round the number down some, especially for the width since you need to account for a scrollbar. You will not have a window manager on the secondary screen so there will be no xterm window title (unless you choose to run something light on the second monitor such as twm or fvwm). Basically, you will have to play with the numbers til you get it how you want it.

The last line in the .xinitrc file will launch the main window manager on your primary display. You can change this to gnome-session or whatever launches your favorite wm. You could also modify the existing .xinitrc for your distribution if you wish to preserve the ability to choose your window manager during login. There should be a skeleton file in your /etc/X11 for using as a base.


How to correct a screen wrapping around?

I had the same issue with CentOS 6.3 with a 19" Samsung monitor.

I solved this by changing the resolution in /System/Preferences/Display/ to 1280×720.


Fedora: Adding a third monitor to the mix

I had just such an arrangement a couple of years ago. The "cheap" card was also an NVIDIA one (sorry can't remember the exact model). But it all worked fine and the NVIDIA software was able to control everything, including things like having some of the monitors rotated 90 degrees.


Adjust screen brightness automatically at night

One app to try

f.luxâ„¢ Better lighting...for your computer

it makes the color of your computer's display adapt to the time of day, warm at night and like sunlight during the day.

Available for XP/Vista/7, OSX and linux


How do you find out a laptop screen panel manufacturer / model with Linux? (Samsung, LG, Chi Mei, etc)

Use any utility that shows the EDID information. One place to look for this information is in /var/log/Xorg.0.log


Image Settings:
-antialias remove pixel-aliasing
-authenticate value decrypt image with this password
-backdrop display image centered on a backdrop
-channel type apply option to select image channels
-colormap type Shared or Private
-colorspace type alternate image colorspace
-comment string annotate image with comment
-compress type type of pixel compression when writing the image
-decipher filename convert cipher pixels to plain pixels
-define format:option
define one or more image format options
-delay value display the next image after pausing
-density geometry horizontal and vertical density of the image
-depth value image depth
-display server display image to this X server
-dispose method layer disposal method
-dither method apply error diffusion to image
-endian type endianness (MSB or LSB) of the image
-equalize perform histogram equalization to an image
-filter type use this filter when resizing an image
-format "string" output formatted image characteristics
-fuzz distance colors within this distance are considered equal
-geometry geometry preferred size and location of the Image window
-gravity type horizontal and vertical backdrop placement
-identify identify the format and characteristics of the image
-immutable displayed image cannot be modified
-interlace type type of image interlacing scheme
-interpolate method pixel color interpolation method
-label string assign a label to an image
-limit type value pixel cache resource limit
-loop iterations loop images then exit
-map type display image using this Standard Colormap
-matte store matte channel if the image has one
-monitor monitor progress
-page geometry size and location of an image canvas
-profile filename add, delete, or apply an image profile
-quality value JPEG/MIFF/PNG compression level
-quantize colorspace reduce colors in this colorspace
-quiet suppress all warning messages
-regard-warnings pay attention to warning messages
-remote command execute a command in an remote display process
-repage geometry size and location of an image canvas (operator)
-sampling-factor geometry
horizontal and vertical sampling factor
-scenes range image scene range
-seed value seed a new sequence of pseudo-random numbers
-set property value set an image property
-size geometry width and height of image
-support factor resize support: > 1.0 is blurry, < 1.0 is sharp
-texture filename name of texture to tile onto the image background
-transparent-color color
transparent color
-treedepth value color tree depth
-update seconds detect when image file is modified and redisplay
-verbose print detailed information about the image
-visual type display image using this visual type
-virtual-pixel method
virtual pixel access method
-window id display image to background of this window
-window-group id exit program when this window id is destroyed
-write filename write image to a file

Image Operators:
-auto-orient automatically orient image
-border geometry surround image with a border of color
-clip clip along the first path from the 8BIM profile
-clip-path id clip along a named path from the 8BIM profile
-colors value preferred number of colors in the image
-contrast enhance or reduce the image contrast
-crop geometry preferred size and location of the cropped image
-despeckle reduce the speckles within an image
-edge factor apply a filter to detect edges in the image
-enhance apply a digital filter to enhance a noisy image
-extract geometry extract area from image
-flip flip image in the vertical direction
-flop flop image in the horizontal direction
-frame geometry surround image with an ornamental border
-gamma value level of gamma correction
-monochrome transform image to black and white
-negate replace each pixel with its complementary color
-raise value lighten/darken image edges to create a 3-D effect
-resample geometry change the resolution of an image
-resize geometry resize the image
-roll geometry roll an image vertically or horizontally
-rotate degrees apply Paeth rotation to the image
-sample geometry scale image with pixel sampling
-segment value segment an image
-sharpen geometry sharpen the image
-strip strip image of all profiles and comments
-trim trim image edges

Image Sequence Operators:
-coalesce merge a sequence of images
-flatten flatten a sequence of images

Miscellaneous Options:
-debug events display copious debugging information
-help print program options
-log format format of debugging information
-list type print a list of supported option arguments
-version print version information

In addition to those listed above, you can specify these standard X resources as command line options: -background, -bordercolor, -borderwidth, -font, -foreground, -iconGeometry, -iconic, -mattecolor, -name, -shared-memory, -usePixmap, or -title.

By default, the image format of ’file’ is determined by its magic number. To specify a particular image format, precede the filename with an image format name and a colon (i.e. ps:image) or specify the image type as the filename suffix (i.e. Specify ’file’ as ’-’ for standard input or output.

1 press to map or unmap the Command widget
2 press and drag to magnify a region of an image
3 press to load an image from a visual image directory


Copyright (C) 1999-2012 ImageMagick Studio LLC. Additional copyrights and licenses apply to this software, see file:///usr/share/doc/imagemagick/www/license.html or


The display program defaults to the X screen resolution. To display vector formats at their intended size, override the default resolution:

display -density 72 drawing.svg


The display program is a member of the ImageMagick(1) suite of tools. Use it to display an image or image sequence on any X server.

For more information about the display command, point your browser to file:///usr/share/doc/imagemagick/www/display.html or

see also


How can this site be more helpful to YOU ?

give  feedback