DSL-N / Firefox / Flash / Muse sequencer / Alsa
Topic: DSL-N / Firefox / Flash / Muse sequencer / Alsa
started by: blip
Posted by blip on July 05 2007,10:04Hi
I thought I'd post this here as some of you know I've been trying to get a music sequencer working in both DSL and DSL-N. I've also tried getting Flash working...with firefox.
Firstly I just wanted to report I do have DSL-N working with Flash, and it plays upto date Flash clips ( so it must be flash 9 I am using ). I like DSL-N - personally I think the extra space it takes is worth it. It would be nice if apt-get could work out of the box..I am still reading how to get this going in DSL-N. As I said earlier in another post I like Firefox in DSL-N....it feels more I am used to / like ...not that Firefox in DSL is too different....it's very subtle things ( like the font/look of the program).
I have also got Alsa working and playing audio through my soundblaster ( Juanito take note lol!). Amazing.....finally at last. I wasn't sure if it was working but Mplayer is playing audio through Alsa.
Unfortunately I was very hopeful for getting the music sequencer Muse working with DSL-N ( as I now have Alsa working ). But alas when you try to add a wave file or play any music it locks up. When Alsa isn't selected it plays fine. Any ideas would be greatly appreciated. I've tried changing samplerates and all sorts of things. One thing I haven't tried is trying to get Jack going with Muse....Juanito posted an alsamod.dsl to the DSL-N repository and I will have to see if Jack is included. It could be that Muse is not going to work full stop ( it does the same in both DSL and DSL-N).
So over the past month I have made quite a bit of progress.
Getting an up to date Flash working has made my website viewing much more pleasurable (even though I hate Flash !). Flash 7 is fine for a lot of stuff though if you are using DSL.
Does anyone know of a way to get JWM working in DSL-N? I don't mind Fluxbox but I would like to use Rox filer and it hung with Fluxbox at one point....
Also if I download a .deb file what's the best way of getting this installed as a program with DSL-N please? I know how to use deb2dsl in DSL....do I have to use DSL with this program do make the .dsl extensions?
Posted by Juanito on July 05 2007,11:12
Posted by stupid_idiot on July 05 2007,13:49
Well the best way to get a package onto DSL-N is to have a partition which you can `chroot` into to compile programs. But I can't reasonably expect you to start devoting your hard drive to compiling programs - after all you just want to use them - so the best method happens to be just silly.
So, if we aren't going to compile that package, we need to use precompiled stuff. But let's pause here:
I need to warn you that because DSL-N is so infrequently updated, the software versions are not up-to-date compared to what is in the latest stable release of Debian. As such installing from standard Debian APT repos will inevitably be unreliable. Frequently you will `apt-get install foo`, and then apt-get will download foo and all its dependencies, and finally fail in installation complaining that the version of whichever packages on DSL-N is too old, etc, etc. So there's a good chance that you're wasting your time if you use apt-get.
What I would do is download all the dependencies manually, extract them using `dpkg-deb --extract` (more on this below), remove unneeded files from what I have just extracted, and finally, satisfied, copy the remaining files into where they are supposed to be (see below also).
Here's a quick and dirty run-through:
1. Find out just what the dependencies are:
`apt-cache depends your_package`
Take note of all the entries that being with 'Depends: '. You can ignore all the 'Recommends: ' unless you are sure you want them.
If the dependencies are very many in number, and you can't remember them all, just pipe them to a textfile for reference:
`apt-cache depends your_package > depends.txt`
This is the time to exercise your guesswork as to whether a dependency already exists in DSL-N. If you at the very least know how to use bash's tab-completion, then scan around in the system directories checking to see if a certain lib or other needed thing (well, usually it's only libs - not much else) already exists. For example, if the 'muse' package depends on 'libflac', I'd go hunting around in the system directories for libflac:
(on the bash command-line)
`file /usr/lib/libfl (press TAB)`
`file /usr/lib/libFL (press TAB)` - If you have libflac7, this should turn up a 'libFLAC.so.7.0' file. Also, you see that, strangely, I put `file` before my search - well, this is because bash tab-completion fails in some cases if you use the filepath alone without a preceding command (Even if the file really exists, it doesn't show up when you press TAB!). Notably, this happens when the hint contains capital letters (as in 'libFL..').
You can see that 'libFLAC.so.7.0' corresponds to the name of 'libflac7'.
So, if you didn't already know - You can match the name of library packages to the filename of the library files.
Well, if the lib already exists, you might want to skip downloading that particular deb file later (see below - the part about downloading the debs).
2. Download the needed .debs onto your system.
For this, you can use:
`apt-get --download-only install your_package`
This will download the packages into the apt cache directory in '/var/cache/apt/archives', but will not install them. But apt might refuse to download anything if its dependency checking fails - i.e. it thinks your system isn't ready to accept the package due to wrong versions of existing packages, uninstallable packages, and so on - so it gives up.
In that case, the most sure-fire way to download the dependencies is to use `wget url_of_deb` to get .debs off the Debian servers.
(You had better have a way to find the URLs of packages quickly.
This search plugin for Firefox is a good way to do it:
< here >)
Once you get to the page for a certain package, scroll down to where there is a table listing the various CPU architectures on which the package is supported. Then, click on the 'i386' option. It will go to a page showing a list of mirror URLs where you can download the deb.
What I always do is right-click the URL, select 'Copy Link Location', and then paste it into a terminal for wget to use. (To paste into an xterm, just copy the URL in Firefox, then go to the xterm, and press 'SHIFT-INS'.)
Then, you had better download all the debs you want into the same directory. This is really the only way to get all the files in the debs extracted in the same place, as we'll see later.
So, anyway, I recommend you make a directory and then dump everything inside:
3. Extract all the debs in the current directory (the new directory you just created):
(The `dpkg-deb` command doesn't come with DSL-N, you need to download it from `MyDSL->System->dsl-dpkg.dsl` - if I remember correctly.)
`dpkg-deb --extract foo.deb .`
In this case, we are extracting to '.' (current dir). You can use directories other than the current dir, too, but for this example we'll just be using the current dir.
(NOTE! - For goodness sake DON'T use '/',
i.e. `dpkg-deb --extract foo.deb /`, you will possibly, if not always, overwrite your system directories with what's on the deb, which will kill your system.)
So, `dpkg-deb --extract foo.deb .` - The files in the debs will be extracted using the current directory as the root directory ('/'). So you'll see base directories such as '/usr' or '/etc' appear, with the files from the debs inside.
(Usually it's '/usr' or '/etc'; base dirs like '/bin' or '/lib' or '/sbin' being usually reserved for core system packages.) Now, you can `cd` into ./usr/ and see what's needed and what is not. The most obvious things like 'doc', 'info', and 'man' dirs can be removed immediately (Or you can skip removing them now, and instead simply exclude them when creating the tarball later - it's more safe). In fact, that's about all you can/should remove, usually.
4. Creating the tarball.
Gzipped tarballs are named '*.tar.gz' normally. But DSL's naming convention is to have tarballs named '*.dsl' if they contain files that go into other base directories besides '/opt/' and '/home/dsl/'. In the example below the package (I use muse as an example) has its files in '/usr/', so I name it 'muse.dsl'.
By now, I assume you have used `dpkg-deb` to extract muse and the debs it depends on in the current directory.
(Oh dear, I seem to have skipped a whole section about how to determine which dependencies are really needed and which in fact already exist on DSL - since we are no longer depending on apt-get's dependency resolution to determine this for us.)
(a) Selecting the entire ./usr directory to be tarred up (aka brute-force method) is fast and effective:
The package name is (e.g.) 'muse'.
`tar zcvf muse.dsl --numeric-owner ./usr`
or (b) Pass a list of files for inclusion in the tarball to `tar`, using a textfile.
i. Collate a list of files:
`find ./usr > filelist_name.txt`
ii. Edit the filelist and remove redundant entries as shown below. I am using muse again for this example. I named my filelist 'muse-list.txt':
`editor muse-list.txt` (please use your preferred editor)
And this is (partly) what you see:
The bold entries can be removed because they are redundant - you can easily see why this is so.
For example, for 2 lines like this -
- the second line implies that the first exists.
So, once you've struck out the redundant lines, just do:
`tar zcvf muse.dsl --numeric-owner -T muse-list.txt`
(Yea, the '-T' option is to pass the textfile we're using to `tar`.)
There's not much benefit to this method that I'm aware of, other than saving a very wee bit of space.
5. Loading the tarball (aka extension).
(you have to be user `dsl` to do this)
Or as root, do:
`su dsl mydsl-load muse.dsl` (Yea, impersonate user `dsl`.)
Then, if you know your package contains new shared libraries, you need to do
so that the new libraries are detected and added to the system cache.
Then see if you can run `muse` or similar.
Posted by lucky13 on July 05 2007,15:01
If it's "very many" (or even just "a few") let the computer do the grunt work, especially since you're already on the keyboard. What's a few more letters:
Naturally, you can call the file whatever you want. You can also use (or edit) it to get the dependencies with wget if they're all available in the same repository.
Posted by blip on July 05 2007,15:20Thanks to everyone for explaining that in detail. I'll try that tonight and report back.
Posted by stupid_idiot on July 05 2007,16:34
Thanks lucky, I've made the change in the post above.
Posted by blip on July 06 2007,08:46I was reading that long post Stupid Idiot...what a detailed reply - thank you ! You have all been so helpful to me.
I might try to build/compile a package from scractch in DSL-N ( I should try it for academic purposes to learn more).
This is a difficult question to answer I know...but when I do an apt-get install muse in DSL it seems to grab all the libraries and update things ( I will post below this to give you an idea ). Muse all installs ok ( there aren't any errors ). But Muse doesn't seem to like playing through Alsa. It's a minefield! I am so desperate to get it working.............I wonder if I spend the next week compiling Muse in DSL-N if I get the same results ..it will be very frustrating if I do! I wonder why Mplayer can play fine through Alsa but Muse refuses. Yet Muse works fine without Alsa. Sorry I keep banging on about this topic! It's just almost within my grasp.........
When I did a deb2dsl of Muse and I loaded muse.dsl in DSL-N ( which worked strangely !) I noticed Muse didn't see my Soundblaster as a midiout port....yet Muse in DSL does.....is this because when you install Muse in using apt-get in DSL it upgrades libraries ? I suspect this is what is going on.
Reading Package Lists... Done
Building Dependency Tree... Done
The following extra packages will be installed:
gcc-3.3-base ladcca2 libasound2 libaudio2 libc6 libexpat1 libfluidsynth1
libfontconfig1 libgcc1 libjack0.80.0-0 liblcms1 libmng1 libpng12-0
libqt3c102-mt libreadline4 libsndfile1 libstdc++5 libxcursor1 libxrender1
The following NEW packages will be installed:
ladcca2 libaudio2 libfluidsynth1 libjack0.80.0-0 liblcms1 libmng1
libqt3c102-mt libreadline4 libsndfile1 libxcursor1 libxrender1 muse
The following packages will be upgraded
gcc-3.3-base libasound2 libc6 libexpat1 libfontconfig1 libgcc1 libpng12-0
9 upgraded, 12 newly installed, 0 to remove and 139 not upgraded.
Need to get 12.5MB of archives.
After unpacking 17.9MB of additional disk space will be used.
Do you want to continue? [Y/n]
Here's what it looks like when you do apt-get install muse in DSL:
Posted by jpeters on July 06 2007,17:42When is it necessary to use 'sudo ldconfig'? Just mydsl-intalling isn't sufficient?
Posted by stupid_idiot on July 06 2007,23:55
A: When the extension contains shared libraries besides those already found in DSL. When new shared libraries are added, the linker cache ('/etc/ld.so.cache') has to be updated. `mydsl-load` does not run `sudo ldconfig` everytime it loads an extension because it is rarely needed and takes a long time on slow systems. Generally, extension authors use either static linking or rpath (< http://en.wikipedia.org/wiki/Rpath_(linking) >) to avoid the user having to run `sudo ldconfig`. Generally, you don't have to run `sudo ldconfig` unless it is stated in the .info file.
If you use `deb2dsl` to make a DSL extension, you will, in many cases, need to run `sudo ldconfig`. This is when one or more of the debs you use contain shared libraries - i.e. most of the time, since Debian uses shared libraries exclusively (in order for one shared library to be used by multiple apps), and Debian prohibits the use of rpath (because it can cause serious problems - see < this page > and < this page >). `apt-get` is able to use meta-data in .deb packages to determine if a .deb contains shared libraries. If it does, `apt-get` automatically runs `ldconfig`. However, `mydsl-load` cannot do this when loading extensions made with `deb2dsl`.
Posted by jpeters on July 07 2007,02:21Thanks for all the useful info.