Reports can't be generated when mutt is not installed

Bug #248612 reported by Bond
24
This bug affects 2 people
Affects Status Importance Assigned to Milestone
GTimeLog
Confirmed
Medium
Unassigned

Bug Description

When i want to generate a report, a terminalwindow opens and another gtk-window shows the following German errormessage:

"Beim Erzeugen des Kindprozesses für dieses Terminal ist ein Fehler aufgetreten" which means something like:

"Error while generating a childprocess for this terminal"

No Report is generated then.

Revision history for this message
Marius Gedminas (mgedmin) wrote :

This means you don't have mutt installed.

The way GTimeLog implements reports now is:

  (1) it prepares an e-mail message template in a temporary file
  (2) it launches the "mailer" command specified in ~/.gtimelog/gtimelogrc

The default mailer command is

  x-terminal-emulator -e mutt -H %s

which means "open Mutt with this prepared email in a terminal".

What you could do, if you don't want to use Mutt (as a terminal app, it has a fairly steep-ish learning curve), is edit ~/.gtimelog/gtimelogrc and change the mailer setting to something like

  mailer = gedit %s

Then gtimelog (after you restart it) will open its generated reports in a text editor.

Revision history for this message
Marius Gedminas (mgedmin) wrote :

I'd like to make GTimeLog friendlier to users. What should it do about report generation out of the box?

  * Use your GNOME preferred mailer setting?
  * Use your GNOME preferred editor setting?
  * Implement its own report window with Save and/or Email buttons?

On the other hand, I don't have much time for GTimeLog, so help (preferably in the form of patches) would be much appreciated.

Changed in gtimelog:
status: New → Confirmed
Revision history for this message
Bond (ben-jannedy) wrote : Re: [Bug 248612] Re: Reports can't be generated when mutt is not installed

Hi Marius,

thank you very much for your help. I would prefer gtimelog to have it's
own window with "save" and "Email" Buttons. Unfortunately i'm not very
good in programming. I only code a little bit in Perl. So unfortunately
i can' help you there.

But thank you very much for gtimelog since it helps me very much to keep
track of my workday.

CU,

Ben

Marius Gedminas wrote:
> I'd like to make GTimeLog friendlier to users. What should it do about
> report generation out of the box?
>
> * Use your GNOME preferred mailer setting?
> * Use your GNOME preferred editor setting?
> * Implement its own report window with Save and/or Email buttons?
>
> On the other hand, I don't have much time for GTimeLog, so help
> (preferably in the form of patches) would be much appreciated.
>
> ** Changed in: gtimelog
> Status: New => Confirmed
>
>

Changed in gtimelog:
importance: Undecided → High
Revision history for this message
Vojtěch Šalbaba (darktatka) wrote :

It would be enough to just open the report in new text buffer. Maybe I don't want to send it? And how many users have installed mutt anyway? And how much of them are using it as their default mail program?

Revision history for this message
Jon Dowland (jond) wrote :

You can call "gnome-open" with a mailto: URL. So, a script which converted the sample email text file into a URI (encoding etc.) and passed it to gnome-open would be an option. E.g.:

mailto:<email address hidden>?subject=Monthly%20report%20for...&body=urlencoded%20body%20text

Of course, I doubt gnome-open does any conversion between the mailto URI and whatever is accepted by your input client, so this would be a leaky abstraction.

Revision history for this message
Barry Warsaw (barry) wrote :

The current way of doing it doesn't play too nicely with my mailer (Claws), but I think Jon's solution in #5 is probably the way to go. FWIW, I never mail reports anymore so I have low motivation to implement this. I'd be happy to review and sponsor a branch though.

Changed in gtimelog:
importance: High → Medium
Revision history for this message
ijk (ijk) wrote :

xdg-email replaces gnome-open

Revision history for this message
jack_spratt (jack-spratt) wrote :

This is a big issue. Currently generating reports is counter-intuitive - it relies on a 3rd party app dependency. Please make it clearer that mutt is required, and that this can be changed in the config file.

Please also add documentation of variables which can be passed to the mailer app, ideally in comments within the rc config file. If I want to use Kmail as my mailer, for instance, then I want to be able to specify the subject and recipient as separate command line options. I cannot find the variables to use (other than %s), and I'm not sure if any others exist.

Revision history for this message
Alan Ennis (alanennis) wrote :

Changing the config file to

mailer = gedit %s

as per Marius's comment in #1 works just fine and allows me to revew before I paste into an email.
Not many people with Mutt installed these days I would imagine.

I would second the request for the command line options to be detailed somewhere, just in case there are some other usefull ones :)

Thank you..

Alan
Ireland/Dublin.

Revision history for this message
Marius Gedminas (mgedmin) wrote :

> I would second the request for the command line options to be detailed somewhere, just in case there are some other usefull ones :)

    $ gtimelog --help
    Usage: gtimelog [options]

    Options:
      --version show program's version number and exit
      -h, --help show this help message and exit
      --tray start minimized
      --sample-config write a sample configuration file to 'gtimelogrc.sample'

      Single-Instance Options:
        --replace replace the already running GTimeLog instance
        --quit tell an already-running GTimeLog instance to quit
        --toggle show/hide the GTimeLog window if already running
        --ignore-dbus do not check if GTimeLog is already running (allows you to
                        have multiple instances running)

      Debugging Options:
        --debug show debug information
        --prefer-pygtk try to use the (obsolete) pygtk library instead of pygi

Now that I know about rst2man (http://docutils.sourceforge.net/sandbox/manpage-writer/rst2man.txt), I intend to write a manual page a bit more complete than the one Gustavo Franco contributed a long time ago.

Revision history for this message
Sam Roberts (vieuxtech) wrote :

Easiest and most friendly thing is to remove the assumption that reports are emailed. I have both editor and mailer set as:

```
editor = xdg-open "%s"
mailer = xdg-open "%s"
```

This ends up calling mouse pad, it seems, on xubuntu, which works fine for me. I suspect it would be some gtk equivalent on normal ubuntu, and perhaps kate on kubuntu.

I just look at the reports and close them, usually. And if I did want them to go in my mailer, then I could always change the configuration, or paste them in.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.