Monday, September 7, 2009

Connected!

Finally.

I've been struggling for quite some time to connect my Linux machine to the Internet via the cellphone. Today I cracked it.

There have been a several issues:

* SuSE 11.1 Bluetooth is broken, AFAICT. At least I can't get it going right. I had it working just fine on SuSE 10.2 but the 11 series release broke a lot of stuff. I had ppp working over Bluetooth on SuSE 10.2, but haven't yet succeeded on 11.1.

* AT&T pulled the ability to "tether" (connect through a phone) from my plan a year or so. It was working fine (again on SuSE 10.2) and then one day it just stopped. They said it should never have worked, but whatever. So now I have a plan that explicitly allows tethering.

* The newer versions (6.9, 7.0) of Nokia PC Suite just didn't work on my Windows 2000 installation on VMWare on SuSE.

But after returning from a wonderful holiday in Europe and the UK I got to work:

* First I created a new virtual machine and installed Windows XP. Time consuming (about a week) of reinstalling all the software and sorting things out, but it is all working, including PC Suite this time. So I could connect to the Windows instantiation, but still not to Linux.

* Installing PC Suite brought a phone firmware upgrade, so more time adapting to that.

* And then last night I found http://www.joiku.com/index.php. It is self described as a web community for free software. Well, maybe, but it points you to http://www.joikushop.com/index.php to buy software, albeit at very low prices.

I registered with the first URL with no problem, although have had some issues with the latter that they are working on. At any rate, I found JoikuSpot. This is a little program that turns your cell phone into a WiFi hotspot! With encryption, no less. And no proprietary tricks. So it works with Linux! 'Way cool.

There are some fiddly bits, but these were resolved with only a few hours of methodical experimentation.

So I recommend it. It has solved a long list of ToDos for me.

Here are the fiddly bits:

* Make sure that you set your WLAN to "AD HOC" mode, NOT "Managed".

* Set the network card to DHCP and add 192.168.2.1 as the explicit default gateway.

* Choose ASCII type keyword, not "Hex" or "Passphrase".

* Choose a keyword that does NOT include apostrophe or quote marks. (/etc/sysconfig/ifcfg files store field values delimited by apostrophes or quotes, so cannot handle passwords with those characters.)

* Choose WEP-open, 128-bit encryption NOT WEP-shared. Ensure the keyword is exactly 13 characters.

* Use ip addr to check the IP address of the client after network setup. Try pinging the host: ping 192.168.2.1

If it does not respond then reboot the client machine.

Oh, and of course RTFM. It is at User Guide.

Thanks JoiKu!

Wednesday, August 12, 2009

Audio Fix for SuSE 11.1 and VMware

