Category: Computers

ALSA: cannot find card ‘0’ when using USB sound card

By , 2012-02-24 10:16

I was trying to get my Alix board to properly output audio. It has no VGA and no onboard sound card, so I’m using a USB to audio adapater. The card was detected, all appropriate snd- modules loaded according to lsmod, and it showed up in /proc/asound/cards. Problem is it was card1, and alsamixer and most programs use card0 by default.

It seems that Debian configures snd-usb-audio in /etc/modprobe.d/alsa-base.conf with the index=2 option to prevent it from being the primary card. To disable this behaviour, simply comment out the line.

 

Original answer:

So are you using a USB sound card as your audio device?It looks like you might have removed some audio device from your computer, that is why card0 is missing, where as usb card is configured as card1.

Edit /etc/modprobe.d/alsa-base.conf, include/modify the line for snd-usb-audio

snd-usb-audio index=0

This would update snd-usb-audio to card0, in case you want that as the first card.

via Debian User Forums • View topic – ALSA: cannot find card ‘0’.

UxStyle – mirror

By , 2012-02-16 17:03

It seems like the ‘net is becoming less and less reliable for keeping old content online. With all the DMCA takedowns, geocities going offline the whole megaupload fiasco and even large companies like Intel taking down or hiding their own software (see previous post).

Anyway today I wanted to enable third-party theme support on a new Windows 7 install. Headed over to http://uxstyle.com to get the tool only to find a 404. Thanks to The Wayback Machine (web.archive.org) I was able to get a copy of uxstyle and hosting a copy here:

UxStyle_Core_jul13_bits.zip

Intel AHCI drivers for Windows

By , 2012-02-12 18:56

If you have a “legacy” Intel chipset (and apparently legacy means anything not from the Core i era), the new AHCI/ATA driver Intel lists on their site (“Intel Rapid Storage Technology” ) isn’t compatible with older chipsets.

I have a few ICH7, ICH8 (also used for VirtualBox’s AHCI controller), ICH9, ICH10 and ESB2 southbridge chipsets and have found that the Intel Matrix Storage Manager 8.9 works.

I’ve attached the Windows installer, as well as the 64 and 32-bit “F6” floppy driver packages, because it seems Intel can’t be trusted to keep old versions of their drivers easily available.

 

Missing shutdown button – lightdm-unity-greeter

By , 2012-02-02 15:13

Found the problem! Your log says ‘/usr/lib/indicators3/6/libsession.so does not exist.’ That file is part of the ‘indicator-session’ package, which provides the shutdown buttons for Unity and Lightdm.

via AUR en – lightdm-unity-greeter.

Windows 98, 14 years later

By , 2012-01-28 01:49

I had an old ThinkPad lying around that is in perfect working condition, but all but useless running any modern Linux, and a little sluggish running Windows XP. This is strange, since it’s a Pentium 4 M 2GHz with 256MB of RAM and 16MB ATI AGP4x graphics, which should be enough for XP or Linux.

Anyway, I went over to the Lenovo/IBM support site looking to see if perchance there were any driver updates, when I noticed that this particular model (R32 2658) seemed to have full hardware driver support for Windows 98. Had a few hours to spare, so I decided to try and get some retro computing going.

First step was to get installation media. I’m not sure where I stashed my old Win98 CD, but fortunately I made ISO images of all my Windows OS discs and saved the product keys in a handy text file. So I burned a fresh copy of Windows 98, booted it up on the laptop, and I was off to the races. (Flash back to 10+ years ago, this would have been slightly more complex, without fast CD writers and proper BIOS CD-ROM boot support on older machines.) I went through the first stages of the installer, taking great pleasure in selecting EVERY installable option because I could fit it all and more on my massive 10GB partition on the laptop’s ridiculously immense 30GB hard drive.

Once that was done, I was greeted with a beautiful 16-colour, 640×480 display, no audio and no network connectivity. Awesome. No problem though, just hop on another computer, download the drivers to a USB drive, then install them on the laptop. Wrong! Good ol’ 98 has no USB mass storage support so that’s not possible. Thinking back to the turn of the century (yes, TURN OF THE CENTURY. we can say that.) the logical step would have been to bring out the ever-useful-but-hated 3.5″ floppy disk. Oh but wait, our dear late Steven P. Jobs helped start the “Legacy-free PC” trend, which means that none of my computers has a floppy drive. I could burn all the drivers on a CD, but that would be a waste of blank media. Staring at my coffee table in search of inspiration, I noticed a D-Link driver CD-ROM I had been using as a coaster. It was the driver for a Cardbus 10/100 Ethernet card. Perfect. Just connect the Cardbus NIC, install drivers from the CD, then download everything else directly via wired network.

Anyway, I’m too lazy to write the rest of the install process up, and nobody would read it anyway, so here are some links to useful tools and info for running Windows 98  today.

http://thewichitacomputerguy.com/blog/standard-tcpip-port-missing-windows-98

http://www.phoenixnetworks.net/atheros.php

