Support for non-Ubuntu distributions

Bug #1045284 reported by Garrett
36
This bug affects 7 people
Affects Status Importance Assigned to Milestone
UberWriter (moved to github!)
Confirmed
High
Unassigned

Bug Description

UberWriter looks nice, but it seems to only support Ubuntu.

Please support other distributions.

I tried to get it to work on Fedora with:
1) bzr branch lp:uberwriter
2) python setup.py build
3) sudo python setup.py build

However, when running UberWriter, I get the following:

Traceback (most recent call last):
  File "/usr/bin/uberwriter", line 43, in <module>
    import uberwriter
  File "/usr/lib/python2.7/site-packages/uberwriter/__init__.py", line 25, in <module>
    from uberwriter import UberwriterWindow
  File "/usr/lib/python2.7/site-packages/uberwriter/UberwriterWindow.py", line 22, in <module>
    import apt
ImportError: No module named apt

(Why would a text editor even *need* apt?)

Revision history for this message
Wolf Vollprecht (w-vollprecht) wrote :

Hi Garrett,

now that your saying it its obvious that its a problem for other distros. I used the module apt only to detect if someone already has some sort of texlive installed ... I should add try... except and if statements.

But there are still some more problems when one tries to install from setup.py which I will try to sort out (e.g. GLIB schemes are not getting compiled etc.) So I might need to make some sort of bash script.

If you can offer any help, please feel free to contribute!

Wolf

Changed in uberwriter:
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Remke (r-schuurmans) wrote :

after downloading the latest version using bzr

bzr branch https://bugs.launchpad.net/+branch/uberwriter
~/uberwriter $ python setup.py build

ERROR: Python module gi.repository not found

No module named gi.repository

uberwriter/bin/uberwriter
Traceback (most recent call last):
  File "uberwriter/bin/uberwriter", line 43, in <module>
    import uberwriter
  File "/home/remke/uberwriter/uberwriter/__init__.py", line 23, in <module>
    from gi.repository import Gtk # pylint: disable=E0611
ImportError: No module named gi.repository

Revision history for this message
Wolf Vollprecht (w-vollprecht) wrote :

Hey Remke,

please let me know which distro you are using, so I can check for that for the cross-compatible release I am planning :)

Revision history for this message
Filip Chabik (hadret) wrote :

