Trelby on Ubuntu 16.04 – 18.04

Anyone interested in screenplay writing who tries to install Trelby on Ubuntu will be in for disappointment. Using the software installer, the button clicks, an orange progress bar begins, then… nothing.

Luckily, there is a (relatively) easy fix. Do this:

1) download the .tar file from the Trelby website: Trelby Download Page
2) unpack the files in the .deb file:

  • dpkg-deb -xv trelby_2.2_all.deb opt/

3) install python-lxml python-wxgtk3.0 in Terminal

  • sudo apt install python-lxml python-wxgtk3.0

4) edit opt/trelby/src/cfgdlg.py:

  • replace: gsizer = wx.FlexGridSizer(2, 2, 5, 0)
  • with: gsizer = wx.FlexGridSizer(0, 2, 5, 0)

5) edit opt/trelby/src/config.py:

  • remove this line: nfi.SetEncoding(wx.FONTENCODING_ISO8859_1)

6) edit opt/trelby/src/trelby.py:

  • replace: if (wx.MAJOR_VERSION != 2) or (wx.MINOR_VERSION != 8):
  • with: if (wx.MAJOR_VERSION != 3) or (wx.MINOR_VERSION != 0):
  • replace: "program needs version 2.8." %
  • with: "program needs version 3.0." %

7) copy to /opt:

  • cd opt
  • sudo cp -r trelby/ /opt/

8) move the desktop file so you can open the program:

  • sudo mv opt/trelby/trelby.desktop /usr/share/applications/

You should now be able to load Trelby using the Dash menu, opened by clicking on the Ubuntu Launcher. Happy screenwriting!

