dessalines / torrenttunes-client

DEPRECATED: A BitTorrent-based music streaming service.
GNU General Public License v3.0
358 stars 43 forks source link

Client does not open in Firefox Arch Linux 64 bit #78

Closed BtpPrograms closed 8 years ago

BtpPrograms commented 8 years ago

Launching the JAR shows the error "c.t.client.tools.DesktopApi - Process is running." and the client doesn't start despite the log saying that it was launched. I'm running Vimperator, Adblock, and a simple theme in Firefox; the web client on Torrenttunes.ml works fine so I doubt that's the issue. I attached the full log below.

log.txt

dessalines commented 8 years ago

Hrm, I'm pretty sure your OS didn't set a default browser, so java doesn't know what browser to open. Your two options:

1) Set a default browser on arch linux to your firefox : https://wiki.archlinux.org/index.php/Xdg-open#Set_the_default_browser

2) Simply open up this webpage in your browser.

22:31:25.004 [main] INFO  com.torrenttunes.client.tools.Tools - Opening web page: file:/home/benny/.torrenttunes-client/src/web/html/main_en.html
BtpPrograms commented 8 years ago

I did try to open the page manually and it told me that Torrent Tunes hadn't started yet. I'll test the default browser part later today. On Jan 8, 2016 10:12 AM, "Tyhou" notifications@github.com wrote:

Hrm, I'm pretty sure your OS didn't set a default browser, so java doesn't know what browser to open. Your two options:

1) Set a default browser on arch linux to your firefox : https://wiki.archlinux.org/index.php/Xdg-open#Set_the_default_browser

2) Simply open up this webpage in your browser.

22:31:25.004 [main] INFO com.torrenttunes.client.tools.Tools - Opening web page: file:/home/benny/.torrenttunes-client/src/web/html/main_en.html

— Reply to this email directly or view it on GitHub https://github.com/tchoulihan/torrenttunes-client/issues/78#issuecomment-170027787 .

dessalines commented 8 years ago

Run the launcher again, I just released an update(0.7.7) that may fix the problem. Show me your log if it still doesn't work.

BtpPrograms commented 8 years ago

The default browser was already set. I also tried setting the default to Google Chrome and it still wasn't opened. The patch didn't fix the issue; however, I was able to manually open the page by using xdg-open and opening the main_en.html file. Once I was on that page I was able to download music from the home screen (it showed up in the music folder and played in mplayer) but it wouldn't play within the browser. The process closed when I tried to use the search. By the way, I'm using bspwm and no other desktop environment if that's relevant. Log is attached below.

log.txt

dessalines commented 8 years ago

I changed to a local web version, open up this page instead.

http://localhost:4568/torrenttunes

I'm not really sure what to do about java not picking up your DE browser correctly, the only one I know to do is this:

https://lampjs.wordpress.com/2014/09/10/arch-linux-set-default-browser/comment-page-1/

BtpPrograms commented 8 years ago

I'm getting the error "ERROR c.t.client.tools.DesktopApi - Process is running." I looked up the Desktop API for Java and it looks like that's how you're launching the browser. According to this that API is only optimized for the KDE and Gnome desktop environments. I'm not using a desktop environment so that's probably the issue.

It looks like the best fix would be to run isDesktopSupported() first and have an alternative way to launch if it's not supported. BrowserLauncher2 seems like it might do the job. There's also a class here that wouldn't require you to pull in an outside library. I think you might need to add Chromium into its browser list though.

For now I'm just going to manually launch the URL in my launch script as a workaround. Once I get some more time on my hands I can probably go in and fix it on my own if you don't. Thanks for all of the help so far.

dessalines commented 8 years ago

I'm actually using that guy's DesktopAPI.java he's using from that thread(because I had some issues for someone using a different DE. I'd be glad to accept a pull request if you can get it working for some lesser-used DE's.

dessalines commented 8 years ago

I'll close this out for now.