Install deb packages in another directory (or equivalent)

112

Solution 1

You can use --root to install packages into another directory, but you can't use most programs from there as most programs look for some files in fixed places (like /etc). The option is there for cases like installing packages into a NFS root for diskless clients.

Maybe you could use something like UnionFS to merge the two file systems.

Solution 2

If you want a simple answer that doesn't make you work your away around the debian package management, just use mount and symlinks. You could mount your external drive using /etc/fstab and have some symlinks that point into that drive. NOTE: You shouldn't blindly symlink, be sure before you change something ;)

A rather save suggestion would be to put your /tmp into a ramfs (which you should be doing anyways on many netbooks with SSD).

Are you sure your programs need the most space on your internal drive? Did you check it using a tool like xdiskusage?

Share:
112

Related videos on Youtube

Ladessa
Author by

Ladessa

Updated on September 17, 2022

Comments

  • Ladessa
    Ladessa almost 2 years

    I'm trying to close a div settings his opacity to 0. But it doesn't work

    Here is my code:

    HTML:

    <div id='divinfo'  style='position:absolute; bottom:2px; right:8px; width:40px; height: 41px; '><img id='divinfo' ontouchstart='openhelp();return false;' src='img/button_settings_inactive.png'></img></div>
    
    
             <div id='janelaConfig' style="display:block; opacity:0.0; height:5px; position:absolute; width:50px; left:100px; top: 175px; background-color:white; padding:20px;">
    
                 <div id="wrapper2">
                     <div id="scroller2">
                         <p>Escolha sua regiao </p>
                         <form id="form1" name="form1" method="post" action="">
                             <label for="txtRegiao"></label>
                             <select name="estado" id="estado" onchange="setCidade(this.SelectedIndex)">
                                 <option name="BR" value="BR">Barueri</option>
                                 <option name="BH" value="BH">Belo Horizonte</option>
                                 <option name="BS" value="BS">Brasilia</option>
                                 <option name="CP" value="CP">Campinas</option>
                                 <option name="CU" value="CU">Cuiaba</option>
                                 <option name="CT" value="CT">Curitiba</option>
                                 <option name="DI" value="DI">Diadema</option>
                                 <option  value="DQ">Duque de Caxias</option>
                                 <option value="FL">Florianopolis</option>
                                 <option value="FO">Fortaleza</option>
                                 <option value="GO">Goiania</option>
                                 <option value="GU">Guarulhos</option>
                                 <option value="PA">Porto Alegre</option>
                                 <option value="OS">Osasco</option>
                                 <option value="RE">Recife</option>
                                 <option value="RJ">Rio de Janeiro</option>
                                 <option value="SS">Salvador</option>
                                 <option value="SA">Santo Andre</option>
                                 <option value="SB">São Bernardo do Campo</option>
                                 <option value="SC">São Caetano do Sul</option>
                                 <option value="SP">São Paulo</option>
                                 <option value="VI">Vitória</option>
                             </select>
                             <p>Audio</p>
                             <select name="audio" id="audio" onchange="setAudio(this.SelectedIndex)">
                                 <option value="on">Ligado</option>
                                 <option value="off">Desligado</option>
                                 <select><br><br><br>
                                     </form>
                         <p>&nbsp;</p>
                     </div>
                     <p>&nbsp;</p>
                     </div>
                 </div>
                    <div id="close"><img id='fechar' ontouchstart='closehelp();return false;' style='display:none; position:absolute; top:10px; right:3px;'  src='img/btn-fechar.png' /></div>
    

    jQuery:

    function closehelp() {
    
        $("#janelaConfig").animate({
            width: "50px",
            height: "5px",
            top: "175px",
            left: "100px",
            opacity: 0.0
    
        }, 250);
        $("#lblStatus").text("");
        $("#fechar").hide();
    
        $("#divinfo").show();
    };
    
    function openhelp() {
    
        $("#janelaConfig").animate({
            width: "82%",
            height: "70%",
            top: "20px",
            left: "8px",
            opacity: 0.9
    
        }, 250, function () {
            $("#fechar").show();
    
        });
    
    };
    
    • Adrenaxus
      Adrenaxus over 11 years
      Opacity will only work in firefox.
    • Ladessa
      Ladessa over 11 years
      but work in mobile app. And work when I set to 1.0, but doesnt work when I reset to 0
    • Ladessa
      Ladessa over 11 years
      I have too tried function closehelp() { $("#janelaConfig").animate({ width: "50px", height: "5px", top : "175px", left : "100px", opacity: 0.0 },250); $("#lblStatus").text(""); $("#fechar").hide(); $("#janelaConfig").hide(); $("#divinfo").show(); };
    • xpy
      xpy over 11 years
      Can we see this live somehow?
    • Ladessa
      Ladessa over 11 years
      When I use .hide, the div hide and appear again
    • Ladessa
      Ladessa over 11 years
      I have created another div and put janelaConfig inside ..It works great
  • cheshirekow
    cheshirekow about 14 years
    Yeah, that's what I figured would be the problem. At first glance, UnionFS looks like it might work very well. I'll see if I can give that a try.
  • cheshirekow
    cheshirekow about 14 years
    So it appears that UnionFS was dropped from ubuntu since Karmic and replaced with unionfs-fuse (a fuse implementation rather than a kernal module). I like the idea of a kernel module better but this seems to be working quite well. This is, at least, exactly what I wanted so thanks for the good answer :).
  • cheshirekow
    cheshirekow about 14 years
    Ok, I'm un-answering this. UnionFS, it seems, is only a half answer. It does mostly what I want, but it appears that you can't unionfs two directories together, and then mount the union to one of the two.. which is what I would need. One way (possibly) to finish the answer would be to do something with a chroot? i.e. create a fakeroot as the union of the roots of each drive, and then chroot into that. Will this work? I don't know how to use chroot.
  • Tobu
    Tobu about 14 years
    aufs2 is what's used for union mounts in ubuntu livecds IIRC.
  • Ladessa
    Ladessa over 11 years
    And I what I want is that the div be invisible
  • xpy
    xpy over 11 years
    I mean, the elements will still be there and will be clickable/selectable.
  • faino
    faino over 11 years
    Good catch, display is a better way to handle it.
  • Ladessa
    Ladessa over 11 years
    function closehelp(){$("#janelaConfig").animate({ width: "50px", height: "5px", top : "175px", left : "100px", opacity: 0.0,display:"none" },250); $("#lblStatus").text(""); $("#fechar").hide(); $("#divinfo").show(); };?
  • James Donnelly
    James Donnelly over 11 years
    Change $(this).hide() to $(this).css('display', 'none'); - does it work with this? If not, could you please show an example as I'm not sure why this wouldn't work otherwise!
  • Ladessa
    Ladessa over 11 years
    Now it works better...the div flash...(disappear and appear again) but It is referenced only where I have posted in my answer...I have no ideia why the div appear again :S