Next Previous Contents

2. Configuration

2.1 Is it possible to set my ``From:'' header line for postings?

On (properly configured) Unix-like systems, slrn should be able to determine a valid ``From:'' header line itself. However, you can also set one explicitly using the following variables in your slrnrc file:

        set realname "Your Real Name"
        set username "username"
        set hostname "your.host.name"

This will cause slrn to generate a ``From:'' header line of the form:

        From: Your Real Name <username@your.host.name>

Note: It is possible that your system administrator disabled this feature to make sure everybody uses his or her correct name and address when posting. To find out whether this is the case, type slrn --version and look for strict_from in the feature list. If it is enabled (indicated by a plus sign), you cannot set your ``From:'' header line yourself.

2.2 How can I set my ``Message-ID:'' header?

First of all, slrn will only attempt to create the ``Message-ID:'' header line if it was not compiled with the --disable-gen-mid option (check gen_msgid in the output of slrn --version) and the generate_message_id config variable has not been set to ``0''.

To create a valid Message-ID, slrn needs to know the fully qualified domain name (FQDN) of the host it is running on. In most cases, slrn can find it by querying the system. In case this does not work properly, you can alternatively set the domain (right-hand) part of your Message-IDs via the posting_host command. If you think you need this feature, please read the corresponding entry in the reference manual carefully.

Note: Some Linux distributions (e.g. Ubuntu) do not provide the option of giving the system a fully qualified domain name during installation. This can be fixed by editing the /etc/hosts file. E.g.,

Before:

        127.0.0.1       localhost
        127.0.1.1       desktop

After:

        127.0.0.1       localhost
        127.0.1.1       desktop.your.domain     desktop

2.3 How can I set the size of the article pager?

Unless you ``zoom'' the article pager (using ``z''), slrn will split the screen and display some article headers at the top. By default, it gives about 75% of the lines to the article pager, but leaves at least four lines for the header overview. At runtime, you can change this using enlarge_article_window (bound to ``^'') and shrink_article_window (bound to ``CTRL-^'').

There is no config variable you could use to make permanent changes to this; fortunately, it is very easy to set it using a simple S-Lang macro. For example:


        define set_size_of_article_pager ()
        {
           set_article_window_size (int(SCREEN_HEIGHT*0.8));
        }
        !if (register_hook ("resize_screen_hook", "set_size_of_article_pager"))
          message ("Warning: Could not register set_size_of_article_pager" +
          " for resize_screen_hook");

would give about 80% of the screen to the pager. If you want the header overview to have a fixed size, you can use an argument like SCREEN_HEIGHT-10 instead, which would make it six lines high (after the command, the article pager has SCREEN_HEIGHT-10 lines; four lines are used by status bars).

2.4 What charset settings should I use under Windows?

As on any other operating system, this depends on the character set your terminal uses. When using slrn on Windows, two problems connected with character sets frequently appear:

  1. The terminal may not use the character set used in the Usenet articles you are trying to read. In this case, you depend on slrn to convert between the two character sets to display certain (8bit) characters correctly. You can enable this by setting the config command charset to use the appropriate value (all supported character sets are listed in the reference manual), for example:
            charset display "ibm850"
    
  2. Your editor may use a different character set than your terminal. This is often the case with GUI editors that have their own window, e.g. gvim. In this case, you may want slrn to convert character sets when displaying messages, but not when calling the editor on them, so you should put a line like this into your slrnrc file:
            charset editor "utf-8"
    
  3. To enable utf-8 display for slrn in windows you need at least slang 2.1.4. You'll have to change the font in the console to a TrueType font which is capable of displaying utf-8 characters. To active slrn utf-8 mode you'll have to type one of the following commands in the console:
            chcp 65001
            set LANG=en_US.UTF-8
    

2.5 How can I use an external e-mail program for replies?

You can use the config variable mail_editor_command for this. The following example will use mutt as an external e-mail program for replies:

        set mail_editor_command "/usr/bin/mutt -H '%s'"
        set mail_editor_is_mua 1

