Active Topics

 


Reply
Thread Tools
meshsmooth's Avatar
Posts: 32 | Thanked: 2 times | Joined on Oct 2005 @ australia
#1
I went to http://www.bleb.org/software/770/#vim and installed vim then i run the long command
LD_LIBRARY_PATH=/var/lib/install/usr/lib /var/lib/install/usr/bin/vim
to start it. But how do I just run a short comand like $ vim to get it started?

Usage
As the default PATH does not include /var/lib/install/usr/bin (the Application Installer installs packages under /var/lib/install), the command to start vim is:

LD_LIBRARY_PATH=/var/lib/install/usr/lib /var/lib/install/usr/bin/vim

This can be improved by adding PATH and LD_LIBRARY_PATH exports to /home/user/.profile and then typing sh --login after starting the X Terminal.
I have installed VIM i can run the long command
The .profiles file dose not exist, do i create it? How do i format this .profiles file

Help on this will make editing much easier.
 
gnuite's Avatar
Posts: 1,245 | Thanked: 421 times | Joined on Dec 2005
#2
If you have root access, it's easier to edit /etc/profile, since that affects all users. Otherwise, use that file as an example for creating ~/.profile.

gnuite
 
meshsmooth's Avatar
Posts: 32 | Thanked: 2 times | Joined on Oct 2005 @ australia
#3
OK i have worked it out!

cd to the directory /bin
start vi with the long comand $ LD_LIBRARY_PATH=/var/lib/install/usr/lib /var/lib/install/usr/bin/vim
paste that command into vi
then save the file as “vim” by hitting escape and then :w vim
exit out of vim :q
then make that file executable $ chmod a+x vim


$ cd /bin
$ LD_LIBRARY_PATH=/var/lib/install/usr/lib /var/lib/install/usr/bin/vim
paste that command into vi
esc
:w vim
:q
$ chmod a+x vim
then you can start vim just by typing vim

if there is a less confusing way of explaining that go rite ahead and suggest it.

Last edited by meshsmooth; 2005-12-21 at 04:46.
 
Posts: 8 | Thanked: 1 time | Joined on Dec 2005
#4
i like your idea of writing a script... I'm admittedly a nix noob, but another script i found useful to write was auto move all .desktop files from the extras dir to the main location
 
Posts: 45 | Thanked: 1 time | Joined on Dec 2005
#5
Hey, speaking of VIM... I got it installed, but I couldn't get the carriage return to work. Instead, it inserted a capital "M" and maybe a couple of other garbage characters. I couldn't find a way to remap it with stty. It made it pretty hard to edit any files longer than one line. Anyone have better luck? I installed vim using the gainroot method.
 
aflegg's Avatar
Posts: 1,463 | Thanked: 81 times | Joined on Oct 2005 @ UK
#6
Hi,

In terms of the 'vi' script in /bin, it'd be better if it read:

Code:
#!/bin/sh
LD_LIBRARY_PATH=/var/lib/install/usr/lib:$LD_LIBRARY_PATH exec /var/lib/install/usr/bin/vim "$@"
This'll ensure you can type vi foo.html and edit the foo.html file.

As for the problem with pressing enter, this only happens in insert mode, but is a pain. I've seen it on desktop systems as well, but haven't yet worked out how to fix it. Something TERM related, probably.

Cheers,

Andrew
 
meshsmooth's Avatar
Posts: 32 | Thanked: 2 times | Joined on Oct 2005 @ australia
#7
I have installed bash but cant find where it intalled to and how to get it started. Will I need to run Xterm to start bash? also is there an equivelent file to the .bashrc file? for xterm?

By the way, Xterm is a memory hog for such a low level app what is with that?

anybody concidering the uses of rSync?

Last edited by meshsmooth; 2005-12-21 at 11:57.
 
Posts: 211 | Thanked: 3 times | Joined on Oct 2005
#8
Originally Posted by meshsmooth
OK i have worked it out!

cd to the directory /bin
start vi with the long comand $ LD_LIBRARY_PATH=/var/lib/install/usr/lib /var/lib/install/usr/bin/vim
paste that command into vi
then save the file as “vim” by hitting escape and then :w vim
exit out of vim :q
then make that file executable $ chmod a+x vim




then you can start vim just by typing vim

if there is a less confusing way of explaining that go rite ahead and suggest it.
Do you also need to add /home/user to your path? That way, wherever you are, typing vim executes that script.
 
meshsmooth's Avatar
Posts: 32 | Thanked: 2 times | Joined on Oct 2005 @ australia
#9
my way requires root acess and i would recomend using aflegg's code to be inserted instaid.

Get root acess then copy all this text in one go and paste it into Xterm and it will do half of the steps

Code:
cd /bin/
LD_LIBRARY_PATH=/var/lib/install/usr/lib /var/lib/install/usr/bin/vim
i#!/bin/sh
LD_LIBRARY_PATH=/var/lib/install/usr/lib:$LD_LIBRARY_PATH exec /var/lib/install/usr/bin/vim "$@"
now your in VIM so now hit the escape key on your nokia 770 and type or paste the text
Code:
:w vim
:q
and your done

I dont know if what i have done is "the way to do it" but it works everywere. If some Linux guru will come along and tell us how to do it, and in an idiot proof kind of way, well good do it there way. But untill then us linux stumblers have this way to do it.

That is what i am a "Linux Stumbler"

Last edited by meshsmooth; 2005-12-21 at 13:58.
 
Posts: 16 | Thanked: 25 times | Joined on Dec 2005
#10
No root access is needed. Save this:
export PATH=$PATH:/var/lib/install/usr/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/var/lib/install/usr/lib
as "~/.profile".
MAKE SURE YOU GET THE TOP LINE RIGHT OR YOU WILL HAVE TO REFLASH YOUR 770. (Don't screw up your PATH.)
Then reboot the 770, and any programs you install are in the PATH, including vim. Much better approach, because you don't have to write a script for every program you want to use.
 
Reply


 
Forum Jump


All times are GMT. The time now is 15:41.