[GRASS-user] Using g.extension on Ubuntu 11.04

All:

At the GRASS 6.4.1 prompt, when I type:

g.extension extension=v.strahler

v.strahler is retrieved successfully and compiles, but then I get the message:

Installing <v.strahler>...
You need to enter the root password next to install v.strahler:
Password:

The problem is, Ubuntu does not allow a root password (I don't have one) and of course my password is not acceptable. If, instead, I try:

sudo g.extension extension=v.strahler

I get the message:

GRASS 6.4.1 (ffpi):~/grass/data > sudo g.extension extension=v.strahler
[sudo] password for teaiii:
sudo: g.extension: command not found

I'm at a loss what to do. Any suggestions?

Regards,
Tom

Thomas.Adams@noaa.gov wrote:

sudo g.extension extension=v.strahler

I get the message:

GRASS 6.4.1 (ffpi):~/grass/data > sudo g.extension extension=v.strahler
[sudo] password for teaiii:
sudo: g.extension: command not found

sudo resets the environment, including PATH. In fact, it resets PATH
even if the -E (preserve environment) option is used.

I'm at a loss what to do. Any suggestions?

Modify the g.extension script to use sudo rather than "su -c ...".

--
Glynn Clements <glynn@gclements.plus.com>

Glynn wrote:

Modify the g.extension script to use sudo rather than "su -c ...".

I've already done that. Try the -u flag.

Hamish

On Mon, Jul 25, 2011 at 11:43 AM, Hamish <hamish_b@yahoo.com> wrote:

Glynn wrote:

Modify the g.extension script to use sudo rather than "su -c ...".

I've already done that. Try the -u flag.

I have drastically simplified g.extension to two lines, being
a wrapper for the way better g.extension.py which is included
in the wxGUI of 6.4 and 6.5.

Find it attached. In my opinion there is not much point to
continue to hack the shell version if the Python script does
it much better. Of course you need Python being installed.

I didn't submit it yet to SVN.

Markus

(attachments)

g.extension (729 Bytes)

I had this problem as well and I used a “user level” solution…
I started grass with sudo (sudo grass) and then created a new mapset (u can’ t have access to the previous ones) to enter grass.
After that you can install extensions without being prompted for a root password. Then exit and enter grass as usual.
hth,
sotiris

> Glynn wrote:
>> Modify the g.extension script to use sudo rather than "su -c ...".

Hamish:

> I've already done that. Try the -u flag.

Markus:

I have drastically simplified g.extension to two lines, being
a wrapper for the way better g.extension.py which is included
in the wxGUI of 6.4 and 6.5.

is it way better? How? Why?

I really doubt it because the main problems with g.extension have
nothing to do with the programming language or programmer's ability,
and are common to both.

the main structural problems with it are:

- ill/dual-defined use of GRASS_ADDON_PATH as both a /usr/local/bin
substitute and a /usr/local prefix. William has also implemented a
partial solution to that on OSX some time ago.

- different systems will have different ways of authorizing administration
permissions. on linux there is su and sudo in the wild, on OSX there is
sudo and a $USER's personal Library, on MS Windows there are other
layers... getting this right on all permutations and combinations will
take time.

- to install system wide or per-user?

- gcc/Makefile linking issues for C programs

- ... probably more but I'm in a rush right now (back in the office
next week)

Find it attached. In my opinion there is not much point to
continue to hack the shell version if the Python script
does it much better. Of course you need Python being installed.

I need to research the python version more, but I don't understand how
it could magically solve the above problems, or what is fundamentally
broken the the existing shell version. I never really understood the
rationale for backporting the python version of it in the first place,
but I trust Martin to sculpt the wxGUI as he sees fit so don't mind it
there, even if keeping two live copies of the same thing in the same
release is inefficient to support.

most of g.ext is moving files around and running shell programs, which
is a natural thing to keep in a shell script.

I didn't submit it yet to SVN.

Before we blast away any existing code, I'd like to know if there are
programming or structural problems in the shell version, if the python
version really solves these problems in a fundamentally better way, and
why the shell version can't use the same method. I am willing to put up
my time to fix the shell scripts if need be, but right now I'm not aware
of any problems which are not structural in nature, ie independent of
implementation language.

I would like to post a more constructive email, but I'm being pulled out
the door right now, and don't know of specific code problems that need
work so can't give a patch to fix it.

thanks for your patience,
Hamish

Actually, you can create a root password in Ubuntu.

At a command prompt:
type “sudo su”
Enter your sudo password
type “passwd”
choose your root password

Hope this helps!

Andy Wickert
PhD Candidate
University of Colorado
Geological Sciences & Institute of Arctic and Alpine Research
1560 30th St.
Boulder, CO 80303
Office: RL3-275

On Sun, Jul 24, 2011 at 11:11 AM, <Thomas.Adams@noaa.gov> wrote:

All:

At the GRASS 6.4.1 prompt, when I type:

g.extension extension=v.strahler

v.strahler is retrieved successfully and compiles, but then I get the message:

Installing <v.strahler>…
You need to enter the root password next to install v.strahler:
Password:

The problem is, Ubuntu does not allow a root password (I don’t have one) and of course my password is not acceptable. If, instead, I try:

sudo g.extension extension=v.strahler

I get the message:

GRASS 6.4.1 (ffpi):~/grass/data > sudo g.extension extension=v.strahler
[sudo] password for teaiii:
sudo: g.extension: command not found

I’m at a loss what to do. Any suggestions?

Regards,
Tom


grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

On Tue, Jul 26, 2011 at 8:49 AM, Andy Wickert <wickert@colorado.edu> wrote:

Actually, you can create a root password in Ubuntu.

At a command prompt:
type “sudo su”
Enter your sudo password
type “passwd”
choose your root password

True - but based on the reasoning of ubuntu, one should not do this (apparent security implications)

Cheers,

Rainer

Hope this helps!

Andy Wickert
PhD Candidate
University of Colorado
Geological Sciences & Institute of Arctic and Alpine Research
1560 30th St.
Boulder, CO 80303
Office: RL3-275

On Sun, Jul 24, 2011 at 11:11 AM, <Thomas.Adams@noaa.gov> wrote:

All:

At the GRASS 6.4.1 prompt, when I type:

g.extension extension=v.strahler

v.strahler is retrieved successfully and compiles, but then I get the message:

Installing <v.strahler>…
You need to enter the root password next to install v.strahler:
Password:

The problem is, Ubuntu does not allow a root password (I don’t have one) and of course my password is not acceptable. If, instead, I try:

sudo g.extension extension=v.strahler

I get the message:

GRASS 6.4.1 (ffpi):~/grass/data > sudo g.extension extension=v.strahler
[sudo] password for teaiii:
sudo: g.extension: command not found

I’m at a loss what to do. Any suggestions?

Regards,
Tom


grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel : +33 - (0)9 53 10 27 44
Cell: +33 - (0)6 85 62 59 98
Fax (F): +33 - (0)9 58 10 27 44

Fax (D): +49 - (0)3 21 21 25 22 44

email: Rainer@krugs.de

Skype: RMkrug