Jump to content


Member Since 11 Apr 2011
Offline Last Active Today, 09:35 AM

Topics I've Started

e21 and e21 modules

24 June 2017 - 10:36 PM

About a week ago BeGo noticed Bodhi now has e21 in our testing repo. Jeff made the e21 deb files and I don't think that was even announced on our forums. I knew myself for he had told me.


But anyway the other day Jeff said, he had tried e21 out and had no major issues, but missed Bodhi Modules. So I am starting this thread to announce e21 modules I have added to our testing repo. Today, i fixed the version of forecast in enlightenment git (it had 3 issues I knew about) as well as ported the Bodhi's screenshot module to e21.


All modules I add will be prefixed by e21 and hence can be found at http://packages.bodh...ol/b4testing/e/.


Hopefully there will be no issues but if there is an issue with a given module start a separate thread here in testing explaining the issue. 

apt update in testing

04 June 2017 - 04:44 PM

I updated apt and related packages in testing to Ubuntu's version 1.2.20 (Bodhi version 2.2.20).


This is to address an issue I found while working on ePads font selection dialog. The previous version of apt was broken and failed to install certain packages, namely  ttf-mscorefonts.


If you have the testing repo in your sources.list file then to update to the new apt simply:

sudo apt-get update
sudo apt-get upgrade

If you don't have nor want the testing repo you can manually update to the latest apt by downloading the following packages for the version of Bodhi you have installed (32 bit or 64 bit):


  • apt 
  • apt-utils 
  • apt-transport-https
  • libapt-inst2.0 
  • libapt-pkg5.0 

It is easier to download them or move them to their own folder, say ~/apt


Then to install :

cd ~/apt
sudo dpkg -i *

Hopefully there are no issues but if there are report here. Thanks  B)

ePad 0.9.6 in Testing

27 May 2017 - 04:48 PM

