dcsimg

Power Up Linux GUI Apps

Save time and gain functionality by starting your GUI apps from the command line.

Windowing interfaces to Linux have lots of advantages. Once you find the programs you need, the menus and dialog boxes list your choices, and there’s often not much else to know about the interface.

One big disadvantage of GUI apps, though, is that you’re mostly limited to whatever the interface lets you do — unless you want to re-code the interface yourself, that is. For instance, how can you use a photo viewer to see all of the photos you put in various places on your disk this past Monday? If you know where the photos are stored and what their names are, you can navigate through your directories in a file browser like Nautilus, clicking on files to view them. But what a pain!

Linux users have more choices. You can start most GUI apps from the command line with a list of arguments (usually filenames) to work on. This lets you marry the handy features of shells (filename completion, wildcards, loops and more), and well as the power of utilities like find and grep, to the GUI apps you’re already using. The command line also often lets you specify options that aren’t available from menus.

Let’s start with a couple of examples. You’d like to use GIMP to edit the photo files with rome in their filenames — like rome12.jpg and elsa in rome.jpg. Start GIMP this way:

$ gimp *rome*.jpg

You have photos of Rome in some of your 100 subdirectories but you aren’t sure which. You’d like to view them all with Eye of GNOME. Let find or the shell find the files and give their pathnames to eog:

$ eog $(find . -name '*rome*.jpg' -print)
$ eog **/*rome*.jpg

The second example above works in Z Shell and in bash version 4 with the globstar shell option set. (** is a recursive wildcard operator. To learn more, read Even Wilder Wildcards.)

Building the Command Line

The first word on a command line is usually the name of a program you want to run, like konqueror. It may be a different name than you see on your desktop menus — such as eog.

Next you can add options. Each option starts with a space and one or two dashes. For a list, use the man command or try the program’s --help option:


$ man konqueror
No manual entry for konqueror
$ konqueror --help
Usage: konqueror ... [options] [URL]
...description of each option...

From those, you should get an idea of how to build the command line. If not, and the application doesn’t do anything dangerous (like removing files), you can also just experiment. For instance, although Konqueror says it wants a single URL, it accepts filenames (and wildcards); they’ll open in tabs, one per file. These usually come last on a command line. For example, to open all filenames ending in .html within an 800×600-pixel window at the bottom right corner of the display:

$ konqueror --geometry 800x600-0-0 *.html

When you start a GUI application from the command line, its window should open fairly soon. If you get another shell prompt (like $), the app is running independently of the shell. If you don’t get another prompt, the shell is waiting for the app to finish. In that case, you can add a final ampersand (&) to run the process in the background and get another prompt:

$ gimp [abc]*tif &
[1] 1234
$

Shell and utilities give lots of flexibility; we’ll have to settle for just a few examples. The Linux Magazine Power Tools columns have more ideas.

Next: Argument Lists and Loops

Comments on "Power Up Linux GUI Apps"

Go to the second step and it will bring up a window, click add files get noticed and be adding people want protected Discount Tire Coupon Code A book’s ISBN code is the foremost way to confirm you support the right booking costume discounters coupon codes She knows which way to show her face and how close to permit a camera get to her outback discount coupons What do you perform on your spare time las vegas discounts and coupons the term weblog evolved into blog fairly a few anything which might be discussed free online coupon codes

Here are several of the websites we suggest for our visitors.

Below you?ll find the link to some web pages that we believe you’ll want to visit.

Just beneath, are quite a few completely not connected web pages to ours, nonetheless, they may be surely worth going over.

We prefer to honor quite a few other world-wide-web internet sites around the net, even if they aren?t linked to us, by linking to them. Below are some webpages really worth checking out.

Very couple of web sites that take place to become comprehensive below, from our point of view are undoubtedly properly worth checking out.

We prefer to honor several other internet websites on the internet, even if they aren?t linked to us, by linking to them. Below are some webpages worth checking out.

Usually posts some quite intriguing stuff like this. If you?re new to this site.

Check below, are some absolutely unrelated web-sites to ours, nevertheless, they’re most trustworthy sources that we use.

Please take a look at the web-sites we comply with, which includes this 1, as it represents our picks through the web.

Every once in a though we decide on blogs that we study. Listed below are the newest internet sites that we opt for.

Leave a Reply