In an non-Ubuntu distro (Debian if that matter), menu is visible in FullScreen and FullScreen+FocusMode. Would be great to have it hidden properly (:

Revision history for this message
vovkkk (vovkkk) wrote :

> I used the module apt only to detect if someone already has some sort of texlive installed

How about this:

<...>

    latex_engine = ''
    if export_type == "pdf":
        args.append("-o%s.pdf" % basename)
        args.append("--latex-engine=%s" % self.latex_engine)

<...>

def export_as_pdf(self, widget, data=None):
    if self.texlive_installed == False:
        args = [('pdflatex', '-version'), ('xelatex', '-version'), ('lualatex', '-version')]
        for c, o in args:
            inst = True
            try:
                args = (c, o)
                subprocess.Popen(args)
                self.latex_engine = c
                break
            except OSError:
                inst = False

The idea is pretty simple: we just call possible converters (tex to pdf) and if Popen fails it raises OSError which means no such file, i.e. Texlive is not installed or is not in PATH
By default Pandoc uses pdflatex, so it can be actually simplier — without loop, but probably for custom installations (from sources) it might be useful, I'm not sure though.

Note that '-version' option is used just to avoid interactive mode which provided by those tools

I cannot try this on other dists, pity, but on Ubuntu 12.04 with UW from trunk it seems work.

Revision history for this message
andrej (4ndrej) wrote :
Download full text (5.4 KiB)

Hello,
I've got the same problem as @Remke,

I am running Fedora 17 x86-64 with those python3 packages:
python3-libs-3.2.3-7.fc17.x86_64
python3-3.2.3-7.fc17.x86_64
and also bunch of python2 such as
python-distutils-extra-2.33-1.fc17.noarch

I needed to install
yum install intltool python-distutils-extra python3

running
python3 setup.py build fails tragically with rants about 'uberwriter you need https://launchpad.net/python-distutils-extra' which was installed just before the running the script.

running python setup.py builds something with ton of syntax WARNINGs:
$ python ./setup.py build
WARNING: syntax errors in uberwriter/UberwriterAdvancedExportDialog.py: encoding declaration in Unicode string (UberwriterAdvancedExportDialog.py, line 0)
WARNING: syntax errors in uberwriter_lib/Builder.py: encoding declaration in Unicode string (Builder.py, line 0)
WARNING: syntax errors in uberwriter_lib/Window.py: encoding declaration in Unicode string (Window.py, line 0)
WARNING: syntax errors in uberwriter_lib/helpers.py: encoding declaration in Unicode string (helpers.py, line 0)
WARNING: syntax errors in uberwriter/MarkupBuffer.py: encoding declaration in Unicode string (MarkupBuffer.py, line 0)
WARNING: syntax errors in uberwriter_lib/PreferencesDialog.py: encoding declaration in Unicode string (PreferencesDialog.py, line 0)
WARNING: syntax errors in uberwriter_lib/gtkspellcheck/spellcheck.py: encoding declaration in Unicode string (spellcheck.py, line 0)
WARNING: syntax errors in bin/uberwriter: encoding declaration in Unicode string (uberwriter, line 0)
WARNING: syntax errors in uberwriter_lib/LatexToPNG.py: encoding declaration in Unicode string (LatexToPNG.py, line 0)
WARNING: syntax errors in uberwriter_lib/tables.py: encoding declaration in Unicode string (tables.py, line 0)
WARNING: syntax errors in uberwriter_lib/pylocales/locales.py: encoding declaration in Unicode string (locales.py, line 0)
WARNING: syntax errors in uberwriter/UberwriterInlinePreview.py: encoding declaration in Unicode string (UberwriterInlinePreview.py, line 0)
WARNING: syntax errors in bin/uberwriter.py: encoding declaration in Unicode string (uberwriter.py, line 0)
WARNING: syntax errors in uberwriter/__init__.py: encoding declaration in Unicode string (__init__.py, line 0)
WARNING: syntax errors in uberwriter/FormatShortcuts.py: encoding declaration in Unicode string (FormatShortcuts.py, line 0)
WARNING: syntax errors in uberwriter_lib/gtkspellcheck/__init__.py: encoding declaration in Unicode string (__init__.py, line 0)
WARNING: syntax errors in uberwriter/AboutUberwriterDialog.py: encoding declaration in Unicode string (AboutUberwriterDialog.py, line 0)
WARNING: syntax errors in uberwriter_lib/AboutDialog.py: encoding declaration in Unicode string (AboutDialog.py, line 0)
WARNING: syntax errors in uberwriter_lib/uberwriterconfig.py: encoding declaration in Unicode string (uberwriterconfig.py, line 0)
WARNING: syntax errors in uberwriter_lib/__init__.py: encoding declaration in Unicode string (__init__.py, line 0)
WARNING: syntax errors in uberwriter/UberwriterWindow.py: encoding declaration in Unicode string (UberwriterWindow.py, line 0)
WARNING: syntax error...

Read more...

Revision history for this message
andrej (4ndrej) wrote :

Hi again,
I added pygobject[23] and their devel libs too, but it seems that it does not help.
So, here is the list of my py* packages:

$ rpm -qa | grep ^py | sort
pycairo-1.8.10-4.fc17.x86_64
pygobject2-2.28.6-5.fc17.x86_64
pygobject2-codegen-2.28.6-5.fc17.x86_64
pygobject2-devel-2.28.6-5.fc17.x86_64
pygobject2-doc-2.28.6-5.fc17.x86_64
pygobject3-3.2.2-1.fc17.x86_64
pygobject3-devel-3.2.2-1.fc17.x86_64
pygpgme-0.2-2.fc17.x86_64
pygtk2-2.24.0-4.fc17.x86_64
pygtk2-libglade-2.24.0-4.fc17.x86_64
pykickstart-1.99.7-1.fc17.noarch
pyliblzma-0.5.3-6.fc17.x86_64
pyOpenSSL-0.12-2.fc17.x86_64
pyparted-3.8-3.fc17.x86_64
python-2.7.3-7.2.fc17.x86_64
python3-3.2.3-7.fc17.x86_64
python3-libs-3.2.3-7.fc17.x86_64
python-bugzilla-0.6.2-2.fc16.noarch
python-chardet-2.0.1-4.fc17.noarch
python-cups-1.9.61-1.fc17.x86_64
python-decorator-3.3.2-1.fc17.noarch
python-deltarpm-3.6-0.7.20110223git.fc17.x86_64
python-devel-2.7.3-7.2.fc17.x86_64
python-distutils-extra-2.33-1.fc17.noarch
python-ethtool-0.7-3.fc17.x86_64
python-iniparse-0.4-4.fc17.noarch
python-IPy-0.75-2.fc17.noarch
python-iwlib-1.1-2.fc17.x86_64
python-kitchen-1.1.1-1.fc17.noarch
python-libs-2.7.3-7.2.fc17.x86_64
python-magic-5.10-5.fc17.x86_64
python-meh-0.12-1.fc17.noarch
python-nss-0.12-3.fc17.x86_64
python-paste-1.7.5.1-6.20111221hg1498.fc17.noarch
python-pwquality-1.0.0-2.fc17.x86_64
python-pyblock-0.53-2.fc17.x86_64
python-pycurl-7.19.0-10.fc17.x86_64
python-setuptools-0.6.24-2.fc17.noarch
python-simplejson-2.3.0-2.fc17.x86_64
python-slip-0.2.20-2.fc17.noarch
python-slip-dbus-0.2.20-2.fc17.noarch
python-slip-gtk-0.2.20-2.fc17.noarch
python-smbc-1.0.13-1.fc17.x86_64
python-tempita-0.4-8.fc17.noarch
python-urlgrabber-3.9.1-11.fc17.noarch
pyxdg-0.19-4.fc17.noarch

hope this helps.

Revision history for this message
Wolf Vollprecht (w-vollprecht) wrote :

Hi everybody,

Ian Weller was so kind to work on getting it to run under fedora. If you guys would be so kind to take a look at this:

http://ianweller.fedorapeople.org/uberwriter/

A huge thanks here to Ian!

I'll try to maintain this for future versions.

Please report any issues you have.

Wolf

Revision history for this message
Grégoire (gregoire-zjyto) wrote :

I installed uberwriter via the recommended fedora repository (I am using fedora 17) and it seems to work fine except that the window background is not plain white. Instead it displays a striped pattern (see attached screenshot). I tried dark mode and it is the same.

Revision history for this message
Wolf Vollprecht (w-vollprecht) wrote :

Hi Gregoire,

well, it's a «feature».

You can change the background when you replace a certain file... Open Terminal and put in: locate uberwriter

Then you'll see a number of paths showing up. One of those paths is the installation directory (I am not sure which directory, since someone else wrote the installscript for fedora).

Then you can to a folder called «media» and replace background_light.png and background_dark.png with your choice.

For me it's this folder: /opt/extras.ubuntu.com/uberwriter/share/uberwriter/media

Maybe it's in usr/share/uberwriter on fedora.

I plan to make this easier in Uberwriter 2.0 ;)

