This is the old SliTaz forum - Please use the main forum.slitaz.org

What`s wrong with xterm and local bin? (Solved)
  • LexeiiLexeii December 2010
    Create classic hello world:
    tux@slitaz:~$ echo -e "#!/bin/sh\necho \"Hello, world!\"" > /home/tux/.local/bin/hello
    tux@slitaz:~$ cat /home/tux/.local/bin/hello
    #!/bin/sh
    echo "Hello, world!"
    tux@slitaz:~$ hello
    Hello, world!
    tux@slitaz:~$
    Yes, it works! ;-)
    Go to my ~/Downloads/Distro folder and start hello from there:
    tux@slitaz:~$ cd Downloads/Distro/
    tux@slitaz:~/Downloads/Distro$ hello
    Hello, world!
    tux@slitaz:~/Downloads/Distro$
    It works again, good.

    Now, close the xterm, open PCManFM and go to my ~/Downloads/Distro folder. Then press F4 to invoking xterm in this folder. Then try to run hello again:
    tux@slitaz:~/Downloads/Distro$ hello
    -sh: hello: not found
    tux@slitaz:~/Downloads/Distro$
    It`s don't work now, it`s broke. What`s wrong?
  • erniaernia December 2010
    it's a PATH problem, if you launch xterm from pcmanfm it does not launch a login shell, so it does not source /home/$USER/.profile
    you can check the difference doing
    echo $PATH
    from a lxpanel launched xterm and from a pcmanfm xterm
    you may have the desired behavior changing pcmanfn edit > preferences > advanced > terminal from xterm to xterm -ls
  • LexeiiLexeii December 2010
    ernia, thank you a lot for quick and precise workaround!
    But you did a little typo, right is:
    xterm +ls
    I get it from xterm -help after your answer.
  • erniaernia December 2010
    reading this
    fabio@q1s:~$ xterm -h | grep login
    -/+ls turn on/off login shell
    i understand that -ls turn on login shell.
    fiddling with this thing, which makes me curious about it, i find out that probably pcmanfm source the .profile file when you login in slim. i think that being started in daemon mode from openbox at startup it does not source .profile again. if you start the x session with no ~/.local/bin folder and you create it during the session you just need to logout and login again to have the right PATH in pcmanfm shell. was it your case, did you create ~/.local/bin in the same session that produced the error?
    i think that if you make xterm -ls default terminal in pcmanfm it sources .profile and this let you have correct PATH for the rest of the session, it does not matter anymore if it's xterm, xterm -ls or xterm +ls, unless you delete .local/bin.
    hope to get it right now :-)
  • LexeiiLexeii December 2010
    I don't remember exactly, but seems like folder ~/.local/bin appeared after I installed Opera as regular user. I use SliTaz-3.0 frugal (Live-HDD) installation on my Aspire One netbook (win preinstalled, NTFS FS, 1 GiB RAM).

    I raised this question because my RAM is small and I can't install all applications that i want (GIMP, Inkscape, Go-oo etc). When I repack rootfs.gz with tazusb writefs none my RAM divides to 2: one half for current system, and other half for rootfs.gz archive. I can't have rootfs.gz bigger than ~500 MiB. Else, system just hangs while tazusb writefs.

    I have alot of HDD space. Seems like now I can install some packages locally (in user folder) for persistent without growing rootfs.gz size.
    Other decision is full installation (but I should divide my HDD and create ext3 partition, and I don't want to delete existing windows). And another decision is some sort of loop file, like in Puppy (aufs of unionfs plus FS-in-file), but I don't know how I can make this behavior.
  • erniaernia December 2010
    OT
    is it the 521? i'm thinking about buying it, is it true that it performs better than a atom based netbook? the alternative would be asus t101tm, i'm pretty undecided...
  • LexeiiLexeii December 2010
    No :o)
    I have simple Aspire One AOA 150-Bb (model ZG5).

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership

SliTaz Social