Reply
Thread Tools
Posts: 27 | Thanked: 1 time | Joined on Dec 2005 @ Sweden
#21
Originally Posted by Dusty
It works fine. I use it on my 770. You just have to reboot for the .profile to take effect. I can start an xterm, type 'vim', and there it is.
Not for me, the path is reset to the default (/usr/bin:/bin) after reboot. I'm using the Swedish version of the latest flash image, Nokia_770_SE2005_3_2005_51-13. It's a bit annoying having to type 'sh --logiun' or '. /home/user/.profile' at each login.
 
Posts: 27 | Thanked: 1 time | Joined on Dec 2005 @ Sweden
#22
Originally Posted by Simon
Maybe this is a stupid question but I managed to get Vim working whenever I run Xterminal. That's all good but if I then use sudo gainroot to get root access it no longer works. Where do I need to add those variables so Vim still works? Yes, I am a Linux newbie
Place similar .profile and .vimrc files in /root.
 
Posts: 191 | Thanked: 9 times | Joined on Nov 2005
#23
Hmmm, that didn't work for me. It doesn't seem to use that profile since when I echo the path after running sudo gainroot I don't see it? I know I must be missing something obvious.
 
aflegg's Avatar
Posts: 1,463 | Thanked: 81 times | Joined on Oct 2005 @ UK
#24
When you run 'sudo gainroot', you don't get a login shell for root.

See http://www.dillernet.com/apple/2006/...appened-in-51/ - scroll down to Gainroot and Root

HTH,

Andrew
 
Posts: 191 | Thanked: 9 times | Joined on Nov 2005
#25
Yes, that got it. I don't quite know what it all means but it certainly worked once I used the su - command. Thanks!
 
Posts: 27 | Thanked: 1 time | Joined on Dec 2005 @ Sweden
#26
Sorry, I forgot to mention that I have changed the call "/bin/sh" to "/bin/sh --login" in /usr/sbin/gainroot.

(Don't make any mistakes when editing that script, if you wreck it the only way to regain root access is re-flashing.)
 
jayholler's Avatar
Posts: 128 | Thanked: 4 times | Joined on Feb 2006 @ Philadelphia, PA
#27
Originally Posted by fresta
Sorry, I forgot to mention that I have changed the call "/bin/sh" to "/bin/sh --login" in /usr/sbin/gainroot.

(Don't make any mistakes when editing that script, if you wreck it the only way to regain root access is re-flashing.)
i tried that, and it didn't work. so then i thought i was misreading it, and i tried "/bin/sh -login" and now I can't use gainroot. I'll have to reflash, like you said. Fortunately I'm using extrootfs so my changes will be reflected after I run the script again. But why didn't editing "/bin/sh" to "/bin/sh --login" work?

update, i reflashed and got my system set up again. i decided instead to put
'ALL = NOPASSWD: /bin/sh' so i can now just 'su -' to get a 'true' root shell. cool. i'm still curious to know why the line '/bin/sh --login' didn't work in the gainroot script.

Last edited by jayholler; 2006-03-18 at 04:49. Reason: correctiom
 
Posts: 27 | Thanked: 1 time | Joined on Dec 2005 @ Sweden
#28
Yes, that is a better method than editing the gainroot script. I do that instead now. I do not know why '/bin/sh --login' didn't work for you though.
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 18:28.