2 thoughts on “Trelby on Ubuntu 16.04 – 18.04

  1. How do you edit the file as described in step 4:

    4) edit opt/trelby/src/cfgdlg.py:

    replace: gsizer = wx.FlexGridSizer(2, 2, 5, 0)
    with: gsizer = wx.FlexGridSizer(0, 2, 5, 0)

    I admit to being a Linux newbie, although I’ve done computer stuff for years. Do you somehow open it in the command line, or do I have to install some kind of code editing program? Also, when I look in the /opt directory there is no trelby file there, after doing the steps 1, 2 and 3. It was apparently never copied to that directory after step 3. I’m using Xubuntu on a Mac Mini. Here’s the installation files so far:

    msgeek@Navi2:~$ dpkg-deb -xv /home/msgeek/Desktop/trelby_2.2_all.deb opt/
    ./
    ./usr/
    ./usr/share/
    ./usr/share/doc/
    ./usr/share/doc/trelby/
    ./usr/share/doc/trelby/copyright
    ./usr/share/doc/trelby/changelog.gz
    ./usr/share/applications/
    ./usr/share/applications/trelby.desktop
    ./usr/share/trelby/
    ./opt/
    ./opt/trelby/
    ./opt/trelby/src/
    ./opt/trelby/src/splash.py
    ./opt/trelby/src/util.py
    ./opt/trelby/src/mypager.py
    ./opt/trelby/src/autocompletion.py
    ./opt/trelby/src/fontinfo.py
    ./opt/trelby/src/characterreport.py
    ./opt/trelby/src/viewmode.py
    ./opt/trelby/src/dialoguechart.py
    ./opt/trelby/src/screenplay.py
    ./opt/trelby/src/namesdlg.py
    ./opt/trelby/src/locationsdlg.py
    ./opt/trelby/src/headers.py
    ./opt/trelby/src/__init__.py
    ./opt/trelby/src/undo.py
    ./opt/trelby/src/headersdlg.py
    ./opt/trelby/src/locationreport.py
    ./opt/trelby/src/locations.py
    ./opt/trelby/src/pdf.py
    ./opt/trelby/src/namearray.py
    ./opt/trelby/src/spellcheck.py
    ./opt/trelby/src/commandsdlg.py
    ./opt/trelby/src/truetype.py
    ./opt/trelby/src/scriptreport.py
    ./opt/trelby/src/spellcheckdlg.py
    ./opt/trelby/src/myimport.py
    ./opt/trelby/src/trelby.py
    ./opt/trelby/src/cfgdlg.py
    ./opt/trelby/src/finddlg.py
    ./opt/trelby/src/gutil.py
    ./opt/trelby/src/opts.py
    ./opt/trelby/src/misc.py
    ./opt/trelby/src/scenereport.py
    ./opt/trelby/src/charmapdlg.py
    ./opt/trelby/src/spellcheckcfgdlg.py
    ./opt/trelby/src/mypickle.py
    ./opt/trelby/src/autocompletiondlg.py
    ./opt/trelby/src/error.py
    ./opt/trelby/src/config.py
    ./opt/trelby/src/pml.py
    ./opt/trelby/src/titles.py
    ./opt/trelby/src/watermarkdlg.py
    ./opt/trelby/src/titlesdlg.py
    ./opt/trelby/fileformat.txt
    ./opt/trelby/resources/
    ./opt/trelby/resources/icon256.png
    ./opt/trelby/resources/undo.png
    ./opt/trelby/resources/icon16.png
    ./opt/trelby/resources/find.png
    ./opt/trelby/resources/new.png
    ./opt/trelby/resources/icon64.png
    ./opt/trelby/resources/scrset.png
    ./opt/trelby/resources/icon32.png
    ./opt/trelby/resources/settings.png
    ./opt/trelby/resources/layout.png
    ./opt/trelby/resources/report.png
    ./opt/trelby/resources/save.png
    ./opt/trelby/resources/README
    ./opt/trelby/resources/fullscreen.png
    ./opt/trelby/resources/tools.png
    ./opt/trelby/resources/open.png
    ./opt/trelby/resources/quotes.txt
    ./opt/trelby/resources/logo.jpg
    ./opt/trelby/resources/pdf.png
    ./opt/trelby/resources/saveas.png
    ./opt/trelby/resources/redo.png
    ./opt/trelby/resources/import.png
    ./opt/trelby/resources/close.png
    ./opt/trelby/resources/icon128.png
    ./opt/trelby/resources/export.png
    ./opt/trelby/names.txt.gz
    ./opt/trelby/manual.html
    ./opt/trelby/dict_en.dat.gz
    ./opt/trelby/trelby.desktop
    ./opt/trelby/README
    ./opt/trelby/LICENSE
    ./opt/trelby/sample.trelby
    ./usr/share/trelby/manual.html
    msgeek@Navi2:~$ sudo apt install python-lxml python-wxgtk3.0
    [sudo] password for msgeek:
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    python-lxml is already the newest version (3.5.0-1build1).
    python-lxml set to manually installed.
    python-wxgtk3.0 is already the newest version (3.0.2.0+dfsg-1build1).
    python-wxgtk3.0 set to manually installed.
    The following packages were automatically installed and are no longer required:
    fonts-sil-gentium fonts-sil-gentium-basic libfreehand-0.1-1
    libhsqldb1.8.0-java libllvm4.0 libllvm5.0 libmspub-0.1-1 libpagemaker-0.0-0
    libreoffice-java-common libservlet3.1-java tabix
    Use ‘sudo apt autoremove’ to remove them.
    0 upgraded, 0 newly installed, 0 to remove and 34 not upgraded.
    msgeek@Navi2:~$

    So where do I go from here? Thanks for any help you can provide.

    1. Hey Thomas.
      You can edit the file using the command line built-in editor vi — or just open the file with an ASCII text editor. There is no file called trelby. The steps are referring to the trelby directory (ie: opt/trelby/). So the file you want to edit can be found at opt/trelby/src/cfgdlg.py…

      Let me know if you need more info,

      Ron

Leave a Reply

Your email address will not be published. Required fields are marked *