http://support.lenovo.com

http://kernelex.sourceforge.net/

http://exuberant.ms11.net/98sesp.html

http://www.technical-assistance.co.uk/kb/usbmsd98.php

http://www.troubleshooters.com/linux/win9x_samba.htm

 

Note: Yes, I know, not technically 14 years later, seeing as it’s Win98SE.

XBMC on Ubuntu clean install

By , 2012-01-14 17:22

Note to self: Always install ubuntu-restricted-extras first. Without it, XBMC will crash when playing MP3s since libmad is missing.

Ubuntu. TV for human beings. I gotta feeling.

By , 2012-01-12 14:14

So Ubuntu is getting into the TV business. If they can pull it off, and get into Cable/Satellite/IPTV STBs, the would would be a much better place. This looks way better than Microsoft Mediaroom or any proprietary cable box software I’ve seen.

Now, is it just me or does that video sound a lot like this one?

I have to say, I gotta feeling that Canonical might have got it right. Unfortunately, past experience says Big Telecom isn’t very interested in what’s good for the customer.

more at

http://www.ubuntu.com/tv
http://www.theverge.com/2012/1/10/2697982/interview-ubuntu-tv-pete-goodall

Remove the Open File Security Warning in XP | vNate

By , 2012-01-06 15:58

Remove the Open File Security Warning in XP | vNate.

A concise tutorial on how to disable the annoying “Open File – Security Warning” popup and associated time delay/latency in Windows XP SP2 and higher.

How to remove restrictions/password from a PDF

By , 2011-12-24 19:04

Adobe Acrobat PDF documents have a nice feature which allows content authors to restrict certain features or “encrypt” the document using a password. These can all be easily bypassed using the open-source Ghostscript:

gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=unencrypted.pdf -c .setpdfwrite -f encrypted.pdf

Source : http://www.cyberciti.biz/faq/removing-password-from-pdf-on-linux/

Why I use Debian and Ubuntu (Apt)

By , 2011-12-21 10:35

OK, rant time.

Way back in the day (I mean 2001 or so), I used to use rpm-based distros. Red Hat, Mandriva – or rather Mandrake- and they worked fine. As long as you didn’t have to install any packages. To be fair, this was in the early days of package managers and the like, and I was a novice Linux user at the time. Mandrake had put in a good effort with urpmi, but I still had to visit sites like http://rpm.pbone.net/ and http://rpmfind.net/ very often to find this or that package.

Then, in 2004/2005, I discovered Ubuntu. (The OS, not the philosophy. Ha ha.) It was a world of difference. Need a program? apt-get install program would automagically fetch and install it for you. Don’t know the name of the package, or exactly what you’re looking for? apt-cache search can help. If that package you want installed has dependencies, and those have dependencies? No problem, everything gets pulled in and the proposed changes are listed for you. The other advantage was that seemingly any program I could possibly want was available in a Debian/Ubuntu repo.

Fast forward to today. I’ve pretty much been using Debian based distros since then, although I have tried Arch and Slax, and possibly many others that I can’t remember right now. All my servers run either Debian or Ubuntu Server, and my Linux PCs are Ubuntu or Arch. Package management has become so easy that I rarely ever have to worry about it, unless I’m trying to make some major changes outside of repo packages.

Recently, however, I’ve started using some RPM distros again, to see how things have been on that side of the fence. It’s been mostly CentOS and a few CentOS/PBX distros (Elastix, Trixbox, pbxinaflash…). I have to say though, I can’t believe the state of the package management system. CentOS has got yum, which seems to be good in principle, but somehow I’ve seen it massively fail in ways that Apt never has for me. The first issue is not really to do with the package manager, but more the repositories.

For example, we had a service on a server at work that absolutely required “Arial”. In Ubuntu or Debian, all you have to do is enable the non-free repo, or an Arch, use one of the excellent AUR frontends such as yaourt. Then install msttcorefonts (Debian) or ttf-ms-fonts (Arch). The package manager will fetch the MS fonts package and its dependency, cabextract. It then downloads each of the fonts’ self-extracting EXEs from sourceforge, cabextracts them, then installs them to the appropriate fonts directory. Now, on the CentOS 5 server, no such luck.

$ yum install msttcorefonts
Loaded plugins: downloadonly, fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.mirror.nexicom.net
 * extras: centos.mirror.nexicom.net
 * updates: centos.mirror.nexicom.net
Excluding Packages from CentOS-5 - Addons
Finished
Excluding Packages from CentOS-5 - Base
Finished
Excluding Packages from CentOS-5 - Extras
Finished
Excluding Packages from CentOS-5 - Updates
Finished
Setting up Install Process
No package msttcorefonts available.
Nothing to do
$

