[ Prev ][ Table of Contents ][ Front Page ][ Talkback ][ FAQ ][ Next ]
LINUX GAZETTE
...making Linux just a little more fun!
More 2¢ Tips!
By The Readers of Linux Gazette

See also: The Answer Gang's Knowledge Base and the LG Search Engine


Linux 2.4.18 + via82cxxx_audio + uart401 = no midi?

Fri, 02 Aug 2002 10:13:58 -0600
bgeer (bgeer from xmission.com)
Answers By Robos, Ben Okopnik

Hi Gang,

[Robos] Hi bgeer (not gbeer ;-) ?)

I'm desperate. So far I've researched /usr/src/linux-2.4.18/Documentation/sound/*, HOWTO's, mini-HOWTO's, google, google groups, & posted 2 pleas for help to comp.os.linux.hardware. No help so far.

I recently installed 2.4.18. I've got 99% of the stuff I want/need working including sound, but no midi. wav's & au's play fine, mp3's play [but with a high freq. squeal].

... timidity 2.11.3 & playmidi 2.4 act like they play, but no sound.

[Robos] IIRC I had some probs playing stuff that wasn't the right sample-rate (not midi, mind you), meaning 48kHz did play and 44100 not or other way around. Maybe thats where the problem lies. If noone else here can help you I can recommend debianhelp.org, maybe your last chance ;-)
[Ben] That's very interesting - considering that they use completely different methods and even different devices. "Timidity" actually doesn't use the MIDI system (I don't remember whether it's "/dev/audio" or "/dev/dsp"). You can test these with
cat /etc/motd > /dev/audio
cat /etc/motd > /dev/dsp
This should produce short bursts of noise for each device; if it doesn't, you need to look into why that device isn't working.
BTW, have you looked at your volume settings? Do realize that there are different ones for different devices, and the relevant ones for what you're doing may be turned way down.

lsmod shows:

  via82cxxx_audio        18200   0
  uart401                 6340   0 [via82cxxx_audio]
  ac97_codec              9640   0 [via82cxxx_audio]
  sound                  54764   0 [via82cxxx_audio uart401]
  soundcore               3556   5 [via82cxxx_audio sound]

are loaded & dmesg shows:

  via686a.o version 2.6.3 (20020322)
  Via 686a audio driver 1.9.1
  PCI: Found IRQ 5 for device 00:07.5
  ac97_codec: AC97 Audio codec, id: 0x4943:0x4511 (ICE1232)
  via82cxxx: board #1 at 0xDC00, IRQ 5
  Enabled Via MIDI

where "Enabled Via MIDI" comes from via82cxxx_audio.o after a successful call to probe_uart401() in uart401.o.

[Ben] How about "cat /dev/sndstat"? It's not an indicator of anything special if it says "No such device", but it can be a source of useful info otherwise.

My ma'boards are Epox 8kta2 & Asus K7V. The Asus successfully played a midi using Winblows, tho I hate admitting booting it. My Epox is so far unpoluted by such evil.

Much obliged for any help...Bob


stupid bash tricks #1977 -- programmable completion

Sun, 04 Aug 2002 00:18:57 -0700
Adam Monsen (adamm from wazamatta.com)

If you use bash -- especially tab-completion -- you'll love this feature.

First, see (http://rpm.pbone.net/index.php3?idpa=317091&idpl=317091&stat=4&search=bash-completion). Tarballs and RPMs are available to power up programmable completion for your bash shell.

Once you install the software, try stuff like this ("<TAB>" literally means "hit the tab button"):

$ find -user <TAB><TAB>

$ find -gid <TAB><TAB>

$ rpm -e <TAB><TAB>

$ killall <TAB><TAB>

$ grep --<TAB><TAB>

$ cvs <TAB><TAB>

$ mount <TAB><TAB>

$ kill -<TAB><TAB>

$ kill -HUP <TAB><TAB>

$ ssh adamm@<TAB><TAB>

This last one should work without installing software.

The concept is simple but handy. Completion functions define what arguments are useful to complete certain commands. Enjoy!

-Adam Monsen

I use "bash_completion" and love the thing - after one small fix. :) By default, "ping" (and "fping") complete on the contents of ~/.ssh/known_hosts, which I find a little strange. It should complete on the contents of "/etc/hosts" instead. Fortunately, local definitions (anything in "/etc/bash_completion.d") overrides the defaults, so: -- Ben

See attached ping-complete.bash.txt

Now, life is good. :) (I've also notified the author.) -- Ben


packets

Fri, 26 Jul 2002 01:20:26 -0700 (PDT)
parth mehta (parth_mehta from yahoo.com)
Answers By Pradeep Padala, N N Ashok

hi,

i came to know abt this site from a friend & i need some help of yours.

can u tell me how the data packets are sent from one pc to other in a LAN. in other words about the tcp ip in linux. lastly if u have any code in c or cpp to do this job.

waiting for yuour reply.

parth

[Pradeep] That's quite a broad question. Gurus like Richard Stevens, Douglas E Comer wrote atleast three volumes each on this topic. I suggest you read Richar Stevens' "UNIX Network Programming" book.
If you want to know about socket programming(I guess that's what you mean by c code), there are plenty of articles on web. Google.com is the best place to search. This is one of the articles I found:
http://www.scit.wlv.ac.uk/~jphb/comms/sockets.html
There's a TCP/IP resource list on faqs.org:
http://www.faqs.org/faqs/internet/tcp-ip/resource-list
If you want to learn how TCP/IP implementation in Linux, best way to do is to look through source which can be browsed online at http://lxr.linux.no. Apart from that, the following document can give you some info:
http://www.cs.unh.edu/cnrg/gherrin
[Ashok] You can look at these links (on Kernel Korner in LG) that I found very useful in tracing the journey of a packet in Linux:
http://www.linuxjournal.com/article.php?sid=4852 http://www.linuxjournal.com/article.php?sid=5617
Though the article mentiones packet filter it gives a very good overview of the networking code.


USB sync

Tue, 6 Aug 2002 00:31:27 -0700 (PDT)
Jason Dagit (dagit from engr.orst.edu)
Answers By Ben Okopnik

I found this on the web

[http://www.linuxgazette.com/issue76/lg_tips.html#tips/16] Today, the curiosity bug bit me again, so I poked my nose into the Linux Visor USB mailing list, and - lo and behold - there it was. Seems that the new version of "coldsync", at least the beta, now handles the m125! I downloaded it, configured it, compiled it, made a config file - and... ta-daa! Palm USB synchronization, under Linux.

Life is good. :)

I have an m130, and I can't get it to sync. Can you send me your config file and the version of coldsync you use?

I setup /dev/ttyUSB0 and /dev/ttyUSB1, and put this in my config file:

See attached jason.coldsync-config-that-does-not-work.txt

Which gives the following output:

See attached jason.coldsync-complaints.txt

Any ideas?

Thanks,
Jason

[Ben] I assume that you have "usbcore", "usb-uhci", "usbserial", and "visor" modules loaded, or the equivalent kernel options compiled in - yes? I'm running "coldsync" v2.2.5 my "~/.coldsyncrc" looks like this:

See attached ben.dot-coldsyncrc.txt

Obviously, you'll need to have the appropriate username and userid. Other than that, the only assumption that we're making here is that the 130 works the same way as a 125 - not an unreasonable assumption, but worth checking if things don't work out.

Ok, thanks, I should probably contact the coldsync crew at this point. If I'm doing something wrong then it is a problem with the documentation.

Thanks much,
Jason


Deleted force user account, now no access

Mon, 19 Aug 2002 09:07:44 -0500
Mark Goede (markgoede from centurytel.net)
Answers By Jay R. Ashworth, Matthias Posseldt
We had to get rid of the quoted printable effect, and I had to toss out the HTML attachment. So here's an extra Penny for the tips: http://expita.com/nomime.html lists instructions for turning some of that croft off so you don't waste bits while emailing. -- Heather

Have a public share account for 8 different Win machines connecting to a RH6.2 server.

The samba share for the [public] sectiion listed "force users =ftp"

The ftp account was mistakenly deleted, I recreated the ftp account, but when any user tries to access the executable files in the public share, they get access violations.

Is there something further that I need to setup for user ftp?

Mark Goede

[jra] No, but i'd bet you lunch that you didn't get it re-created with the right UID. Do an ls -l in the directory in question. If you get a bunch of files owned by "#14", that's your problem. I'd just change the number in the passwd file, myself.
My RedHat pw file entry is
ftp:x:14:50:FTP User:/home/ftp:
Cheers.
[Matthias] The UID of the new ftp account has to match the old one. So if you created a new user with useradd ftp and no '-u <nr>" parameter, you have to change either
  1. The UID of the account ftp
  2. The Linux owner of the files in the public share, for instance with "chown ftp.ftp -R /mnt/samba/public/*".
Ciao


AT&T Broadband

Tue, 30 Jul 2002 19:50:59 -0700
Christian Jackson (cjsredvelvet from attbi.com)
Answers By N N Ashok, Faber Fedor
Having an HTML attachment on this added an amazing 140 lines of text I had to snip. Ugh. While this reader originally referred to [LG 77] 2c Tips #8 dhcp (maybe they guessed that DHCP is part of the answer?)... there's really nothing back there specific to AT&T's cablemodems. -- Heather

I have RHL 7.2 on a dual-boot with Win2K running on AT&T Broadband. How do I set up internet connection in RH? I have search various forums and come up with no answer.

Please Help,

Christian

[Ashok] To configure the internet connection in RH...
[Faber] As with most (all?) things Linux, there are a couple of ways to do it. Linuxconf will do it, so will internet-druid. IIRC, there is something on the Control Panel that does that as well.
[Ashok] ...you just have to set the interface connected to your cable modem (say eth0) to use DHCP (AT&T has stopped giving static IP i think).
[Faber] Once you do that and type (as root) "ifdown eth0 ; ifup eth0" (or, since you're a Windows user, you can reboot the machine :-),
[Ashok] I am using RH7.3 as I type this mail with the following config for my eth0 interface which is connected to the cable modem:
[nnashok@ashoknn-gw nnashok]$ cat /etc/sysconfig/network-scripts/ifcfg-eth0

See attached ashok.etc.sysconfig.network-scripts.ifcfg-eth0.txt

[nnashok@ashoknn-gw nnashok]$
But one thing I have not confirmed is if we can directly use Linux before installing the software given by AT&T on Windows. If you have already installed the software and are able to access the net, then above config should work.
[Faber] you then fire up a web broswer, type "http://www.linuzgazette.com" and start reading. :-)


diald

Thu, 1 Aug 2002 19:20:55 -0500
Shane Simmons (regeya from earthlink.net)
Shane is responding to [LG 81] 2c Tips #6 -- Heather

Two other things to check:


Fried MBR

Fri, 9 Aug 2002 11:52:16 -0400
reddy vishal (vishal_saireddy from yahoo.com)
Answers By Ben Okopnik, Heather Stern
For some reason I can't look at this message's subject without wondering whether a fried MBR needs special oil or tastes especially good with garlic. Oh well :) -- Heather
Maybe it goes good with rhubarb. -- Iron

I am a novice linux enthusiast. i had a fried mbr some time back and read your article in linux gazzette. Clearing out the mbr worked fine. I only installed windows 2000 after clearing the mbr.

But i am running into a problem now, when i try to install linux again. I have used RedHat linux 7.2 the first time ( when i damaged the mbr)...

[Ben] The MBR isn't something you can really "damage"; it's just some bytes on the first sector of the HD. Clearing it out pretty much puts paid to the problem; there isn't anything that can be left over to cause later problems.

...and it installed without any problem. But this time, as i try to create the partitions, it is not able to create the partition and pops up a message asking if i want to clear every thing in the hard disk.

I am using a 20GB seagate hard disk. If this problem cant be rectified with the present hard disk, i am willing to install a fresh separate hard disk for linux. it appears that having both windows and linux on the same hard disk is always causing problems. please tell me how to go about installing a second hard disk and loading linux on it, assuming that i already have one hard disk that is currently running windows 2000.

Please advice. I hope i have made my problem clear.

Thanks again.
Vishal

[Ben] I can't really say what the current problem is, since you've given minimum detail here... could I get you to report the exact message that you see? I've never been a particular fan of DiskDruid (the partitioning software used by RedHat's install), and automatically jump to "fdisk" (or "cfdisk", for preference, if it's available) in case of any partitioning problems.
Out of curiosity, do you have any available partitions for your Linux installation? You can't just slap in another OS; if you only have one partition (the one where Wind*ws is installed), then I can see a situation where you would be asked to "clear the hard disk". If you need to shrink your Wind*ws partition to make room for Linux, take a look at FIPS (a quick Net search will bring it up.)
Or use a flavor of Linux that prefers to live in a FAT filesystem - either using UMSDOS or a giant file to be loopback mounted. I believe Phatlinux and BigSlack are likely candidates, but I've never used either, so I can't say more.
Note that FIPS can only tweak FAT filesystems and its author isn't updating it (since he's busy working on a Ph.D), while GNU parted can also tweak ext2, and reiser filesystems. I think it can do ext3, or you might have to turn off the journals first so it's ext2 again. Anyways there's a floppy rescue-disk that contains parted: http://paud.sourceforge.net -- Heather

Thanks Ben and TAG;

I have used fdisk this time for partitioning the free space on the disk and have been able to successfully make partitions and install the OS. Thanks a lot once again.

Vishal

[Ben] You're welcome - glad you found it helpful!


FTP question

Tue, 20 Aug 2002 15:02:40 -0400
Matt_E._Dinger (Matt_E._Dinger from hud.gov)
Question by tag (linux-questions-only@ssc.com)
Answers By Mike "Iron" Orr, Heather Stern

Hi, Matt here. I found your address online while researching a problem. We have had occasional problems with files being corrupted when we FTP them to our test server. The files being corrupted are web files(Cold Fusion). I know some people use the ASCII transfer option and others are usig the binary option. Could the ASCII be the problem? Thanks,

Matt

[Iron] FTP in binary mode transmits the file exaactly as is. FTP in ASCII mode changes the end-of-line characters to what the destination computer expects. (Unix uses the linefeed character, Macintosh uses carriage-return, and Windows uses both.) Use ASCII mode only for plain text files. Any other type of file (.gz, .tar, image, word processor file, etc) must be transferred in binary mode or it will be corrupted beyond usability.
HTML and XML are text-based formats, so ASCII mode should be fine. I don't know whether Cold Fusion uses HTML format or its own format.
If you've corrupted a binary file by transferring it in ASCII mode and there are no backup copies available, you may be able to recover the data by doing your steps exactly in reverse. Go to the computer you ran the FTP program at, start the exact same program, switch to ASCII mode, and do a PUT instead of a GET (or vice versa). That should reverse whatever changes it did.
However, it's not guaranteed, since there might have been stray carriage return or line feed characters which were not initially part of the conversion. You can also use the command line of infozip to pack and then unpack a file to the same effect - handy if you no longer have the originating system around, either. Infozip is the free 'zip' and 'unzip' found in most Linux distros. -- Heather


hmorous rant

Tue, 13 Aug 2002 20:08:55 -0500 (COT)
John Karns (the LG Answer Gang)
Answers By John Karns. Heather Stern, Pradeep Pradala

I just stumbled across a bit humor in the form of a not so scathing, ms rant, for those of us with too much time on our hands:

http://www.antipope.org/charlie/linux/shopper/165.html

Another one from the same author, but about Linux filesystems. I didn't realize there were quite so many choices:

http://www.antipope.org/charlie/linux/shopper/169.html

[Heather] The fellow whose site he's mentioning writes about Linux for the UK Computer Shopper. Here's his index of Linux articles. Note that he only puts them up after the paper edition goes out of print: http://www.antipope.org/charlie/linux/index.html
Of course the articles which are old enough...
[Pradeep] May be not exactly relevant.
The "Advanced filesystem implementor's guide" series at IBM developerworks has great information on filesystems. Part1 is at:
http://www-106.ibm.com/developerworks/linux/library/l-fs.html?dwzone=linux
It's easy to find other parts from the sidebar.

Win2k and squid

Mon, 5 Aug 2002 18:31:09 +0100 (BST)
Thomas Adam (The LG Weekend Mechanic)
This is in reply to (LG 81) Help Wanted #2, http://www.linuxgazette.com/issue81/lg_mail.html#wanted/2
Please note that you DO definitely want to have Access Control Lists (ACLs) enabled on your squid cache. Otherwise a world of web-kiddies will use your site to forcefeed their "get a nickelback when people click our ad on your site" habit, abusing your disk space and bandwidth, and making it look like your proxy is doing the surfing. Don't encourage them. -- Heather

:-) Vikas, I've taken a look at the e-mail that you sent in regarding the problems that you were having when authenticating windows 2000 users via squid.

The errors that you are getting would seem to indicate that your ACL's have not been defined correctly (perhaps due to some syntactical error), or they do not exist. Now there could be a number of reasons for this, and it would be much more helpful to us if you could post us a copy of your "/etc/squid.conf" file, so that I can see exactly what is going on.

How have you configured Samba and WinBind?? I will hopefully be covering Samba in my WM article in the near future -- have you been able to authenticate Windows2000 users on the Linux box for anyother services besides Squid??

Just as a point of interest (and something which was not covered in my article), I see from the very last line of your error log, that you get:

2002/07/15 10:46:23| Squid is already running!
Process ID 9957

Since you already have squid running, I would have suggested that if you had only changed the configuration file, that you simply ran:

squid -k reconfigure

furthermore, if you have to stop the Squid process at anytime, you should always do it via the "/etc/init.d/squid stop" command. To reload the PID, use: "/etc/init.d/squid restart" -- assuming that the squid process is already running. (sorry to digress from your main problem).

I'm sorry if the level of detail is sketchy, but I need more information before I can begin to understand your problem in a little more detail.

Kind Regards,

Thomas Adam


This page edited and maintained by the Editors of Linux Gazette
HTML script maintained by Heather Stern of Starshine Technical Services, http://www.starshine.org/
Copyright © 2002
Copying license http://www.linuxgazette.com/copying.html
Published in Issue 82 of Linux Gazette, September 2002

[ Prev ][ Table of Contents ][ Front Page ][ Talkback ][ FAQ ][ Next ]