I have placed a new version of ePad in the testing branch for users to try.  To install:
If you have the testing branch enabled either simple update and upgrade your system:
sudo apt-get update
sudo apt-get upgrade
or update epad directly:
sudo apt-get install epad
If you would rather not enable the testing repo, you can download and install the needed deb files:Several new features have been added to ePad.
Most noteworthy is support for fonts. Regular readers of this forum may recall my tale of yak-shaving, bugs and general frustration in the post i386 python-efl docs, wrong symlink _gv.i686-linux-gnu.so. It should be noted this tale of yak-shaving has continued as I have found a total of at least 6 bugs. Two in py-efl, three in ubuntu packages and one in bodhi packages. As well as some weirdnesses and oddities and maybe bugs in EFL itself :(
Regardless of all that epad 0.2.6 adds the font-selection dialog mentioned in that post to ePad. 
Two other features have also been added to ePad:
  • Word wrap has been partially restored.
  • ePad options are stored in a configuration file.
At one point ePad supported word wrap but it was removed due to a coding conflict with line numbers. I have restored word wrap but have taking Jeffs advice to only allow word wrap in cases where line numbers are not enabled.
ePad configuration options are now stored in a json file located by default at ~/.config/epad/epad.json.  ePad does support the $XDG_CONFIG_HOME environmental variable so this location can be changed (see the freedesktop.org page on XDG Base Directory Specifications).
This file will be created with default values if it does not exist and it should be noted that it is NOT validated to ensure reasonable values exists. For the moment and maybe permanently ePad developers (mainly Jeff and me) are taking the view ePad should be as simple as possible and data validation here is unnecessary. If you bork this file by editing it or if becomes somehow corrupt and ePad fails to load or function correctly simple delete it. You will find several options in this file not changeable in ePad itself and one option not implemented yet. Since ePad is under heavy development options available here or this file structure may change in future releases. For the moment I am not going to explain all possible options.
For users willing to seriously test this new package I will later post on the kinds of bugs and issues I wish to be informed of or that I expect. I do expect there to be some bugs or oddities as EFL  itself has some oddities dealing with fonts, my code for this is a tangled up mess I plan on rewriting, and more importantly these are some major changes and I haven't had the time to fully test them all.
But note: please report bugs here and not on github as I have not committed the code changes reflected in epad 0.2.6 or in python-elm-extensions 0.2.1 to github. The reason being my code is a mess and I plan on refactoring it all now that I have a better idea of what I need.
Mandatory screenshots:



esudo locale issues

05 May 2017 - 02:09 PM

It has been reported multiple times that esudo fails to work correctly with some or all non-english locales. Hopefully this has been fixed with my latest commit on github. I only briefly tested the fix so I am adding it to Bodhi's testing repo. Previous users who have had this issue please install this version and report back here if this resolves your issue. 

i386 python-efl docs, wrong symlink _gv.i686-linux-gnu.so

01 April 2017 - 06:28 PM

Yak-shaving seems to be the story of my life when programming. 


So to summarize my original problem was to code a font-selection dialog in py-efl as fully functional as the gtk or other toolkit versions complete with a  font style setting. Sounds simple enough and a little research revealed I should have access to the style information of a font using the py-efl function:  elementary.font_properties_get. After all enventor does the same thing using the c function: elm_font_properties_get. In a perfect world the python version of the function would function exactly like the C version. 
Well no such luck :(  A little testing and all attempts to use  efl.elementary.font_properties_get() resulted in an error similar to one below:

Traceback (most recent call last):
  File "efl/evas/efl.evas_object_smart.pxi", line 446, in efl.evas._smart_callback (efl/evas/efl.evas.c:78724)
  File "font.py", line 164, in font_demo_set
    print elementary.font_properties_get("Liberation Sans Narrow:style=Bold Italic")
  File "efl/elementary/__init__.pyx", line 1037, in efl.elementary.__init__.font_properties_get (efl/elementary/__init__.c:17689)
TypeError: efl.elementary.__init__.FontProperties.__new__(): not enough arguments

This led naturally to me looking thru the Source code for py-efl itself. Didn't help much probably because I am not that familiar with the cython stuff that implements py-efl. So I rewrote my tests in C and low and behold it worked fine. The mystery deepens and a couple of hours had passed completely unproductive. Now I usually am not the sort to ask anyone  for help but considering I do know Kai Huuhko pretty well and he works on py-efl and is a Bodhi team member I ask him on FB about how to use this function. After explaining the error and what I was attempting to do, his response:

Oh there's a bug there
Should have the object type as arg for __new__
I'd better get a working env setup then so I can fix it :)
Yeah it didn't have tests written for it and no one needed it, so it's been just sitting there for years with that issue you just found

And fix it he did, in of course py-efl git. I suppose it pays to have friends that are e-devs. Much thanks Kai :D
Now this explains my difficulty three or four years ago getting a py-efl font-selection dialog implemented and may in fact be one of the reasons  tbradbeer gave up work on eText.
But nonetheless this led to my next problem I had to compile and install EFL from git and py-efl also from git to test Kai's fix. Fortunately I keep some VMs around for such tasks and have one with Bodhi4.x installed, moksha stripped out and EFL and e21 compiled from git already created. I fired it up and installed the latest py-efl and in my brief test it seems efl.elementary.font_properties_get functioned correctly. 
After testing the font_properties function I decide to go ahead and create the Docs for py-efl as I had already went thru the build process and assuming i have the needed packages installed it should  be a simple:

python setup.py build_doc

Plus I like having the docs around as it is a fairly common occurrence for the enlightenment documentation online to be down. Of course the documentation is in the source files BUT that is not nearly as nice as having it in HTML or similar format.
Well the documentation built but sadly it lacked the inheritance and other diagrams, wtf :( 
So I re-examined the dependencies needed and took another look the at the README and INSTALL files in py-efl to no avail. Googled the issue again with no results. 
Now for the record and for the google juice this problem had became the fact the python-efl documents fail to build correctly on bodhi 4.x so we may as well say python-efl documents fail to build correctly on Ubuntu 16.04,  xenial.


bodhi@bodhi-VirtualBox:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Bodhi Linux
Release: 16.04
Codename: xenial

All needed packages seem installed:

bodhi@bodhi-VirtualBox:~$ dpkg -l | grep graphviz
ii  graphviz                            2.38.0-12ubuntu2.1                       i386         rich set of graph drawing tools
ii  libgv-python                        2.38.0-12ubuntu2.1                       i386         Python bindings for graphviz
ii  python-pygraphviz                   1.3.1-0ubuntu2                           i386         Python interface to the Graphviz graph layout and visualization package

Note one thing this is a 386 virtual image that is is to say I installed 32 bit Bodhi/ubuntu in my Virtual machine.
So after more research I end up taking a look at the python-efl/doc/config.py file, since I read:

Besides using raster images (PNG, JPG, etc.), diagrams can be included with the `sphinx.ext.graphviz`_ extension.
Graphviz_ is an open source graph visualisation software. Graph visualisation is a way of representing structural information as diagrams of abstract graphs and networks.
It must be installed before the extension can be used.
Including the extension in the project configuration file
The Graphviz extension is included with Sphinx, but the extension must be enabled in the conf.py file:


In said file I find the code:

# -- Inheritance Diagram ------------------------------------------------------

    import gv
except ImportError:

Hmm inheritance diagrams will not be created if python is unable to import the gv module. Maybe that is the problem so i opened a terminal and :

bodhi@bodhi-VirtualBox:~$ python
Python 2.7.12 (default, Nov 19 2016, 06:48:10) 
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import gv
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/gv.py", line 28, in <module>
    _gv = swig_import_helper()
  File "/usr/lib/python2.7/dist-packages/gv.py", line 20, in swig_import_helper
    import _gv
ImportError: No module named _gv

 Yep module gv fails to load even tho libgv-python SHOULD install it: No module named _gv.


 Further examination reveals:

bodhi@bodhi-VirtualBox:~$ dpkg-query -L libgv-python 

Now I have no idea what you gather from that but after a few moments of looking at it it looked fishy to me. Notice libgv_python27.i386-linux-gnu.so and _gv.i686-linux-gnu.so. Why the mismatch and why does it seem I have a 686 file stuck in here. As noted above this is a 32 bit install. Another WTF moment.
Indeed _gv.i686-linux-gnu.so is a link to a non-existent file :(

bodhi@bodhi-VirtualBox:~$ cd /usr/lib/python2.7/dist-packages/
bodhi@bodhi-VirtualBox:/usr/lib/python2.7/dist-packages$ ls -l *gv*so
lrwxrwxrwx 1 root root    32 Jan  5 16:17 _gv.i686-linux-gnu.so -> libgv_python27.i686-linux-gnu.so
-rw-r--r-- 1 root root 93880 Jan  5 16:17 libgv_python27.i386-linux-gnu.so


Shown perhaps more clearly in pcmanfm:


Well fortunately, this is not the first time I have saw broken links or problems like this. To fix the issue:

bodhi@bodhi-VirtualBox:/usr/lib/python2.7/dist-packages$ sudo ln -s libgv_python27.i386-linux-gnu.so _gv.i386-linux-gnu.so 

And verification:

bodhi@bodhi-VirtualBox:/usr/lib/python2.7/dist-packages$ python
Python 2.7.12 (default, Nov 19 2016, 06:48:10) 
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import gv

Now cding to the right location and:

python setup.py build_doc

Works as expected and builds the documents complete with diagrams :D

It should be noted about half way thru this meandering debugging I finally had enough to google and found that this issue with building python-efl docs is the 386 version of a reported Ubuntu/Launchpad bug: libgv-python: wrong symlink from _gv.x86_64-linux-gnu.so.
Sounds simple enough and after the fact it usually does but this tale illustrates what i mean by yak shaving as well as why seemingly simple things seem to take so long for me. Now gotta get back to my font selection dialog which is what brought all this up in the first place  B)  B)




For the record I have reported this issue upstream: LP: 1678532