[Blink] Blink looks for uis in wrong path

Dan Pascu dan at ag-projects.com
Thu Jun 8 15:08:10 CEST 2017

Blink uses the following logic:

Takes the path of the binary and extract the directory component. If the directory ends with /bin it strips /bin from it. It then takes this directory as a base path and looks if either the resources/ directory or the share/blink directory is present as a subdirectory and uses whichever is present.

With this the software can run both standalone in a directory (you just download the software, put it in a directory and run it from there) or installed system wide (for example in /usr or /usr/local) and even supports multiple versions of blink installed in different system paths (like a stable version in /usr and an experimental version in /usr/local) and they can run independently without conflicting.

In the system wide installation case if the binary is in /usr/bin/blink then it will look for the resources in /usr/share/blink

In your case I guess the binary script is either placed in /usr/lib64/python-exec/python2.7/bin/blink and that path in in your $PATH or it is placed at that location and /usr/bin/blink is a symlink to that location.

Possible solutions:

1. put resources in /usr/lib64/python-exec/python2.7/usr/share/blink
2. make /usr/bin/blink the real script not a symlink
3. make /usr/bin/blink a hard link to /usr/lib64/python-exec/python2.7/bin/blink

On 7 Jun 2017, at 22:37, José Ramón Muñoz Pekkarinen wrote:

>     Hi,
>     Doing some experiments with gentoo ebuilds I got a working installing blink-3.0.3 ebuild.
> When I execute blink, an error looking for the uis in the wrong place shows up:
> $ blink
> Traceback (most recent call last):
>   File "/usr/lib/python-exec/python2.7/blink", line 67, in <module>
>     from blink import Blink
>   File "/usr/lib64/python2.7/site-packages/blink/__init__.py", line 31, in <module>
>     from blink.chatwindow import ChatWindow
>   File "/usr/lib64/python2.7/site-packages/blink/chatwindow.py", line 39, in <module>
>     from blink.contacts import URIUtils
>   File "/usr/lib64/python2.7/site-packages/blink/contacts.py", line 48, in <module>
>     from blink.sessions import SessionManager, StreamDescription
>   File "/usr/lib64/python2.7/site-packages/blink/sessions.py", line 48, in <module>
>     from blink.screensharing import ScreensharingWindow, VNCClient, ServerDefault
>   File "/usr/lib64/python2.7/site-packages/blink/screensharing/__init__.py", line 3, in <module>
>     from blink.screensharing.vncviewer import ScreensharingWindow, VNCViewer
>   File "/usr/lib64/python2.7/site-packages/blink/screensharing/vncviewer.py", line 387, in <module>
>     ui_class, base_class = uic.loadUiType(Resources.get('screensharing_dialog.ui'))
>   File "/usr/lib64/python2.7/site-packages/PyQt5/uic/__init__.py", line 198, in loadUiType
>     winfo = compiler.UICompiler().compileUi(uifile, code_string, from_imports, resource_suffix, import_from)
>   File "/usr/lib64/python2.7/site-packages/PyQt5/uic/Compiler/compiler.py", line 110, in compileUi
>     w = self.parse(input_stream, resource_suffix)
>   File "/usr/lib64/python2.7/site-packages/PyQt5/uic/uiparser.py", line 1002, in parse
>     document = parse(filename)
>   File "/usr/lib64/python2.7/xml/etree/ElementTree.py", line 1182, in parse
>     tree.parse(source, parser)
>   File "/usr/lib64/python2.7/xml/etree/ElementTree.py", line 647, in parse
>     source = open(source, "rb")
> IOError: [Errno 2] No such file or directory: u'/usr/lib64/python-exec/python2.7/share/blink/screensharing_dialog.ui'
>    The uis are properly installed in /usr/share/blink:
> $ ls /usr/share/blink
> about_panel.ui         blink.ui            chat_widget.ui        contact_group.ui        icons                            otr_widget.ui            screensharing_toolbox.ui  tls
> add_account.ui         chat                chat_window.ui        contact.ui              incoming_calltransfer_dialog.ui  pending_watcher.ui       screensharing_window.ui   video_widget.ui
> audio_session_drag.ui  chat_input_lock.ui  conference_dialog.ui  filetransfer_item.ui    incoming_dialog.ui               preferences.ui           server_tools.ui           zrtp_widget.ui
> audio_session.ui       chat_session.ui     contact_editor.ui     filetransfer_window.ui  incoming_filetransfer_dialog.ui  screensharing_dialog.ui  sounds
>     Is there any way to tell blink where to look for them? Or is this something I should modify on the ebuild to
> install uis in /usr/lib64/python-exec/python2.7/share/blink?
>     Thanks!
>     José
> _______________________________________________
> Blink mailing list
> Blink at lists.ag-projects.com
> http://lists.ag-projects.com/mailman/listinfo/blink


More information about the Blink mailing list