[SOLVED] Trying to follow howto; no /etc/modules file anymore
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Trying to follow howto; no /etc/modules file anymore
I'm trying to follow the guide at http://tldp.org/HOWTO/MIDI-HOWTO-10.html. One of the first things it tells me to do is make some changes to my /etc/modules.conf file. That file no longer exists. I did find a LinuxQuestions post that said that I should make the changes the file suggests to /etc/rc.d/rc.modules, but there's a lot of BASH scripting in there that I don't understand at this point. What should I do?
Code:
For that we need to extend the ALSA section in /etc/modules.conf (or in another location, depending on your distribution) with the following:
# Configure support for OSS /dev/sequencer and
# /dev/music (aka /dev/sequencer2)
# (Takashi Iwai advises that it is unnecessary
# to alias these services beyond the first card, i.e., card 0)
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-8 snd-seq-oss
# Configure card 1 (second card) as a virtual MIDI card
alias sound-slot-1 snd-card-1
alias snd-card-1 snd-virmidi
This document is 15 years old (dated May 2002). I very much doubt that it be still applicable with today's sound systems, at least without much efforts.
All I really want to know is how to use MIDI from scratch in C++. I have Rosegarden that I can play MIDI in, but the program I want to write needs to be able to create and play a MIDI sequence. That's what I need the guide for...
OK. I only have one sound card, so I deleted the two lines for the second card. My file looks like this:
Code:
root@caitlyn:~# cat /etc/rc.d/rc.modules.local
#!/bin/sh
# /etc/rc.d/rc.modules.local
# The Linux kernel source is the best place to look for documentation
# for the many available kernel modules. This can be found under
# /usr/src/linux-$VERSION/Documentation/.
# Almost all necessary modules are automatically loaded when needed,
# but there are a few exceptions. Here's a (not all-inclusive) list,
# so uncomment any of the below entries or add others as needed:
# Note that you could also create/edit rc.modules-$version if you
# only wanted specific modules loaded for particular kernels.
#/sbin/modprobe tun # Universal TUN/TAP device driver
#/sbin/modprobe sg # Generic SCSI support for SATA DVD-RW
#Configure support for OSS /dev/sequencer and
# /dev/music (aka /dev/sequencer2)
# (Takashi Iwai advises that it is unnecessary
# to alias these services beyond the first card, i.e., card 0)
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-8 snd-seq-oss
but when I run it, I get this:
Code:
root@caitlyn:~# /etc/rc.d/rc.modules.local
/etc/rc.d/rc.modules.local: line 22: alias: sound-service-0-1: not found
/etc/rc.d/rc.modules.local: line 22: alias: snd-seq-oss: not found
/etc/rc.d/rc.modules.local: line 23: alias: sound-service-0-8: not found
/etc/rc.d/rc.modules.local: line 23: alias: snd-seq-oss: not found
Now I KNOW that my system has the capability for virtual MIDI, because I've been using it in Rosegarden. I have to issue the following three lines before I can use Rosegarden with MIDI, but otherwise it works for me.
My initial response was "why don't you just load snd-seq-oss?" -- BUT:
The 'alias' bother me, so I looked at a RHEL system people use at Work and I notice on that system there is a file (dist.conf) in Dir /etc/modprobe.d/ that contain statements that start with 'alias'.
So, my guess is you may need to create a file in /etc/modprobe.d/ with those aliases and remove them from /etc/rc.d/rc.modules.local
I would be surprised if you are running OSS under linux in 2017.
@jmccue is correct in that
Code:
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-8 snd-seq-oss
belong in a file in /etc/modprobe.d. See
Code:
man modprobe.d
You use /etc/rc.d/rc.modules.local to manually load modules (in other words, not rely on udevd to do it for you). You use configuration files in /etc/modprobe.d/ to configure those modules or otherwise control the modprobe/insmod/rmmod commands.
It's worth pointing out that most of the old /etc/thingummy.conf files have been replaced by /etc/thingummy.d directories. You create .conf files for individual instances (for example individual kernel modules) and put them in that directory instead of having one big configuration file.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.