We are now doing regular meetings on a collaboration site on Windows, so I need audio. I run Windows when necessary in a sandbox (VMware: http://www.vmware.com/). I was able to hear myself speaking in the headset earphone, I was able to hear a "presence", but could not hear other participants and they could not hear me.

It turns out that VMware runs the OSS (Open Sound System) instead of ALSA (Advanced Linux Sound Architecture). The solution to the hearing problem is to patch the basic VMware script to preload an ALSA-OSS wrapper. The solution to the recording problem was to access the Capture module of the sound system and turn it on.

Details
Player Sound
Initially there was no sound, so I went to the Linux audio control (KMix) and found the first control ("Front") muted. Unmuting it now gives a presence, but no apparent control of volume. I tried starting Amarok. It played, but no sound. I then ran

yast2 sound &

in a root terminal to check the settings. The presence disappeared when YaST started up. I reset all the values, restarted the sound system, restarted KMix, then checked it to find the first control ("Front") muted again. Unmuting it restored the presence. Restarted Amarok, now we have sound on Linux.

Now I started VMware as user. It reports:

Failed to open sound device /dev/dsp: Device or resource busy.
Failed to connect virtual device sound.

The link

http://symbolik.wordpress.com/2007/11/10/vmware-server-104-and-kernel-26231-on-gutsy/

says that VMware uses OSS, not ALSA. I checked for the existence of all the requisite files following that link. They all exist, so VMware is just not loading them.

http://ubuntuforums.org/showthread.php?t=331175

recommends patching the basic VMware script. Issshhhh (large sucking through the teeth sound...)

Before taking the plunge of patching the basic vmware script I ran yast2 sound to make sure it is using the cited device /dev/dsp. YaST doesn't say, but I turned on pulse audio, brought up Amarok and the mixer to check things. Amarok was already up in the system tray, so I shut it down completely and ran VMware one more time.

No change, no sound, no connection to the dsp. So bit the bullet:

cp /usr/bin/vmware /usr/bin/vmware.orig
kate /usr/bin/vmware

I added the following comments and command at the start of the script:

# 090811 patch to use alsa sound vice oss
LD_PRELOAD=libaoss.so exec

# the remainder of the original script

Then saved it and ran

chmod +x /usr/bin/vmware

just to be safe. I then restarted VMware normally as user.

No joy.

I tried starting VMware with the sound card disabled and then activating it after vmware was up and running. No joy.

So shutdown and rebooted the entire system, then restarted VMware without touching any audio apps and making sure that no audio apps were running.

Now it loads!!! WE HAVE SOUND!!! And VMware finds the device and Windows now has player sound.

But no record sound.

Record Sound

The microphone connection is working: I can hear the microphone in the earphone and muting the mike in KMix makes that go away. But KRecord does not record any sound.

First step: Google:

http://forums.opensuse.org/hardware/402106-no-sound-new-suse-11-1-a.html

says to try the following to test speakers:

speaker-test -c2 -l5 -twav

This gives five renditions of "Front left" although zero renditions of "Front right" or anything else.


arecord -d 10 myrecording.wav

gives a ten second recording of... nothing. :-(

/usr/sbin/alsa-info.sh


does a number of tests on the sound system and saves the results in /tmp/alsa-info.txt.
It cites
E-sound daemon: Running - No.

and then a raft of other details, including:

Simple mixer control 'Capture',0
Capabilities: cvolume cswitch
Capture channels: Front Left - Front Right
Limits: Capture 0 - 46
Front Left: Capture 45 [98%] [28.00dB] [off]
Front Right: Capture 45 [98%] [28.00dB] [off]

This implies that KMix should have a module for capture and that it is presently muted.

I added the Capture channel (KMix > Menu > Settings > Configure Channels) and checked its checkbox.

Then tested with KRecord. It works!!!

Now, try on VMware. It works too!

I love it when a thing works out right...

Wednesday, May 6, 2009

Just the facts, ma'am

These are the distros I have tried and have been unable to get to run on the Fujitsu Lifebook P1630. They all universally display the same behaviour: Regular boot up until X starts, at which the screen cycles through three shades of grey followed by red, green, and blue. All Linux:
* OpenSuSE 11.1
* ubuntu 8.10
* PCLinuxOS 2009
* Mepis 8 (does work but only at 800x600)
Reinstalling the Windows OS does work, so the machine is not defective.

But it does make one start wondering... Conspiracy et al. Is there a chip in the P1630 that prevents you from running anything except Microsoft?

Just because I'm paranoid doesn't mean they aren't out to get me...

Tuesday, May 5, 2009

Why does it have to be so hard?

It's been a while since my last post. Very busy: work, taxes, summer planning, and ...

Trying to get SuSE 11.1 to work on a Fujitsu P1630 Lifebook.

Or any other distro, for that matter.

OpenSuSE 11.1 works just fine on the two years-old Fujitsu P1610 Lifebook. But the P1610 is getting a bit long in the tooth, so I thought I'd get the latest and greatest.

The machine is not defective, at least not as designed. It runs the M$ native installation just fine.

But I don't want M$. I want KDE-based Linux.

The P1630 comes with
an Intel Mobile GM45 Express Chipset and a 1280x768 display. However, I have not been able to get the video to work except in Failsafe mode, and even then rather tenuously.
The basic issue is that the X system configurator, ''sax2'' hangs, at a point at which the screen repeatedly cycles through:
* Black
* 33% Grey
* 67% Grey
* White
* Red
* Green
* Blue
* I Try Mepis OS, it boots, but only offers 800x600 resolution
* I try PClinuxOS, it does the same as SuSE: flashing screen cycling from black through grey and white to RGB
* I download the latest SuSE 11.1 with KDE 4.1 ISO. No joy.

And of course, in the meantime a host of other issues with CD recorders and other matters.

I really love my P1610. I get a couple of hours of battery life and have two batteries, so plenty for a TransAtlantic. It fits on an airline tray and has 80GB of disk. So it seemed a no brainer to upgrade to the P1630.

But no, they had to go and fix something that wasn't broken...

Wednesday, March 11, 2009

If it ain't broke DON'T FIX IT!

KDE 4.1 has a new "feature", a search engine called Strigi. It depends on a service called nepomukservices. The latter consumes about 95% of your CPU time. And there is nowhere that I can find any way to invoke strigi and make any use of it.

So, aphoristically, I am giving away 95% of my computing power to accomplish nothing.

OK, so let's turn it off. Fire up YaST and go to System > System Services (Runlevel). Sorry, no entries for either strigi or nepomukservices or anything like that.

OK, so then let's uninstall it. Fire up yast2 sw_single and find strigi. OK, done, change the checkbox to an X and proceed.

Not-so-fasto. It wants now to also uninstall all of KDE4 and plasma!!

Good grief!

OK, fuggedaboutit, locate strigi and rename the executables to trash_strigi, and then do the same for nepomukservices.

Done.

Look guys, I know you want to be creative, but please try to let something be optional until proven worthy and popular. The idea of uninstalling all of KDE 4 and plasma just to get rid of one useless search engine is ridiculous.

Saturday, March 7, 2009

VNC - Virtual Network Computing

I have spent a number of hours over the last couple of weeks trying to work out Virtual Network Computing between two machines on my WiFi LAN. This post summarizes what I have found on my own, compared to what Google has found for me.

The VNC protocol is basic Linux and independent of the GUI software.

There are two ways of connecting: either a Remote Frame Buffer protocol that sends the desktop of the server or the original VNC protocol that sends the contents of an X-session established remotely on the server. While a person at the server display can see what is happening in an RFB session, the workings of the X-session are invisible.

http://www.realvnc.com/support/getting-started.html provides a good synopsis of the basic commands, but there were some glitches.

http://www.enterprisenetworkingplanet.com/netos/article.php/1470341 provides another good tutorial.

vncserver/vncviewer
This is the original, now TightVNC, protocol that comes with the distribution. Per the ''man'' page, vncserver is a wrapper script to launch an X server for VNC. Running it brings up av Xvnc session that only shows a shell terminal on the server machine.

krfb/krdc
This is a remote frame buffer GUI that comes with SuSE. krfb sets up a listening session on the server. krdc connects. krdc offers two types of connection: vnc and rdp. The former brings up the server's display. The latter is for remote control of Windows machines.

I have installed SuSE 11.1 (the latest) on both machines.

Review and Comments
vncserver/vncviewer
  • I can connect to "m90" server, but only get an X session
  • vncviewer will only connect to vncserver. It does not connect to a remote frame buffer server (e.g.,krfb)
krfb/krdc
  • I can connect to m90 server but the presented screen is all patchy and unusable. I have tried all three "Connection Speed"s. The lower speeds end up with a pixellated display, but otherwise the results are the same: the mouse movements are halting and there are numerous different-sized different-colored rectangular patches over any text, and font colors vary. The results are essentially the same in both directions, although the problems while using my "p1610" as a server are not as pronounced as when using m90. This suggests the problem is the server speed. The patchiness is primarily on text. Graphics render fine.
http://192.168.5.2:5800
  • |No response. Did various researches, opened firewall ports 5800:5802 and 5900:5902 on both machines. Just no joy. The result is the same in both Firefox and Konqueror. My guess is that this will only render an X session, which is not very useful (I can do as well with ''ssh'' if all it offers is a shell...
realvnc
http://realvnc.com/ offers a free version for download, which I have done. But it is just the usual vncserver/viewer X-session pair.|

I had earlier succeeded in getting a session with the machine upstairs {{{m90.Pilgrim.net, 192.168.5.2}}} using both {{{vncviewer}}} and the HTTP interface http://m90:5801/ on {{{konqueror}}}.

Remaining X-server Issues
The session is rendered as an X-session, not a desktop session, if vncserver is running. Which client is being used ((vncclient or krdc does not matter. You must have krfb up on the server to see the desktop.

With vncserver I do not know how to:
  • Have the client's actions appear on the screen of the X server. All this can carry on in X and there is no indication on the screen. krdc actions do appear.
  • See the existing server desktop. I only see the Xshell that comes up when I connect and any subsequent applications I open from the CLI in the shell. KDE Desktop, icons, etc. are all invisible.I can invoke KDE from the X-session shell prompt, but this then returns the pixellation and patchiness issues cited above, and again are invisible on the server display.
  • Resize the windows in the viewer. I can bring up the menu and select resize but there is still no response. By contrast, krdc does a nice job of resizing the display to fit the client screen.
  • Alt-Tab between the child windows. Again the Menu lets you park an icon manager and select windows there, but the Alt-Tab kind of function eludes me.
  • Allow access to external addresses. This is just a matter of working through the firewall settings and the results in {{{dmesg}}} but at present we haven't gotten there.
  • Allow access on my own machine. I can access M90 but not this machine and there are no messages in {{{dmesg}}} indicating the problem.
Tips
  • Ensure your network does not have any IP conflicts. Each machine needs a unique IPA. //Duhhh//...
  • Alt-F8 brings up the VNC viewer menu.
  • Try the {{{-shared}}} option. When you make a connection to a VNC server, all other existing connections to that server are normally closed.
  • You can run the viewer as either //user// or {{{root}}}. The permissions on the remote ("server") machine determine what you can do.
  • You need to open a number of ports in the firewall to allow access here: TCP 5800, TCP 5900 as a minimum.
Checklist
Here is a checklist of access controls that can prevent successfull VNC sessions:
(With multitudinous thanks to
http://www.linuxquestions.org/questions/linux-newbie-8/vnc-connection-refused-435593/)
1. Make sure your router firewall allows VNC. Specifically, it should open the ports 5800, 5900. If your VNC display is on :1, you should also open ports 5801 & 5901. Similarly, if your display is on port :2, you should open 5802 & 5902, and so on.
In Guarddog, create these in the Advanced tab and enable Local to serve to to Pilgrim.net and vice versa (and the Internet if desired) in the Local section.

2. Make sure your Xwindows has access opened on those displays. To find out, do:
> xauth list
This results in:
P1610:~ # xauth list
P1610/unix:0 MIT-MAGIC-COOKIE-1 5e7c1e8f677366d772374530258c514e
M90.Pilgrim.net:1 MIT-MAGIC-COOKIE-1 5b6a01831f3e58b77218990dd62cdc1b
P1610/unix:1 MIT-MAGIC-COOKIE-1 5b6a01831f3e58b77218990dd62cdc1b
3. To find the external IP address of your linux machine, point your webbrowser (on the linux machine) to http://myipaddress.com/
4. Finally, note that you can point your web browser (on your linux machine) to the following website to check if your VNC server is accessible from the external world: http://www.gotomyvnc.com
5. And as usual after messing about with a firewall, go to
https://www.grc.com/x/ne.dll?bh0bkyd2
to make sure you are not showing anything you don't want to show.

Thursday, February 26, 2009

Trucking Along... VMWare

I've slain a bunch of dragons in the past few weeks. Quite happy with that.

But many others evade me.

One is VMWare's USB 2.0 support, apparently not. The menu states that WorkStation 5.0 series do not support USB 2.0, but I am on WS 6.5.1. Going to tools offers no solution for upgrading, and Googling has not helped so far...

As a result I cannot connect the Nokia E90 nor the Olympus DS-61 to Windows 2000 running on VMWare WS 6.5.1 on Linux SuSE 11.1.

I'm sure we shall figure it out eventually.