maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   General (https://talk.maemo.org/forumdisplay.php?f=7)
-   -   Problem with path removing apps in root session (https://talk.maemo.org/showthread.php?t=65770)

maemo.it 2010-11-17 12:57

Problem with path removing apps in root session
 
1 Attachment(s)
Hi guys, during a root terminal session to remove tweaker app, I had problem with path. Please see my screenshot to understand.
How can I solve it?
Thank you
:)

SubCore 2010-11-17 13:11

Re: Problem with path removing apps in root session
 
what does "echo $PATH" as root say?
did you try to just reopen a shell as root, maybe it was just your current session that messed up $PATH.

root's path gets set via the file "/root/.profile". you should have these two lines there:
Code:

PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11
export PATH


cddiede 2010-11-17 13:16

Re: Problem with path removing apps in root session
 
How does apt-get purge differ from a normal apt-get remove?

SubCore 2010-11-17 13:27

Re: Problem with path removing apps in root session
 
Quote:

Originally Posted by cddiede (Post 876045)
How does apt-get purge differ from a normal apt-get remove?

purge removes all files, including configuration.
without --purge, package-specific stuff under f.ex. /etc will not be deleted.

maemo.it 2010-11-17 13:35

Re: Problem with path removing apps in root session
 
@SubCore:
thank you for your reply :)
Code:

$ echo $PATH
/usr/bin:/bin

if my path should be in /root/.profile file maybe I deleted it involuntarily when I allowed alias ll=ls -la
If your string is a complete tipical root path I append it to my .profile ;)
Please confirm me it
Thank you

SubCore 2010-11-17 14:06

Re: Problem with path removing apps in root session
 
Quote:

Originally Posted by maemo.it (Post 876060)
@SubCore:
thank you for your reply :)
Code:

$ echo $PATH
/usr/bin:/bin


that's the user's path, not root. every user has it's own $PATH variable set.
although for a user it's the correct path :)

and yes, the lines i quoted came directly from my /root/.profile, which has been unaltered.

kureyon 2010-11-17 14:11

Re: Problem with path removing apps in root session
 
Here's the full content of /root/.profile

Code:

# ~/.profile: executed by Bourne-compatible login shells.

if [ -f ~/.bashrc ]; then
  . ~/.bashrc
fi

PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11
export PATH

mesg n


frozenholmes 2010-11-19 16:45

Re: Problem with path removing apps in root session
 
how do you add preenv. iv tried this code

sudo gainroot
apt-get install preenv

when i hit enter, it comes up
E: could not find package preenv.

help

regards frozen

Rob1n 2010-11-19 16:54

Re: Problem with path removing apps in root session
 
Quote:

Originally Posted by maemo.it (Post 876026)
Hi guys, during a root terminal session to remove tweaker app, I had problem with path. Please see my screenshot to understand.
How can I solve it?
Thank you
:)

This may be a result of using "sudo gainroot" instead of "root" - the PATH you get differs between the two.

maemo.it 2010-11-19 17:06

Re: Problem with path removing apps in root session
 
Quote:

Originally Posted by frozenholmes (Post 878080)
how do you add preenv. iv tried this code

sudo gainroot
apt-get install preenv

when i hit enter, it comes up
E: could not find package preenv.

help

regards frozen

maybe you have to enable the right repository where this app is!
;)

maemo.it 2010-11-19 17:11

Re: Problem with path removing apps in root session
 
Quote:

Originally Posted by Rob1n (Post 878090)
This may be a result of using "sudo gainroot" instead of "root" - the PATH you get differs between the two.

Thanks Rob1n, my problem was I deleted .profile file when I added ll alias (I created a new .profile file with only ll alias. Now I added full content thank to kureyon user and it's working. Anyway thank you for your interest! ;) )

Radicalz38 2010-11-19 17:17

Re: Problem with path removing apps in root session
 
Quote:

Originally Posted by frozenholmes (Post 878080)
how do you add preenv. iv tried this code

sudo gainroot
apt-get install preenv

when i hit enter, it comes up
E: could not find package preenv.

help

regards frozen

preenv is located in extras-devel repository.
I'm not teaching you how to enable that repo since you only want preenv(it's for your own good. Users who doesn't know how to enable that repo is best to stay away from it) so....
Hotlink:
Warning: Installing extras-devel apps/games is extremely dangerous to your device's health. :p
http://repository.maemo.org/extras-d....1.1_armel.deb


All times are GMT. The time now is 05:11.

vBulletin® Version 3.8.8