Opened 7 years ago

Closed 6 years ago

#2622 closed defect (worksforme)

Text interface quits immediately when run from zsh shell

Reported by: zimmi Owned by: grass-dev@…
Priority: normal Milestone: 7.0.3
Component: Startup Version: 6.4.4
Keywords: zsh Cc:
CPU: x86-64 Platform: Unspecified

Description

Right now it is not possible to run grass -text from zsh shell as it immediately quits back to zsh. $SHELL variable needs to be set to /bin/bash for text interface to work.

I'm not sure whether this is grass or zsh issue, could anyone provide some insight?

Happens both with 6.4.x and 7.

Change History (13)

comment:1 Changed 7 years ago by martinl

Component: DefaultStartup

comment:2 Changed 7 years ago by martinl

Keywords: zsh added

comment:3 Changed 7 years ago by martinl

So doesn't it mean that in your case $SHELL variable is not defined and you want to hardcode it to bash when running zsh shell? See source:grass/trunk/lib/init/grass.py#L911

comment:4 in reply to:  3 Changed 7 years ago by zimmi

Replying to martinl:

So doesn't it mean that in your case $SHELL variable is not defined and you want to hardcode it to bash when running zsh shell? See source:grass/trunk/lib/init/grass.py#L911

$SHELL variable is set to /bin/zsh by default. If changed to /bin/bash grass works even when run from zsh.

comment:5 Changed 7 years ago by marisn

Could not reproduce the issue. GRASS 7.1 SVN started up just fine with zsh and SHELL=/bin/zsh

Only issue - prompt contains an ugly "\w"

Welcome to GRASS GIS 7.1.svn (r64677M)
...
This version running through:            Z Shell (/bin/zsh)
...
GRASS 7.1.svn (xy_loc):\w > zsh --version
zsh 5.0.7 (x86_64-pc-linux-gnu)
GRASS 7.1.svn (xy_loc):\w > echo $SHELL
/bin/zsh

comment:6 Changed 7 years ago by zimmicz

GRASS 7.1 comes from official repo? I'm using zsh 5.0.2 that might be the difference.

comment:7 in reply to:  6 Changed 7 years ago by martinl

Replying to zimmicz:

GRASS 7.1 comes from official repo? I'm using zsh 5.0.2 that might be the difference.

well, it depends what you mean by "official", there are Launchpad builds (1) recommended on official project pages (2).

(1) https://launchpad.net/~grass/+archive/ubuntu/grass-devel (2) http://grass.osgeo.org/download/software/linux/#g71x

comment:8 in reply to:  6 ; Changed 7 years ago by marisn

Replying to zimmicz:

GRASS 7.1 comes from official repo? I'm using zsh 5.0.2 that might be the difference.

Just to clarify - I was testing daily SVN checkout on ~AMD64 Gentoo. Have no idea what kind of OS (some BSD?) or GNU/Linux distro reporter had problems with.

comment:9 in reply to:  8 Changed 7 years ago by zimmicz

Replying to marisn:

Replying to zimmicz:

GRASS 7.1 comes from official repo? I'm using zsh 5.0.2 that might be the difference.

Just to clarify - I was testing daily SVN checkout on ~AMD64 Gentoo. Have no idea what kind of OS (some BSD?) or GNU/Linux distro reporter had problems with.

I'm using elementary OS 0.3 Freya based on Ubuntu 14.04.

comment:10 Changed 7 years ago by neteler

My tests (Fedora 21) are successfull:

rpm -qf /bin/zsh
zsh-5.0.7-6.fc21.x86_64

[neteler@oboe ~]$ /bin/zsh
[neteler@oboe]~% export SHELL=/bin/zsh
[neteler@oboe]~% grass64 -text
Cleaning up temporary files ...
Starting GRASS ...
          __________  ___   __________    _______________
         / ____/ __ \/   | / ___/ ___/   / ____/  _/ ___/
        / / __/ /_/ / /| | \__ \\_  \   / / __ / / \__ \ 
       / /_/ / _, _/ ___ |___/ /__/ /  / /_/ // / ___/ / 
       \____/_/ |_/_/  |_/____/____/   \____/___//____/  

Welcome to GRASS 6.4.5svn (2015) 
GRASS homepage:                          http://grass.osgeo.org/
This version running thru:               shell (/bin/zsh)
Help is available with the command:      g.manual -i
See the licence terms with:              g.version -c
Start the GUI with:                      g.gui wxpython
When ready to quit enter:                exit

[neteler@oboe]~% 

The same with GRASS GIS 7:

[neteler@oboe ~]$ /bin/zsh
[neteler@oboe]~% export SHELL=/bin/zsh
[neteler@oboe]~% grass70 -gui
Cleaning up temporary files...
Starting GRASS GIS...

          __________  ___   __________    _______________
         / ____/ __ \/   | / ___/ ___/   / ____/  _/ ___/
        / / __/ /_/ / /| | \__ \\_  \   / / __ / / \__ \ 
       / /_/ / _, _/ ___ |___/ /__/ /  / /_/ // / ___/ / 
       \____/_/ |_/_/  |_/____/____/   \____/___//____/  

Welcome to GRASS GIS 7.0.0svn (r64704M)
GRASS GIS homepage:                      http://grass.osgeo.org
This version running through:            Z Shell (/bin/zsh)
Help is available with the command:      g.manual -i
See the licence terms with:              g.version -c
If required, restart the GUI with:       g.gui wxpython
When ready to quit enter:                exit

Launching <wxpython> GUI in the background, please wait...
[neteler@oboe]~%

Both G6 and G7 appear to recognize the zsh properly.

comment:11 Changed 6 years ago by neteler

Milestone: 7.0.17.0.2

Ticket retargeted after 7.0.1 milestone closed

comment:12 Changed 6 years ago by neteler

Milestone: 7.0.27.0.3

Ticket retargeted after milestone closed

comment:13 Changed 6 years ago by neteler

Resolution: worksforme
Status: newclosed

No feedback, closing. Feel free to reopen if needed.

Note: See TracTickets for help on using tickets.