Sunday, June 20, 2010

OpenSuSE 11.2 and VMWare Printing

To add a printer to the VMWare VM:
  • Ensure the VM is secured.
  • Edit Virtual Machine Settings
  • Add ...
  • Printer
  • Power on This Virtual Machine
There are then two choices hp#1 and OfficeJet_6400. hp#1 complains about margins and doesn't print even if you answer yes to the query. Officejet_6400 doesn't complain but prints a header page and then prints the page half an inch too low.

OK, try using these on just plain Linux:
hp#1
No change, it does not print

Officejet_6400
prints the header

%% [ ProductName: GPL Ghostscript ]%%
resulting in the actual print being again too low. We may be able to suppress the header, which would fix both problems.

So it is not a VMware or Windows problem per se, rather something with the Linux setup.

Checking YaST showed that printing was not enabled for hp#1. So we enabled it. Now it prints (all three previous attempts) without the header in the correct position.

Problem solved.

Friday, November 20, 2009

Time to Give Back

OK. I haven't fully gotten this blogging thing completely squared away, but gather I can rant or post information.

I'm pretty much out of rants these days, but have been working hard uncovering weirdness while trying to configure a laptop for my granddaughter Casey.

I've logged the solutions, but had not yet posted them so that others might benefit. So now I do.


The most fearful are those in the bowels of /bin and /etc because you really need to muck about as root and that can be a dangerous thing.

But I have already reinstalled this thing about three times, so it was the time to go a bit further:

Problem: All of a sudden I get

Permissions on the password database may be too restrictive

su: incorrect password

when trying to change to root with the su - command.

"All of a sudden" because I had not done anything (I swear!) other than restore the root password which had gone south a few days ago.

Googling brings all kinds of interesting stuff, all of which I tried with no success.

Solution:
This worked:


+ Log in as normal, going to user through the preestablished automatic login.

+ Log out as user and back in as root.

+ Go to YaST > Security > Local > Security Overview. We find Use secure file permissions disabled. Enabled it and set it to Easy.

AND THAT FIXED IT.

It's easy when you know how.

=====

Of all the intermediary research and trial and error that I went through in getting here, one source I would recommend is /etc/permissions. I had wanted to find something like this a long time ago without success. This file and its associated ...easy, ...standard, ...paranoid parallels are the basis for the Linux file ownership and permissions system.

You use them (as root in a rescue login) with

chkstat -set /etc/permissions
or
chkstat -set /etc/permissions.{easy,secure,paranoid}

or call

SuSEconfig


as YaST does after it thinks that files have been modified in the system.

Hope this helps.

Thursday, October 22, 2009

Virtualization

Your mileage may vary, but as of 10/25/09, VMWare is the winner. We have spent several weeks playing with the latest versions of CrossOverOffice for Linux (CXO) and Sun's VirtualBox (SVB). Both are brilliant in their own way. But in the end, you get what you pay for.

CXO does very well with its "supported" applications, but I have found little or none beyond that. The most frustrating part is USB support, which seems to be nil, no matter how many hacks I try.

SVB is much snappier than VMware, but again the USB support is spotty. I have documented all this, it just doesn't work all that well. I've RTFI'd the help file and discovered you need to define at least one "filter" for USB devices. This does not appear after hours of googling. But I have done so for all available devices, but it just works for one, the Nokia phone.

Below is a synopsis:

I've had a very pleasant experience with the latest CrossOver Office (CXO) 8.0.0 for Linux ($70) with the apps that they "support". I can now use Word, Excel, without the huge disk-thrashing overhead of the XP OS.

It Turns Out That both Word and Excel are really quite snappy apps; their generally perceived sluggishness is due the OS,
*NOT* the app. I can prove this by comparing response times on the app on WinXP versus response time on CXO. The difference is amazing. If I were the project manager for either MSWord or MSExcel I would prolly be hugely PO'd by the sluggishness rendered by the underlying OS...

On The Other Hand... :-(

CXO USB support and support for "unsupported" apps are less than marginally acceptable. They need an auto-discovery routine that will bring up
ndiswrapper and prompt for the drivers. Or something. Hey, dmesg and hal know instantly when you plug in a USB device. So it is very doable, but after several hours of experimenting each day for about a week I can only connect to USB memory devices that are recognized and mounted as drives by the host. So this leaves out:

+ Garmin GPS products
+ Nokia phones
+ ICOM radios
+ RayTech products

And a few other programs that are only available in MSWin such as:

+ NLReg
+ AimKeys
+ Adobe Acrobat
+ ...

In short, CXO does not support the only few remaining reasons to use MSWin: niche applications and USB dependent applications.

Graphics, communications, computer admin, media, music, photos, browsers, office apps, finance, all the rest of the mainstream I can do on Linux without even a Whiff of the MS stench.

(Sorry for the arcane allegory: Newport RI has a huge sewage problem that has them tearing up almost every street in the town trying to fix... Huge trenches, beaches closed, overflowing manholes... A third world country. So you spend a lot of time holding your nose...
:-(

(But the comparison is valid, be it MSWin or sewage: almost everywhere you go you find this stench so it takes extraordinary effort to avoid it...)

Anything mainstream that MSWin can do Linux can do better. But I need MSWin to run my little toys...

[OBTW, what in the world possessed them to totally hose the menu on Office 2007 with eye-candy to completely confound over fifteen years of conventional usage and come up with a file format that is not backwards compatible with said over fifteen years of data?! The menu is just a single layer of eye-candy under which lies the old familiar File>Edit>View menu, but it takes you several days of frustration to figure that out. And the use of XML is just politically correct breast beating. Sure, introduce the new format as an option, but don't make it the default without warning! YOH! I have work to do. Time is money and you are costing me money!!

[Oh, and while you're screwing up my format and telling me that there are four cells whose formats are not backwards compatible how about giving me a [Find] choice instead of playing "I have a secret"?

[Cretins.

[But I digress.]

In short, there are only two reasons for using CXO:

+ Snappy performance of "supported" apps on Linux, compared to the sluggish performance on XP, whether on actual or virtual hardware (I can see no difference between the latter two)

+ Political activism for OS iconoclasm. Which I support.

So where does that leave us?

Well:

+ Native Win2k/WinXP/whatevah (Have you noticed the quiet death of Vista? Actually, it was stillborn...)

+ CXO for Linux for "supported" Apps

+ Virtual machines with MS Operating Systems for the rest of the niche and USB requiring Windows programs:

- VMWare on Linux Host with whatevah client

- VirtualBox (http://www.virtualbox.org/)on Linux Host with whatevah client

AFAICT, mounting WinXP on any of these seems to be about the same. Tons of disk thrashing. And yes, I have googled extravagantly trying to find a solution. It just doesn't seem to exist. Please tell me if you know of one.

My sense is that VirtualBox is cleaner and leaner than VMWare. And it certainly is infinitely cheaper (any number divided by zero goes to infinity...
:-)

I know VMWare, VMWare is a friend of mine, but it also is rather dear in this domain and AFAICT no better, and perhaps worse, than VirtualBox.

Except that it works.

You get what you pay for.

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...