WebSDR & Java fix for Ubuntu Linux
If you are using Ubuntu Linux you might have problems to open the Dutch WebSDR page. The problems appears in both, Firefox and Chrome. Canonical does not ship the Sun’s Java Runtime Environment anymore with Ubuntu. Instead they included OpenJDK and IcedTea, a Java Web browser plugin. Unfortunately, IcedTea does not work with the WebSDR Java Applet. However, there exists a solution. Read how I fixed the problem.
It’s quite easy to fix the problem. You need to replace OpenJDK and IcedTea with Sun’s Java JDK / JRE. In case this still does not work, find below some troubleshooting hints.
Install Sun’s Java JDK/JRE
With Ubuntu 10.04 the Sun Jave JDK/JRE has moved into the Ubuntu partner repository. In order to use it, you’ll need to register the repository within your Ubuntu.
Execute the following commands in a bash console:
sudo add-apt-repository “deb http://archive.canonical.com/ lucid partner”
Update the source list
sudo apt-get update
and finally install Sun’s JDK/JRE
sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts
Accept the license agreement and start the installation process.
After the installation you might check if the Sun’s Java was installed correctly by the following command:
java -version
Open WebSDR in your Webbrower. If the waterfall diagrams are shown correctly and you can hear the audio, then everything works as expected. In case you don’t hear any audio, read the following troubleshooting hints:
Troubleshooting
Register manually Java sound service
Open sound.properties (on my system located in /etc/java-6-sun/ )
sudo gksudo gedit /etc/java-6-sun/sound.properties
add the following four lines in order to register the sound properly:
javax.sound.sampled.Clip=com.sun.media.sound.DirectAudioDeviceProvider javax.sound.sampled.Port=com.sun.media.sound.PortMixerProvider javax.sound.sampled.SourceDataLine=com.sun.media.sound.DirectAudioDeviceProvider javax.sound.sampled.TargetDataLine=com.sun.media.sound.DirectAudioDeviceProvider
Uninstall OpenJDK and IcedTea
With the installation of Sun’s JDK / JRE, OpenJDK and IcedTea should be removed automatically. In case you have problems, check if these packages have been removed correctly:
dpkg -l | grep openjdk dkpg -l | grep icedtea
In case nothing is displayed, OpenJDK and IcedTea have been removed correcty. If not, you might try the following commands:
apt-get purge openjdk-6-jdk apt-get purge icedtea6-plugin
Does this work for you? If so, please leave a short comment.
Related Posts
Please rate this article!
no login necessary; it's anonymous!
.
By Eldon Brown - WA0UWH, June 16, 2010 @ 6:34 am
Note: as publish on your blog, the first command does not work, – the wrong type of quotes are used, or at least that was the results when I used the “cut and paste” on my command line and keyboard.
But it works if the quotes are changed!
And, Thanks – I need that!
Eldon – WA0UWH – http://WA0UWH.blogspot.com
By rz4cww, July 6, 2010 @ 4:01 pm
TNX for nice site.
GL on DX’ing & contest
By Jonathan Marsden - AF6YF, July 23, 2010 @ 8:56 am
WA0UWH is correct, the quotes in the article are MS Word “smart quotes” which is odd for an article about Ubuntu!
Also, I’m running Ubuntu 10.04 64bit here and the site linked to in the article works for me as is, using openjdk and icedtea (in Firefox). So while this looks like a nice tutorial on installing the Sun JDK, it doesn’t seem to be necessary to do that in order to use WebSDR
By dl3no, May 13, 2011 @ 7:46 am
Openjdk worked for a few hours. Then only a tone and off. Now with Sun JRE everything works except Austria…
73
Rupert (HS8/DL3NO)
By PE1R, August 3, 2010 @ 7:15 pm
@ AF6YF Openjdk compiled in 32 bit never worked for me
also a typo in dkpg -l | grep icedtea
You can manually add the package source in Synaptic
deb http://archive.canonical.com/ lucid partner
Push the blue reload button in Synaptic
Remove the Open-jdk and Ice tea packages
Install sun-java6-jre , sun-java6-plugin , sun-java6-fonts packages
Current version archive version is ; sun-java6-jre 6.20dlj-1ubuntu3
Current Oracle version is 6 version 21
73 , Ruud
By Jochen-7J1AJV, August 7, 2010 @ 1:16 am
Dear OMs
Obviously icedtea is somehow incompatible with the WebSDR Java Applet. It seems that the same Java Applet is used in other sites as well. Same problem.
For administrative reasons I would like to follow to LTS path, I am administrating our 3 “family” PCs. So hope to get a fix with icedtea. (I somehow believe the problem is on their side).
73, de Jochen 7J1AJV
By iw0hdv, August 24, 2010 @ 5:09 pm
I installed the following packets from Applications->Ubuntu Software Center, selecting
Getting software -> Canonical partners
write Java in search field
next install:
Sun Java 6.0 Plugin
Sun Java(TM) Runtime Environment (JRE) 6 (architecture dependent files)
Sun Java(TM) Runtime Environment (JRE) 6 (architecture independent files)
Lucida TrueType fonts (from the Sun JRE)
restart Firefox and all works.
By oe1gca, September 16, 2010 @ 2:25 pm
Hi!
I followed the instructions to fix the no-sound problem – but it still does not work.
dmesg says:
[ 2855.384600] type=1503 audit(1284638383.265:125): operation=”open” pid=4891 parent=4810 profile=”/usr/lib/firefox-3.6.9/firefox-*bin//firefox_java” requested_mask=”::r” denied_mask=”::r” fsuid=1000 ouid=0 name=”/dev/snd/controlC0″
…
Any ideas?
By Grant, October 14, 2010 @ 3:26 am
Does anyone have a way to use jack with the websdr and fldigi or gpsk? it’d be really cool to be able to use multiple browser tabs sending audio to fldigi for decoding.
Grant
VK3FBAE
By Guenter DL7LA, November 3, 2010 @ 5:11 pm
mni tnx, Tobias, works great and out of the box
guenter DL7LA
By guenter, December 24, 2011 @ 12:30 pm
Hi, Tobias,
I guess the Firefox peaople messed it up again with their last update a few days ago: now failure all along the line again. Sun-Java is installed like
java version “1.6.0_26″
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) Client VM (build 20.1-b02, mixed mode, sharing)
but to no avail. FF claims that there is no java existent nor active. All the openjdk stuff and iced tea I had purged.
Anyone out there with ideas about a browser that works?
Guenter
DL7LA
By Tobias, December 24, 2011 @ 2:55 pm
Hi Guenter,
I haven’t used Ubuntu for a while now. But I can hardly recommend the chrome browser!
I switched a while ago to MacOs. Basically Linux on steroids
73 Tobias
By Rudi - ON6MI, November 4, 2010 @ 4:22 pm
Hi Tobias,
Took some time to solve this problem but with your fix and troubleshooting it was done in a few minutes.
Thanks and 73′s
Rudi, ON6MI
By Juan Miguel EA6NP, December 2, 2010 @ 6:28 pm
Hi, Tobias.
I had the same problem, with Ubuntu 10.4 and Firefox, no sound. Registring audio properties as described and removing Ice tea, now it works great.
Thanks!
Juan Miguel, EA6NP
By jose, December 6, 2010 @ 10:06 am
Tnx for infos
73
GL jose
By Cemal - TA2BG, December 17, 2010 @ 1:32 pm
Hello. I had no sounds from my machine (apart from simple alert sounds) since I upgraded my Ubuntu. On the webSDR even the s-meter did not move. After following the procedure on this page, the s-meter started to move, but still no sound. Neither from webSDR nor from flash movies etc. Any suggestions?
System>Preferences>Sound>Applications indicates that “there are no applications playing” on webSDR, the same message alternates (flickers) with “Alsa plugin” when running the flash player.
Any pointers? Thanks in advance..
By Chuck Rothauser, January 9, 2011 @ 12:12 am
Danke! Das ist sehr gut!
I can now hear the signals wheras before I just got the waterfalls
73,
—Chuck Rothauser
By DO9FM, January 22, 2011 @ 11:46 pm
thx for ur tutorial, ufb with ubuntu 10.10!
73 de DO9FM
By OE6RHT, February 20, 2011 @ 2:34 pm
Thank you very much. It worked fine with my equipment (Ubuntu 10.10, Dell Latitude 2110) after minor adjustments.
73 de OE6RHT
By Jim, February 26, 2011 @ 12:58 am
Thank you so much. I was tearing my hair out trying to solve this. Java sound worked on my laptop, but not on my desktop, and they’re basically configured the same way, though hardware is different. It wasn’t until this article that things are working. Thank you again.
By Tobias, March 7, 2011 @ 12:55 am
Hey Jim,
happy I could help you out! I know how frustration this kind of troubleshooting can sometimes be.
So enjoy Java Sound under Linux
73 Tobias
By Grant, June 24, 2011 @ 10:10 am
So I finally got this working with fldigi so I decoded some RTTY from websdr using a chain of
websdr -> pulseaudio -> jack -> fldigi
it’d be nice if I could get java to talk straight to jack might see what I can do with that but I havn’t had much joy with the alsa jack plugin.
By Jerry, November 8, 2011 @ 8:46 am
Hi Grant,
Can you provide more details on how you got the websdr->pulseaudio->jack->fldigi chain working?
Thanks.
73,
…jerry
KA6HLD
By bruce, August 27, 2011 @ 5:46 pm
Problem: In Ubuntu 10.04, there’s no sound from websdr in firefox. In chrome, there is sound from the built-in sound device, but not from the default usb sound device, and there is no control of volume. All other sound sources seem to perform correctly in both browsers, including the globaltuners application, oddly enough.
In my previous Ubuntu installation on this machine, I did manage to get Chrome working properly by using Tobias’ hints and the comment from Eldon about the quotes. If I recall correctly, firefox never worked.
By Dieter, December 27, 2011 @ 8:48 am
Problem: In Ubuntu 11.04, there’s no sound from websdr in firefox.
All other sound sources seem to perform correctly.
Is there any sugestions?
By kiri, January 5, 2012 @ 3:33 am
Thanks — your article helped me fix my java sound.
I did not have to add the lines to the sound.properties. Instead I
checked synaptic and uninstalled openjdk and iced tea. These had been
installed on top of my sun by box.net just recently. I lost sound right
after that! Uninstalled them, and immediately my java sound returned!
By Peter Coenen (DG1KPC), January 13, 2012 @ 5:32 pm
somebody tested on Ubuntu 11.04 or 11.10 to install sun-Java for websdr?
because ubuntuusers.de says sun-java is possible to install with the old repository in 10.xx,
but this will not work on 11.xx – and will not be possible…
any suggestions?
By Andy66, January 20, 2012 @ 9:34 pm
I was to try it. no work.
By Art Elsea, Jr., January 17, 2012 @ 10:44 am
Used the fix on Ubuntu 10.04 32bit – worked perfectly. Just removed OpenJDK, Icedtea and installed sun-java6-jre sun-java6-plugin sun-java6-fonts. Waterfall and sound work on both Chrome and Firefox. Thanks for the great tutorial.
On a new system with Ubuntu 10.04 64bit, the fix didn’t work. Tried the trouble shooting suggestions and it still didn’t work.
Full details: When I first installed Ubuntu 10.04 64bit on the 64bit system, both waterfall and sound worked perfectly. Then I ran an update/upgrade, rebooted and waterfall works, but sound is gone. All of the sites on Websdr.com complain that JAVA isn’t installed. Tried the same process that had fixed the problem on the 32bit system and still doesn’t work.
Sound works on YouTube, news videos, etc. Just doesn’t work on Websdr.com for either Firefox or Chrome.
Any suggestions are most appreciated.
Thanks