karas84 / viberwrapper-indicator

Wrapper Indicator for Viber Icon for Ubuntu 14.04
GNU General Public License v2.0
22 stars 5 forks source link

Cannot start on Ubuntu 14.04 #1

Closed kpuljek closed 9 years ago

kpuljek commented 9 years ago

Hi!

I've tried searching online, but nobody seems to get this message.

The viberwrapper-indicator won't start with this terminal output:

Exception in thread Thread-1: Traceback (most recent call last): File "/usr/lib/python2.7/threading.py", line 810, in bootstrap_inner self.run() File "/usr/bin/viberwrapper-indicator", line 330, in run sp_viber = subprocess.Popen([self.viber_path], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE) File "/usr/lib/python2.7/subprocess.py", line 710, in __init errread, errwrite) File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory

<class 'Xlib.protocol.request.QueryExtension'>

Any ideas? Thank you! Kristijan

karas84 commented 9 years ago

Are you using an edited version of the file perhaps? That line (330) does not match with mine. Anyway the only think I can think of (looking at that "No such file or directory") is that it does not find viber on the predefined path ('/opt/viber/Viber'). Do you have viber installed? Is it installed in that path?

kpuljek commented 9 years ago

I installed it from the ppa:nilarimogard/webupd8 ppa as is, so perhaps that is the issue. I have assumed it's the same version as the one provided here, but maybe I'm wrong and there are indeed some modifications. I will try compliing it this evening and check the Viber installation path. Thank you!

karas84 commented 9 years ago

Is it working? I'd really like some feedback about this so I can correct the code if there is a bug (and close the issue).

ekho commented 9 years ago

Linux Mint 17 (Mate desktop)

Launched and exited after 5-10 seconds

$ viberwrapper-indicator 
<class 'Xlib.protocol.request.QueryExtension'>
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/usr/bin/viberwrapper-indicator", line 333, in run
    gtk.main_quit()
RuntimeError: called outside of a mainloop
karas84 commented 9 years ago

Hi i-ekho, what I made is an indicator for Unity, it is not supposed to work with other desktop environments, I'm sorry. Moreover, since it's been more than a week that kpuljek didn't reply I have to suppose that it is working for him now and so I'm closing this issue.

ekho commented 9 years ago

Ok, thx

kpuljek commented 9 years ago

Hey,

sorry for responding so late, been really busy and totally forgot about this, and the notification email ended up in my spam folder.

It turns out that my viber path is /usr/share/viber/Viber

Upon changing the path in the py file, I get the same error as above (I AM running unity, however):

<class 'Xlib.protocol.request.QueryExtension'> Exception in thread Thread-1: Traceback (most recent call last): File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner self.run() File "viberwrapper-indicator.py", line 448, in run gtk.main_quit() RuntimeError: called outside of a mainloop

It does run viber for a few seconds, and the icon appears in the usual top left, out of place, position.

karas84 commented 9 years ago

Did you get Viber right from viber's website? (The current url is the following: http://download.cdn.viber.com/cdn/desktop/Linux/viber.deb) Because the one from the website has as installation path the one in the script (you can confirm that by downloading the deb I linked here and extract it somewhere, the executable should be in opt/viber and not in usr/share/viber). My Viber is at version 4.2.2.6, can you check that (my executable in /opt/viber/Viber has the following md5sum: 668252631ed50ca9b10e4156dd32a3fc)? My guess is that somehow your Viber is not the same one I am using and my scritpt (although it's able to launch it) cannot find the running instance so after 10 seconds it kills it.

kpuljek commented 9 years ago

It was from the website indeed, but this is a bit newer version than I had and now it's installed in two places (?), however your indicator wrapper now runs this newer version and everything is okay. I have NO idea why it originally installed in the /usr/share, I install everything either through gdebi or the terminal with dpkg.

This can now be closed (it already is :) ), although I'm not sure I know exactly what happened. THANK YOU!

karas84 commented 9 years ago

Glad to hear that it's working now :). Maybe you installed Viber right before the new version was pushed up online on the website, but anyway it's not important atm since it's working now :). Don't know if you noticed but I updated the wrapper and thanks to this issue now you can launch Viber minimized (sort of, the chat windows auto-closes after appearing for an instant), just launch the wrapper with --close-chat if you like the new feature.