DSL-N :: DSL-N / Firefox / Flash / Muse sequencer / Alsa

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?

It would be nice if apt-get could work out of the box
If you use the latest dsl-dpkg extension and create the following directories, I believe apt-get will work (it does for me):

...and I will have to see if Jack is included
There are one/two files named jack in the extension - you might be lucky.

Also if I download a .deb file what's the best way of getting this installed as a program with DSL-N please?
If you search the forums for "dpkg -L" you'll find an explanation on the manual method to make an extension from debs. Looking at the problems you've been having though, maybe it would be better to try and compile the application...

Quote (blip @ July 05 2007,14:04)
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?

Hello blip:

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

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:

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:
`mkdir dir_name`
`wget URLs_of_various_debs`

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).
Just do:
`mydsl-load muse.dsl`
(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
`sudo ldconfig`
so that the new libraries are detected and added to the system cache.
Then see if you can run `muse` or similar.

If the dependencies are very many in number, you might want to write them down / type them down somewhere.

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:
Code Sample
apt-cache depends your_package_name > /home/dsl/my_package_needs_this_crap.txt

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.

Thanks to everyone for explaining that in detail. I'll try that tonight and report back.
Next Page...
original here.