Setting mail_editor_is_mua to 1 tells slrn not to try and send any e-mail, because the external program used as the e-mail editor will handle this itself.

2.6 The thread tree is not drawn properly. Why?

There are a couple of reasons for this. The most simple may be that the font that you are using does not support line drawing characters. Simply switching fonts to a dec-vt220 compatible font may solve the problem. This is usually the case with Windows telnet applications.

If you see strings like ``mq>'' or ``tq>'' instead of a thread tree make sure that your terminal or terminal emulator supports vt100 escape sequences. This is the case for most emulators like the Linux console, NetBSD's wscons, xterm, rxvt and others. Set the TERM environment variable to vt100 and start slrn to see if the thread is drawn correctly. If this isn't the case, you have to fix your termcap/terminfo file. For termcap based systems, the ``ac'', ``as'' and ``ae'' capabilities have to be set correctly. On terminfo based systems, the ``acsc'', ``smacs'' and ``rmacs'' capabilities need adjustment.

If you can't solve the problem that way because your terminal setup or your terminal emulator is severely broken, consider setting

        set simulate_graphic_chars 1

in your slrnrc file. It restricts slrn to plain ASCII characters for drawing the tree.

A major drawback of the vt100 solution is, that vt100 terminals can't display colors. Since most terminal emulators support ANSI colors, you could start slrn with the ``-C'' command line switch or use the following configuration command to force the use of colors:

        set use_color 1

But if you want to use colors with other programs as well, you need a real solution to this problem. Try the following:

Find a $TERM setting that supports line drawing characters like the vt100 or vt220. Then create a new termcap entry based on that terminal with additional color capabilities and save it to ~/.termcap. It might look like this:

        myterm:\
          :Co#8:NC#3:pa#64:\
          :AB=\E[4%dm:AF=\E[3%dm:op=\E[m:\
          :mb=\E[5m:md=\E[1m:me=\E[0m:mk=\E[8m:mr=\E[7m:\
          :cl=\E[H\E[J:vi=\E[?25l:ve=\E[?25h:\
          :tc=vt100:

On some systems, you can then set $TERM to 'myterm' and the settings apply. On others, you need to do something like this:

        TERMCAP=$HOME/.termcap
        export TERMCAP
        eval `tset -s myterm`

2.7 Can I use the mouse with slrn?

xterm (and some compatible terminal emulation programs) have a feature called ``mouse reporting'' that slrn can turn on to support using the mouse. To enable this whenever the terminal offers it, put

        set mouse 1

into your slrnrc file. To force the mouse to be used, startup slrn using the -m command line option - of course, this will not have the desired effect if your terminal really does not have this feature ;-)

If you want to know what exactly you can do with the mouse, please see the entry on the variable mouse in the reference manual.

2.8 How can I rotate signatures in slrn?

There are different ways to do this - chose one:

The easiest way is probably to call a sig rotation program in the post_editor_command in your slrnrc file. In the following example, the program fortune is called and its output gets written to ~/.signature. After that, the editor jed is called:

        set post_editor_command "fortune -s > ~/.signature; jed '%s' -g %d -tmp"

If you want to chose the signature depending on the group you are posting to, you can set the config variable signature using a macro; in the following example, .signature.german gets selected for all newsgroups in de.* and .signature.english gets selected for any other group. Call this macro from post_hook and article_mode_hook to switch the signature automatically.


        define set_signature ()
        {
          variable signature_file = ".signature.english";
          if (0 == strncmp (current_newsgroup(), "de.", 3))
            signature_file = ".signature.german";
          set_string_variable ("signature", signature_file);
        }

If you want more sophisticated per-group settings, we recommend the macro identity.sl from Emanuele Bassi's slrn page: <http://www.emmanuelebassi.net/slrn/>.

Note: slrn itself does not have an option to execute a program and use its output as the signature. Such an option would require piping, which is not available on all platforms. If you're on a Unix-like system and still want to use pipes, you can make ~/.signature a named pipe and attach a daemon sig randomizer to it. Various programs that do this are available on the net - one example is the program autosig.


Next Previous Contents