Computers


How to take screenshots in Ubunutu like Mac OS X

http://www.uncubeme.com/wp-content/plugins/sociofluid/images/digg_32.png http://www.uncubeme.com/wp-content/plugins/sociofluid/images/reddit_32.png http://www.uncubeme.com/wp-content/plugins/sociofluid/images/dzone_32.png http://www.uncubeme.com/wp-content/plugins/sociofluid/images/stumbleupon_32.png http://www.uncubeme.com/wp-content/plugins/sociofluid/images/delicious_32.png http://www.uncubeme.com/wp-content/plugins/sociofluid/images/technorati_32.png http://www.uncubeme.com/wp-content/plugins/sociofluid/images/google_32.png http://www.uncubeme.com/wp-content/plugins/sociofluid/images/myspace_32.png http://www.uncubeme.com/wp-content/plugins/sociofluid/images/facebook_32.png http://www.uncubeme.com/wp-content/plugins/sociofluid/images/yahoobuzz_32.png http://www.uncubeme.com/wp-content/plugins/sociofluid/images/twitter_32.png

In front of me are two PCs. One runs Mac OS X; the other the latest version of Ubuntu Linux. Ubuntu provides a screenshot utility that is slightly better than the Windows Print Screen key–that is, you can press print screen and actually get a *.png image without pasting the buffer into an image-editing program like paint. Still, the stock Ubuntu screen capture utility is nothing compared to the Mac OS X version. With OS X, all one needs to do is press the combination of command+shift+3 to have a full screenshot sent to the desktop in a *.png or command+shift+3 to highlight a section of the screen and have that cropped portion sent to the desktop. Today, I will show you how Mac-inate (trademark pending) Ubuntu.

The first step is getting a program that fits the bill–one that allows a user to crop a portion of the screen for a screenshot. I’m using a program called “scrot.” Open up the Synaptic Package Manager (System > Administration > Synaptic Package Manager), click on the Search button, and type “scrot.” Right click on the package and select “Mark for Installation” and then click the apply button. You can actually play around with this utility by typing “scrot -s” on the command line and then highlighting a portion of the screen.

Now, that we have a working utility, we need to map this command (scrot -s) to a keyboard shortcut. Because Alt+Shift+4 are in the same positions as command+shift+4 on the Mac keyboard, I want to map this keyboard combination to the command. Open a terminal and type gconf-editor or press Alt+F2 and type gconf-editor into the Run Application. The Configuration Editor will open. Navigate to Apps > metacity > global_keybindings and right click on one of the disabled run_command keybindings and edit the key. Enter the desired key combination (4 in this case) and click the OK button.

2007-09-23-104254_830×250_scrot.png

Next, navigate to Apps > metacity > keybinding_commands and right click on the associated command key (e.g., if you used run_command_1 in the previous step, then command_1 is what needs to be edited in this step). Use the full path of the command (/usr/bin/scrot -s) and click OK again. Close the configuration editor and that’s it…kind of.

2007-09-23-104437_814×295_scrot.png

The problem that you will run into with Linux is that most applications try to interpret the key bindings before metacity. So, for example, trying to use the shortcut keys in Open-Office to capture a picture from a graph won’t work. Luckily, FireFox doesn’t have this problem. Still, I don’t want to open Gimp every time I need to get a small section of the screen. The best way to handle this is to use a hotkey that always seems to work–alt+F2 and then type in scrot -s. This will get the desired result pretty quickly. Screenshots from scrot are sent to a user’s home directory.

Try it out.

some posts that may be related

speak up

Add your comment below, or trackback from your own site.

Subscribe to these comments.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

*Required Fields