Author: Bruce Byfield
The GNU/Linux command line and desktop are both sophisticated interfaces, but they are mostly separate realities. You can drag text into a virtual terminal from the desktop, or use Edit -> Copy to move text in either direction, but by default moving files and directories between them is impossible — a problem that often requires extra switching between them if you frequently work in both. Dragbox is designed to solve this problem and connect the two interfaces — at least if one of them is GNOME — through what might be described as a combination multiple clipboard and simple file manager.
Running the dragbox
command opens a blank window on the desktop. Dragbox calls each running instance a shelf. If you choose, you can use the option --name name
to name the shelf, which is handy if you plan to use multiple shelves. If you are really organized, you can use --title title
to change the title bar, or add a text string immediately after the shelf’s name that is immediately added to the shelf’s list of clipboard items. Another alternative is to use dragbox -t "string"
to add an item.
However, the real value of Dragbox is its ability to drag and drop files. By highlighting a text string, the name of a directory, or a list of files in the command line, you can drag and copy them directly into Dragbox. From there, you can drop them into an application in the same way that you would from the clipboard.
Dragbox’s default behavior is to make a complete copy of a file you drag from the shelf. However, you also have several alternatives. By right-clicking in the Dragbox window and selecting Preferences from the menu, you can set the program to remove an item from its shelf after you copy it. Press Shift-Ctrl as you drag and you create a symbolic link instead of a complete copy.
Drag and drop in Dragbox also includes several navigation aids. If your keyboard layout or your modifications include an AltGr or super control key, you can press it to drag text from a window without making the window active, a convenient touch that can save you fumbling through a stack of open windows (although exactly how it accomplishes this feat, I’m not sure). Moreover, in the middle of a drag operation, you can hover the mouse cursor over the name of a window in the desktop panel’s window list to display it. In exactly the same way, you can display another workspace by hovering over its name in the workspace switcher.
Going from the command line to the desktop, you can run any command against the contents of the active Dragbox shelf. You can use the --list
option to display a list of shelves currently in use. To get a list of the contents of the current shelf in the command line, you can enter dragbox --get
. By default, the output lists absolute paths, but you can add -u
or --uris
to see the paths as URIs instead. Generally, these options display their output immediately, but, if you prefer, you can use --write-on-exit
to delay the display.
Perhaps Dragbox’s most useful interaction is the ability to run a command against the contents of a shelf by piping it through xargs. For instance, if you wanted to back up the contents of the default shelf, you would use the command dragbox -0 | xargs -0 backupname.tar.gz
to create a tar file. By using Dragbox as an intermediary in this way, you can quickly run a command using files and directories that are visible on the desktop without the trouble of having to remember or locate them on the command line.
Dragbox is only at version 0.3.0, and like any application still in early development, it has some limitations. Although its windows are listed on the panel the same as any open window, it would be less in the way if it were integrated as a drag-down display in the notification tray. A way to add formatted text — perhaps in Open Document Format — to a shelf would have the benefit of making Dragbox a multiple clipboard as well as a bridge between interfaces. The ability to save shelves for future sessions might also come in handy. Another simple enhancement would be to have the ability to click a directory or preview by default, instead of having to enable the option to view directories in a file manager in the preferences listed in the right-click menu. Those of us who regularly run a mixture of applications from different desktops would also appreciate the ability to use Dragbox with KDE or Xfce applications.
Still, these reservations aside, Dragbox is a simple but highly functional application that makes you aware of functionality that you never knew you were missing until you had it. Desktop users may find it a convenient multiple clipboard even if they never go near the command line. And if you are a person who moves regularly between the command line and the desktop, then 15 minutes of using Dragbox will probably be enough to make you wonder how you ever managed without it.
Categories:
- Desktop Software
- Tools & Utilities
- Reviews