Cheers,

Wolf

Revision history for this message
Filip Chabik (hadret) wrote :

I'm back to work on Debian port of Uberwriter, however I have two issues. First is following:

hadret@r2-d2 ~ /usr/share/uberwriter/uberwriter/uberwriter
Traceback (most recent call last):
  File "/usr/share/uberwriter/uberwriter/uberwriter", line 47, in <module>
    uberwriter.main()
  File "/usr/share/uberwriter/uberwriter/__init__.py", line 54, in main
    window = UberwriterWindow.UberwriterWindow()
  File "/usr/share/uberwriter/uberwriter_lib/Window.py", line 48, in __new__
    new_object.finish_initializing(builder)
  File "/usr/share/uberwriter/uberwriter/UberwriterWindow.py", line 1033, in finish_initializing
    self.style_provider.load_from_data(css_data)
  File "/usr/lib/python3/dist-packages/gi/types.py", line 47, in function
    return info.invoke(*args, **kwargs)
gi._glib.GError: <unknown>:158:22: 'px' is not a valid color name

This might be related: https://bugs.launchpad.net/ubuntu/+source/gnome-themes-standard/+bug/1052353

Second one -- in uberwriter.desktop there's a following path provided:

/usr/share/uberwriter/uberwriter

Where it either should point to /usr/bin/uberwriter or just uberwriter.

Any suggestions how to handle these? (;

Revision history for this message
rugk (48509946-3) wrote :

BTW I can confirm that the Flatpak works under Fedora 28.

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

Other bug subscribers

Bug attachments

Remote bug watches

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