Install Script for SynapticForum: DSL Ideas and Suggestions Topic: Install Script for Synaptic started by: cbagger01 Posted by cbagger01 on Dec. 27 2003,05:11
Hi All,Below you will find an install script for Synaptic, the Easy-to-use package management program (apt-get interface) for Debian-based Linux systems like Damn Small Linux. You can use Synaptic to easily install over 8,000 new programs from the Internet. While Synaptic is a great program to have if you are using a Hard Disk installed version of DSL, this script has one additional really cool feature: If you have enough RAM (in my case, 256MB. But I think it will also work with computers that only have 128MB), this install script will allow you to temporarily install new programs into the RAMDISK when you are running DSL from the LiveCD. This means that with a fast internet connection, you can quickly install those programs that you want but are not included with the base install CD. For example, if you need LinNeighborhood, or if you want your old Nedit program back, just select it from the menu and push the PROCEED button. It's also a great way to try out some of the available programs without messing up your hard disk installed OS. Instead, just run DSL from the live CD and install the programs to RAMDISK. If you mess up your RAMDISK, who cares? Just reboot the computer and start over. To use the script, do the following. Copy the text below and paste it into a word processor like scite or nano. Then save the file as .start_synaptic Note the dot "." in front of the word start. Then make the file executable by opening an Xterminal (rxvt) window and type: chmod 755 .start_synaptic Finally, to run the script, type in: ./.start_synaptic on a blank line inside the Xterminal (rxvt) window. Good Luck. Here is the script text that you need to copy:
Posted by chuck54 on Dec. 29 2003,19:17
It took me a while to cut and paste this using dillo, so heres a separate file. try wget < http://www.moatfarm.org/start_synaptic.txt > Thanks for the script cbagger. Maybe it will be included in a future version? (-maybe it already is, im still on 4.1 But it works great.-) Posted by cbagger01 on Dec. 29 2003,20:25
chuck54,Thank you for putting a text version of the script out there for people to grab. Unfortunately, in your text file it appears that double lines were pasted into the text file below the "# Restart the xtdesktop icons if needed" section. The "then" command line appears twice. I did not check the entire script for additional syntax errors, but that one jumped out at me when I read it. Posted by chuck54 on Dec. 29 2003,21:20
The file www.moatfarm.com/start_synaptic.txt is updated now. If you downloaded it before 8:09pm GMT on the 29th of december, it is broken as cbagger said. Sorry if that caused any one any trouble.head wall contact Posted by clivesay on Jan. 05 2004,00:38
All - Beginner alert!When I type ./ .start_synaptic I get bash: ./: is a directory Can you help? Thanks Chris Posted by cbagger01 on Jan. 05 2004,00:46
Do not put a space between the "./" and the ".start_synaptic"It should be one command without any spaces. IE: ./.start_synaptic Posted by clivesay on Jan. 05 2004,03:31
Thanks cbagger01.I made a silly mistake. Now when I type it in I get :bad interpreter: no such file or directory I must be doing something stupid but I can't figure it out. Can anyone help me? Thanks BTW: when I type the command the line begins with root@box:~# Is this OK? Posted by cbagger01 on Jan. 05 2004,05:31
clivesay,The script was originally meant to be run from the default user location (/home/damnsmall/.start_synaptic) and run under the default user account 'damnsmall' Try copying the script file over to the /home/damnsmall directory and running it from there. IE: root@box:~# cp .start_synaptic /home/damnsmall root@box:~# cd /home/damnsmall root@box:~# ./.start_synaptic In the future, I need to rewrite the script so that it can be run from any user's home directory. But this should work for the moment. Good Luck. Posted by cbagger01 on Feb. 29 2004,08:43
Hi again.Due to the changes in DSL 0.6.x, I needed to make several changes to the .start_synaptic script. The 'ln' command works differently in busybox, so that needed to change. Also, DSL version 0.6+ uses a version of apt that is incompatible with synaptic 0.16, so I added some lines to downgrade the version of apt so that it will work with synaptic (apt version 0.5.4). The script installation instructions above are still valid. Here it is:
Posted by hasty on Feb. 29 2004,10:58
Thanks CB.Just installed 6.1 yesterday and stalled at synaptic. Glad I spotted your posting (I'm supposed to be doing my accounts today but Dels just posted a remastering how-to....and I'm very tempted) Posted by Rapidweather on Feb. 29 2004,20:36
I ran it too, and it worked fine. Then after hours of browsing through all the packages, I decided to try the Window Manager asclassic.It ran, I just put it in .xinitrc and restarted the wm. Found a .steprc on the net that mostly worked with my version. Nothing like FVWM, of course. Had problems deciding what to put in my filetool.lst to get everything backed up, and once I did that, had a big tarball, l8 MB, vs my 10 MB to start with. --- Tried to restore, and it ran into problems, read only filesystem, etc. Good thing I had saved my old tarball, so now I am quickly up and running. --- Perhaps I'll try that remastering script. Posted by cbagger01 on Mar. 01 2004,02:03
Rapidweather,Try doing your restore AFTER you re-run the Synaptic install script. The first part of the install script creates a read/write directory structure that contains a bunch of symlinks back to the original read-only files. Once the writeable directory structure is created, you may be able to successfully restore your tarball. Another option would be to save the apt cache with your filetool/lst and use these cache files to quickly rebuild your system using an apt-get or dpkg script. It is easier to keep track of the files stored in your cache as opposed to the dozens of files that get scattered all over different system directories during a typical program's installation. Good Luck. Posted by cpr on Mar. 04 2004,04:00
I tried it a couple time and well it does work at all. i receive a you have a bad interpreter caution.i used both 6 and 6.1 my gear is a p4 with 512 ram what is wrong. should i be root. Posted by cbagger01 on Mar. 05 2004,04:06
You should run the script in location /home/damnsmall/.start_synapticAnd it should be run as the non-root user (IE: username 'damnsmall) Posted by charpie on Mar. 05 2004,05:38
Thks cbagger. Pretty sure I tried this, but I may have miss a key thing. So in details: I will boot up using my disk, I will open scite, find my script file in txt format, save it with under /home/damnsmall/.start_synaptic then open the terminalchmod 755 .start_synaptic then run the script right there using ./.start_synaptic I will give you some feedback soon!! Cheers!! Posted by charpie on Mar. 06 2004,01:16
Well no joy for me! Could the fact that I am using a dsl connection through a router affect this? If everyone else have success and I don't then I am the problem, I guess Posted by cbagger01 on Mar. 06 2004,18:12
From your post it sounds like you are doing things correctly but it still does not work.In order for the script to work correctly, you must have a good Internet connection up and running. Can you browse to a web site like www.damnsmalllinux.org using Dillo or Links after you boot up? Also, does the "Got the Bandwidth" Firefox install script work for you? Posted by charpie on Mar. 06 2004,19:41
Yes it does for both questions. I have a dsl high speed connection that works pretty good. I wonder if the fact that initially i copied your script in txt file under window, then using dsl and scite i retrieve this txt file and rename it as indicated. May be it is the problem? I doubt but i will try to extract your script using directly from the forum under dsl..we will see if that makes a difference. cheers. Posted by cbagger01 on Mar. 07 2004,05:48
Did you copy the script dated 2/27/04 and Revision 1?Maybe you are using an old version of the script. You need Revision 1 if you are using DSL 0.6.x Please revert back to Revision 0 if you are using DSL 0.5.3 or older. Good Luck. Posted by charpie on Mar. 07 2004,06:52
ok got it, it worked til the last minute when the system hanged for a while. anyway i will do more testing. maybe the connection was just slow tonight.i copied your script using scite from this forum and now its good. i guess my initial idea to save the script in a window text file and open it with scite did not work. Or something was missing. Posted by cbagger01 on Mar. 07 2004,18:06
My best guess as to the problem was that some text editors have a "word wrap" mode that will take a long command line and "wrap" it into two separate lines so that something like:tar -zxvf daaa.tgz dkg sldkfs hkgh jfgohf jo jhesor heo hesohj tohre ho becomes: tar -zxvf daaa.tgz dkg sldkfs hkgh jfgohf jo jhesor heo hesohj tohre ho and then it will fail. Glad to hear that it is working now. Posted by nucpc on Mar. 09 2004,14:06
cbagger01,Just to say thanks for posting your script....excellent addition to DSL and just what I've been looking for/trying to do myself. I hope it makes the future releases (personally I've re-mastered my own immediately to include it). Cheers. Posted by cbagger01 on Mar. 10 2004,04:43
You're welcome.Someday I'm going to attempt a remaster of DSL and include my scripts inside. Did you encounter any difficulty doing the remaster beyond the standard instructions provided in the "DSL Remaster How-To" that was posted here recently? Posted by nucpc on Mar. 10 2004,13:42
Hi cbagger,Basically I follow most elements of the How-To's but then remaster quickly and crudely in order to keep the size small (and still fit on business card disks)....to get your script in can be very fast... In summary it's something like this; Running from a liveCD (or liveCD toram) and having copied and pasted or downloaded your script; On my free ext2 partition, say /mnt/hda8, I follow existing How-To's and make two folders /source and /newcd. I copy autorun.bat, autorun.inf and index.html into /newcd and then mkdir a /KNOPPIX directory in /newcd. Into /newcd/KNOPPIX I copy boot.cat and boot.img. Then changing into /source I copy /KNOPPIX/* into here.....(all copying is done cp -Rp to preserve all symbolic links etc). So precisely following many How-To's so far (except the above is for 0.6.+, for earlier versions there's no autorun.* files etc to copy into /newcd).... Now though all I do is go through /mnt/hda8/source and copy in manually anything I want, like say your script. So no `chroot'ing, or mounting /proc or re-installing dpkg etc. For your script I would `cd' to /mnt/hda8/source/home/damnsmall/ and cp /home/damnsmall/.start_synaptic start_synaptic i.e. copy and rename it without the `.' (if you hide it it'll just be ignored). When I'm later running live with my remastering I'll need to rename it prior to use but that I can live with..... At this point I can also manually copy in anything else I want (but I'll have to know all the associated libraries and depencies). Then its back to /mnt/hda8 and the two `usual' mkisofs strings.... So that's mkisofs -R /mnt/hda8/source | create_compressed_fs - 65536 > /mnt/hda8/newcd/KNOPPIX/KNOPPIX and mkisofs -r -J -b KNOPPIX/boot.img -c KNOPPIX/boot.cat -o myknoppix.iso newcd So why so crudely?? Just a size issue... Proceeding this tedious way I can get, for example, f2c, xmgr, ogle, an old copy of xv and all their libraries onto a new `50' Mb disk (the final .iso is 52Mb on ls -l but still writes to the disk.....winner). So that's ~ 10M more of uncompressed stuff going on....... Little note; f2c and ogle will only work with DSL prior to 0.6 (f2c can be got going with 0.6.+ but needs a bit of hacking round in /usr/lib). So that's how I do mine...........primarily its to get me some useful things when I'm running off network and some un`apt-get'able stuff on my live CD. Crude but effective. As for disk capacity, don't be afraid to explore it, basically if xcdroast says the .iso is still less than 50Mb then my experience is that it'll write (and like I say you can squeeze in 10 MB more of stuff that compresses well). Okay, hope that helps, cheers, nucpc. Posted by nucpc on Mar. 10 2004,14:01
P.S. cbagger01 just to let you know I expect most of thelengthy reply above is fairly obvious to you but I put it out just in case its handy for someone else (partial How-To's are a little annoying). Cheers. Posted by cbagger01 on Mar. 11 2004,04:54
Thanks for the info.Actually, I have never attempted a remaster before and my first attempt will be the similar task of adding a few files to the existing iso, no chroot, etc. In a few weeks when I have more time available I will give it a try. Posted by nucpc on Mar. 11 2004,15:23
Sorry, something I forgot to include in the above; Don't forget to copy over the .bash_profile from /KNOPPIX (onto your new /mnt/hda8/source), it's easily missed in a general `cp'ing of the files..... As for sticking other things on, it's dead easy now with your script to see what libraries are also imported when you apt-get some utilities live... anything that isn't a symbolic link has to go onto your remastering... no more hunting around. Just check the file list on the Debian site, copy the files (forget the documentation), and everything new in /usr/lib ('cept the apt stuff), after a live apt-get with your script and then your new remastering stays small, damn small..... Thanks again. Posted by Delboy on Mar. 18 2004,16:30
Basic newb query:I am keen to try the manual install scripts for Rox-filer and Opera (supplied by Chbagger01) and the Synaptic one too. I can't seem to be able to paste the text from the posts into Nano. I am using Control+C to copy from within Dillo but Control+V doesn't paste the text in. What am I doing wrong please - is there another paste command? Posted by nucpc on Mar. 18 2004,17:46
For the 0.6.+ synaptic script Delboy....at< arthur.ph.man.ac.uk/~pc/dsl.html > I've got a copy of cbagger01's script and you can just `save link as' (and then follow the rest of the chmod and renaming instructions) Posted by cbagger01 on Mar. 19 2004,00:05
Try using the Linux cut and paste functionality:Go to the first program and highlight all of the text that you wish to copy. Then go to the second program and press the middle mouse button to Paste in your text. If you have a 3 button mouse, the middle mouse button is obvious. If you have a scroll whell mouse, if you push DOWN on the wheel, it will act as a middle mouse button click. If you have a two button mouse and "3 button emulation" is on, push down on your left and right buttons AT THE SAME TIME to simulate the pressing of the middle button. Good Luck. Posted by l0st on Mar. 21 2004,09:04
Excellent scriptJohn can GREATLY enhance damn small linux with this script included in the new version! Posted by BillH on April 01 2004,09:10
Yep, revised script works well with DSL 0.6.2. Thanks much for that. I have it in my filetool.lst on my USB stick already. Add my vote for including it in DSL 0.6.3!
Posted by dslfool on April 01 2004,21:06
Cappy,Thanks for your hard work and clear posts - you've made a lot of DSL users happy! I had (inappropriately) posted a question re apt-get errors with Synaptic on the "loving it!" post in User Feedback. Thanks for your response - I read the thread and still have a couple of questions which I'll follow up with here: 1) I'm running DSL 0.6.2 from a hard drive rather than CD - will the script still work in this case? (I see the commands to create writable directories in the RAM Disk, but I don't know Linux well enough to know what would happen here.) 2) If the script downgrades apt and I'm running DSL from a HD: - is the apt downgrade written to the HD? - will it "break" other -gets which want a later apt? - if so, can apt be easily upgraded? (Sorry, I know my newbieness is showing like mad here.) Posted by cbagger01 on April 02 2004,00:23
1) Yes2) Yes No - Only if you installed another "Synaptic"-like package manager. Yes Posted by dslfool on April 02 2004,02:30
Awesome. Many, many thanks again.
Posted by dslfool on April 04 2004,11:00
I'm making serious progress: the USB flash drive is mountable and the Synaptic install script works great!I've been experimenting and poring over threads on this forum but I'm confused about the extent to which I can back up and restore to the USB flash drive. Question: It it feasible in general to install and back up entire apps when running DSL live from CD, then restore and run them in future DSL sessions? I've installing apps and adding their relevant directories to filetool.lst, but when I try to restore I run into read-only issues with directories like /usr. I'm using a dialup connection, so installing Synaptic and other apps every session is kinda too slow to be useful. Am I missing something or does DSL live from CD just not lend itself to backing up and restoring entire apps? Posted by cbagger01 on April 04 2004,21:05
I know of two ways to back up applications that you have installed via the Synpatic script:1) Do your backup. Reboot DSL (without automatic restore). Run "Install Synaptic" script (what is needed is the "Creating writable file system" part of the script). Then do your restore. You will need to back up every individual file that is needed by your programs. 2) Instead of backing up your "already installed" applications from the /usr tree, back up the *.deb package files that are stored in your /var/cache/apt/archives directory. When you reboot, run the Install Synaptic script. Then run a script to reinstall your packages. Something like:
Don't forget to run these commands as root, so you need to do an "sudo su" before executing them. Good Luck. Posted by dslfool on April 04 2004,21:50
Very cool - I'll give that a try! Thanks.
Posted by roberts on April 06 2004,23:32
What are the memory requirements to run on liveCD ? I had read that it was 256MB. I am trying to run it on a 256MB machine. I have 193MB free on /ramdisk and 31,727 i-nodes. However, I get no space left on device. The system is then un-responsive? I know many people have newer machines and 512MB seems to be the new standard, thanks to Microsoft's bloatware. But I am trying to determine the base requirments for liveCD.
Posted by roberts on April 07 2004,01:40
OK. It seems to be over running the root directory. That is why system becomes unresponsive. Because it was unresponsive is why I couldn't tell that is what is happening. Seems to be a problem how /var/lib/dpkg is being handled. These posts that are successful must be on hard drive installed systems.
Posted by cbagger01 on April 07 2004,17:21
roberts,You should be able to run the script from the /home/damsmall directory as user 'damnsmall' It should work properly from there although I have not used it recently so I will need to check again when I am home. The last test I did was running from the DSL 0.6.1 liveCD and a Pentium III with 256MB of RAM. Posted by cbagger01 on April 08 2004,05:50
Roberts,I tried the script with DSL 0.6.2 running from livecd and it installed synaptic correctly. I was then able to use Synaptic to install xpat2. Are you using the Rev 1 version of the script dated 2/27/04? The original rev will only work with versions of DSL that are 0.5.3.1 or older. Posted by roberts on April 08 2004,06:39
Cbagger,I have identified the issue. Since this does not effect the current releases of DSL I am going to take this discussion off-line. Robert Posted by Rapidweather on April 10 2004,21:25
I'm going to try Synaptic again to get some applications to place in my remaster.I am running DSL 0.6.2, remastered to include Firefox and Wvdial, and I need some more applications to test the method for getting them in my remaster. I'm just over 60 MB now, and have a nice welcome screen with images made in Gimp (Mandrake 8). At least I will place the script in the remaster, so I will have it to work with. --- I'll get back here if I have any success with Synaptic. Posted by cbagger01 on April 15 2004,02:52
All,Below is the latest revision of the .start_synaptic script. Based on tests performed by roberts, a change was needed in order to make it work with DSL version 0.6.3. Also, a RAMdisk size check was added to the program to prevent the LiveCD user from getting a mangled ramdisk. At least 96MB of RAM is required in order to run this script if you are running DSL from LiveCD or as a frugal/poor man's install. Keep in mind that if you only have 96MB of RAM available, you will not be able to use Synaptic to install any large programs. To use the script, do the following. Copy the text below and paste it into a word processor like scite or nano. Then save the file as .start_synaptic in your /home/damnsmall directory. Note the dot "." in front of the word start. Then make the file executable by opening an Xterminal (rxvt) window and type: chmod 755 .start_synaptic Finally, to run the script, type in: ./.start_synaptic on a blank line inside the Xterminal (rxvt) window. Here is the script text that you need to copy:
Posted by Rapidweather on April 15 2004,03:47
Very nice work. I have been using the older script with 0.6.2 in my remastering effort, and have finally gotten the hang of it. --- Since DSL has now gone to 0.6.3, with many nice improvements, I will get busy downloading that, and seeing what I can do with it. --- Posted by nucpc on April 15 2004,17:32
Just to echo the above, thanks for all your efforts cbagger01 - having a newDSL version is great, having one with your script is much much better.... As before I've got a copy on, < http://arthur.ph.man.ac.uk/~pc/dsl.html > which might ease any copy and pasting problems. Posted by Delboy on May 04 2004,13:24
Hear hear! thanks for maintaining this significant enhancement to dsl. Can you possibly explain why I can't get your new 0.63 synaptic script to work. (old laptop, 40MB Ram, dsl V.0.63 hard disk installed as standard option - have tried both multi-user and single user install options) Having done the usual opening and saving of the script (using Scite) into my home/damnsmall/ directory, I go back into bash and get ' Permission denied' when attempting the chmod 755 command.I've tried as user 'damnsmall' and as 'root' - same message. I've since gone back to v0.62 and rerun your v0.62 script which worked perfectly again. Any ideas? Posted by cbagger01 on May 04 2004,16:23
chmod 755 filename_goes_hereshould work as user "damnsmall" if you were running Scite as user "damnsmall". Either way, it should work if you are the "root" user. If you type: ls -al /home/damnsmall/ it should tell you who owns this file. Also, you can try this test to see if it works: Type it in from an Xterminal:
If that doesn't work, try this (Just a hunch):
And then try the test again. Good Luck. Posted by gjhicks on May 05 2004,13:43
Hi,Am keen to install a few extra apps. So used the 'Damn Small Apt Walkthrough' by Grim to run the dpkg-restore routine and then installed the full version of tar from Grim's site. Then I found the posts on the synaptic_start script and (being pretty new at this) thought 'fabulous!' Am using a HD install of 6.3, so copied the relevant script and wrote the .synaptic_start file, CHMOD as instructed. Then tried using the script, lots of stuff was downloaded but got the below errors. Although nowhere near an expert, the errors look pretty fatal. dpkg-deb (subprocess): failed to exec tar: permission denied dpkg-deb: subprocess tar returned error exit status 2 dpkg: error processing /var/cache/apt/archives/libgc1_1%3a3.3.3-6_i386.deb (--unpack : subprocess dpkg-deb -- control returned error exit status 2 Errors were encountered while processing: /var/cache/apt/archives/libgc1_1%3a3.3.3-6_i386.deb E: Sub-process /usr/bin/dpkg returned an error code (1) Same error occurred earlier, while 'processing' apt_0.5.4_i386.deb In the 'parent' Xterm window, the following error occurred lots of times: Glib-WARNING **: g_main_iterate(): main loop already active in another thread I guess this error is a consequence of the errors in the synaptic_start 'child' window? Do the above errors stem from a badly installed tar? Regards, Geoff. Posted by gjhicks on May 05 2004,14:02
Maybe writing that long post caused my brain to actually think!It was a badly installed tar. In several places in these forums there are references to installing a full version of tar by the following: wget < http://grimthing.com/downloads/tar > rm /bin/tar mv tar /bin The above is fine but for us hopeless new linux users, the following is needed to allow tar to actually function: cd /bin chmod 755 tar Aplogies for the long (and boring post) but am new at this stuff. Posted by gjhicks on May 07 2004,08:02
Me again!The synaptic dialog indicates that, for example, the editor 'joe' is installed but when I try to use it is not installed. There are various 'joe' related files in /var/lib/dpkg/info/ but it does not appear to be installed. Also, for example, 'Sylpheed' is installed (as the DSL default) but the synaptic dialog indicates that it is not installed. Why these apparent contradictions? Posted by cbagger01 on May 08 2004,02:30
Two reasons:(1) Some software was probably installed in older versions of DSL and then manually deleted. This would explain why the program is still showing in the Synaptic installed list. Try removing it and then re-installing it in order to download it correctly. (2) Some DSL programs were not installed using the standard Debian apt-get (Aka: Synaptic list) dpkg method. These programs were custom compiled by John and inserted directly into the DSL distro. For example, GLinks and Dillo are both "hacked" versions of the normal Glinks and Dillo. The "hacks" that were added include many helpful features that are not contained in the normal or "official" versions that you can download from the apt-get Synpatic lists. Posted by dukkieduk on May 25 2004,15:30
Hi dsl lovers,I just tested the latest start_synaptic script on the hdd installed version of dsl 0.7, and it worked in 5 seconds!!! Thanks for zriting this script!! Dukkieduk :-) |