Awesome. Time to break out the manual package manager, AKA Google. Which brings me to the corefonts sourceforge project homepage, fortunately with clear instructions on how to install on an rpm-based system.

  1. Make sure you have the following rpm-packages installed from from your favourite distribution. Any version should do.
    • rpm-build
    • wget
    • A package that provides the ttmkfdir utility. For example
      • For Fedora Core and Red Hat Enterprise Linux 4, ttmkfdir
      • For old redhat releases, XFree86-font-utils
      • For mandrake-8.2, freetype-tools
  2. Install the cabextract utility. For users of Fedora Core it is available from extras. Others may want to compile it themselves from source, or download the source rpm from fedora extras and rebuild.
  3. Download the latest msttcorefonts spec file from here
  4. If you haven’t done so already, set up an rpm build environment in your home directory. You can to this by adding the line %_topdir %(echo $HOME)/rpmbuild to your $HOME/.rpmmacros and create the directories $HOME/rpmbuild/BUILD and $HOME/rpmbuild/RPMS/noarch
  5. Build the binary rpm with this command:
    $ rpmbuild -bb msttcorefonts-2.0-1.spec

    This will download the fonts from a Sourcforge mirror (about 8 megs) and repackage them so that they can be easily installed.

  6. Install the newly built rpm using the following command (you will need to be root):
    # rpm -ivh $HOME/rpmbuild/RPMS/noarch/msttcorefonts-2.0-1.noarch.rpm

Sounds like fun. Let’s try and see if we’re lucky.

yum install wget rpm-build cabextract

Cool! rpm-build was installed! but wait, how about wget and cabextract? It didn’t mention those!

wget is probably installed, but let’s try anyway:

$ wget
wget: missing URL
Usage: wget [OPTION]... [URL]...

Try `wget --help' for more options.

OK, how about cabextract?

$ cabextract
sh: cabextract: command not found

Well then, that’s wonderful. Thanks for mentioning that you didn’t install cabextract, yum.

Fortunately the good people at corefonts provided a link to the download for cabextract, and fortunately, my server is i386 (I know it doesn’t seem like it from the screenshot), so I can use the pre-built RPM. (For those who need it, the x86_64 package) Now to the final step.

$ wget -O - http://corefonts.sourceforge.net/msttcorefonts-2.0-1.spec | rpm -bb msttcorefonts-2.0-1.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.77304
+ umask 022+ cd /usr/src/redhat/BUILD

[… a hundred or so lines…]

Wrote: /usr/src/redhat/RPMS/noarch/msttcorefonts-2.0-1.noarch.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.22861
+ umask 022
+ cd /usr/src/redhat/BUILD
+ '[' /var/tmp/msttcorefonts-root '!=' / ']'
+ rm -rf /var/tmp/msttcorefonts-root
+ exit 0

Phew, that’s a lot of output. Well exit 0, that’s good. Aaand “Wrote: /usr/src/redhat/RPMS/noarch/msttcorefonts-2.0-1.noarch.rpm”. cool!

And finally:

$ rpm -ivh /usr/src/redhat/RPMS/noarch/msttcorefonts-2.0-1.noarch.rpm
Preparing...                ########################################### [100%]
   1:msttcorefonts          ########################################### [100%]
$

(Another thing that bugs me – no success message! After all that, not even a Yay! Package installed!? I’m disappointed, rpm.)

For illustrative purposes, Debian:

# apt-get install msttcorefonts
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  cabextract ttf-liberation ttf-mscorefonts-installer
The following NEW packages will be installed:
  cabextract msttcorefonts ttf-liberation ttf-mscorefonts-installer
0 upgraded, 4 newly installed, 0 to remove and 4 not upgraded.
Need to get 1103kB of archives.
After this operation, 2109kB of additional disk space will be used.
Do you want to continue [Y/n]? Y

[…]

All fonts downloaded and installed.
Updating fontconfig cache for /usr/share/fonts/truetype/msttcorefonts
Setting up msttcorefonts (2.7) ...
Setting up ttf-liberation (1.04.93-1) ...
Updating fontconfig cache for /usr/share/fonts/truetype/ttf-liberation

Wasn’t that easier? Also, a nice plain English message saying what was done: “All fonts downloaded and installed.” Take notes, rpm.

For completeness’ sake, Arch:

$ yaourt -S ttf-ms-fonts

==> Downloading ttf-ms-fonts PKGBUILD from AUR...
x PKGBUILD
x ttf-ms-fonts.install
x LICENSE

[…]

==> ttf-ms-fonts dependencies:
 - fontconfig (already installed)
 - xorg-fonts-encodings (already installed)
 - xorg-font-utils (already installed)
 - cabextract (package found)

[…]

Targets (1): ttf-ms-fonts-2.0-8

Total Download Size:    0.00 MB
Total Installed Size:   5.49 MB

Proceed with installation? [Y/n]
(1/1) checking package integrity                                         [########################################] 100%
(1/1) checking for file conflicts                                        [########################################] 100%
(1/1) installing ttf-ms-fonts                                            [########################################] 100%
Updating font cache... done.
$

A bit more user interaction, but that’s the point of Arch.

So, to summarize:

Arch/Debian package management > rpm package management (CentOS).

And that’s the end of my rant for today.

Custom theme by me. Based on Panorama by Themocracy