The Dotfile Generator
The Dotfile Generator, TDG, is a configuration tool that configures programs using X11 widgets like check boxes, entries, pull-down menus, etc. In order for TDG to configure a given program, a module must be built for it. At the moment modules exist for the following programs: bash, fvwm1, fvwm2, emacs, tcsh, rtin and elm.
TDG is freely available and can be downloaded from ftp://ftp.imada.ou.dk/pub/dotfile/dotfile.tar.gz. The home page of the Dotfile Generator is at http://www.imada.ou.dk/~blackie/dotfile/.
The Unix system was developed many years ago, long before graphical user interfaces became commonplace, so that most of the applications today work fine without a graphical user interface. Examples of these applications are editors and shells.
A basic concept in Unix is that the programs are very configurable. For example, in Emacs if the user asks to go to the next line after the end of a file, there are two logical ways for Emacs to handle this situation:
Insert a blank line, and move to it.
Beep, to tell the user that there is no next line.
Instead of implementing only one of the solutions, the people behind Emacs chose to implement both, and let you decide which one you prefer. Since the program works without a GUI, the standard method for configuring such options is to use a dot-file. In this file, you can program the method emacs will use.
This solution requires that the user learn the programming language used in the dot file and read lots of documentation to discover the available configurations. This task can be difficult and tedious, and for that reason many users choose to use the default configuration of the program.
If you take a look at some dot files, you may find that most of the configurations can be described by the following items:
Configurations with two possibilities (like above)
Configuration where the program wishes to know a number or text. Examples of this could be questions like: “How many times should one press ctrl-d to quit?”, and “e-mail address to use in the Reply-to field?”.
Configuration where the user may choose an option from a list, e.g., “Which editor would you like to use: emacs, jed, vi or vim?”
The configurations above can be easily done with a GUI using the following widgets in order: a check box, an entry and a pull down menu. This is exactly the method used in TDG.
TDG is a tool which configures other programs (e.g., Emacs, bash and fvwm) with widgets like those described above and many more. The widgets are placed in groups to make it easy to find the correct configuration without having seen it before. And most important of all, help is located at the configuration of each option instead of in a manual far away. To get help, you just press the right mouse button on the widget that contains the configuration you wish to know more about.
When you start TDG you are offered a list of standard configurations from which you pick one to use as a starting point. This is convenient if you do not have a dot-file for the given program or if you would like to try a new configuration. If, on the other hand, you already have a dot-file that you would like to put the finishing touches on, you can read this file into TDG. Note, however, that not all modules have the capability to read the dot-file (the fvwm2, rtin and elm modules have, the other modules do not, since it is complicated to create such a parser.)
When you have selected a start-up configuration, the menu window is displayed (see Figure 2). In this window, you can travel through the configuration pages in the same way you would through a directory structure. If you select a page, a new window is displayed showing the configuration for this page (see Figure 3). This window is reused for all the configuration pages, i.e., only one configuration page is visible at a time, so you do not have to destroy the window yourself.
The actual configuration is located in region 1 of Figure 3. Region 2 is the help region, and it is in this region that help for the whole page is shown when requested. Help for the individual configuration is also shown here, when the right mouse button is clicked on one of the widgets. In region 3, information is shown on what will be generated. There are three possibilities:
You can generate all pages. This is the most natural thing to do, when you want a configuration for a given program.
You can generate just the page shown. This is useful if you are playing around with TDG to see what will be generated for the different configurations.
Finally, you can tell TDG to generate specific pages using the radio buttons in this region.
In the Setup-Options menu, you can select which of the above three methods to use.
When the configurations are complete, you must tell TDG which file you wish to generate from the Options menu (Setup->Options). Now, it's time to create the actual dot-file by selecting Generate in the File menu.
Once you have generated the dot-file, you may decide to change some of the configuration. If so, go to the configuration page in question, change your configuration and regenerate. If, however, you are testing several different options for a single configuration (i.e., several items from a pull-down menu), you may find it cumbersome to generate the whole module over and over again. In this situation, you can chose Regenerate this page in the File menu. Note that if some part of the configurations on the page affects other pages, these other pages will not be generated unless you regenerate the whole module.
To see how to use the generated dot-file, go to the Help menu, and select “How to use the output”.
|Bitcoin on Amazon! Sort of...||Sep 28, 2016|
|Free Today: September Issue of Linux Journal (Retail value: $5.99)||Sep 27, 2016|
|nginx||Sep 27, 2016|
|Epiq Solutions' Sidekiq M.2||Sep 26, 2016|
|Nativ Disc||Sep 23, 2016|
|Android Browser Security--What You Haven't Been Told||Sep 22, 2016|
- Free Today: September Issue of Linux Journal (Retail value: $5.99)
- Bitcoin on Amazon! Sort of...
- Download "Linux Management with Red Hat Satellite: Measuring Business Impact and ROI"
- Android Browser Security--What You Haven't Been Told
- Nativ Disc
- Epiq Solutions' Sidekiq M.2
- Returning Values from Bash Functions
- Tech Tip: Really Simple HTTP Server with Python
- Identity: Our Last Stand
Pick up any e-commerce web or mobile app today, and you’ll be holding a mashup of interconnected applications and services from a variety of different providers. For instance, when you connect to Amazon’s e-commerce app, cookies, tags and pixels that are monitored by solutions like Exact Target, BazaarVoice, Bing, Shopzilla, Liveramp and Google Tag Manager track every action you take. You’re presented with special offers and coupons based on your viewing and buying patterns. If you find something you want for your birthday, a third party manages your wish list, which you can share through multiple social- media outlets or email to a friend. When you select something to buy, you find yourself presented with similar items as kind suggestions. And when you finally check out, you’re offered the ability to pay with promo codes, gifts cards, PayPal or a variety of credit cards.Get the Guide