help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: octave stole my Terminal


From: Seth Frey
Subject: Re: octave stole my Terminal
Date: Thu, 13 Sep 2007 16:04:59 -0400

On 9/13/07, novakyu <address@hidden> wrote:
>
>
>
> Henry F. Mollet wrote:
> >
> > Thomas explained this to be before. I believe it has nothing to do with
> > octave (see below)
> > Henry
> >  [~] -bash-2.05b 502$ ls
> > Adobe_SVG_3.0 _nstaller_Log     Sites
> > CMakeTmp                        Sites_extra
> > cut
> >
> >  [~] -bash-2.05b 503$ exec ls
> > Adobe_SVG_3.0 _nstaller_Log     Sites
> > CMakeTmp                        Sites_extra
> > cut
> > [Process completed]
> > % Now I have to open a new shell
> >
>
> If I understand Moc's problem correctly, I don't think it's "exec"'s
> behavior that he's having problem with. The problem is every time he
> launches Terminal, octave is being run, instead of his usual shell (be it
> /bin/sh or /bin/bash).
>
> My first rather wacky guess would be ... Moc, are you sure your shell isn't
> "/usr/bin/octave" or something like that? :)
>
> Here's a rather contrived example on Debian: I created a "test" user with
> "shell" of /usr/bin/octave, and when I try to open a shell as that user ...
>
> ===
> plato:~# grep test /etc/passwd
> test:x:1001:1001:Tester:/home/test:/usr/bin/octave
> plato:~# su - test
> su: Authentication service cannot retrieve authentication info.
> (Ignored)
> GNU Octave, version 2.1.73 (i486-pc-linux-gnu).
> Copyright (C) 2006 John W. Eaton.
> This is free software; see the source code for copying conditions.
> There is ABSOLUTELY NO WARRANTY; not even for MERCHANTIBILITY or
> FITNESS FOR A PARTICULAR PURPOSE.  For details, type `warranty'.
>
> Additional information about Octave is available at http://www.octave.org.
>
> Please contribute if you find this software useful.
> For more information, visit http://www.octave.org/help-wanted.html
>
> Report bugs to <address@hidden> (but first, please read
> http://www.octave.org/bugs.html to learn how to write a helpful report).
>
> -su:1>
> ===
>
> The only thing I couldn't reproduce is the "exec octave" line, as I get:
>
> ===
> -su:2> system("ps aux | grep octave")
> test     28817  0.0  0.1   4992  1380 pts/15   S+   00:17   0:00 sh -c ps
> aux | grep octave
> test     28819  0.0  0.0   3712   708 pts/15   R+   00:17   0:00 grep octave
> ans = 0
> -su:3>
> ===
>
> It's actually a mystery to me why I don't see any octave proper running
> there.
>
> I don't know for sure what additional rc scripts are run in OS X, but you
> might want to check system files like /etc/profile and /etc/bashrc, etc,
> etc. You should check any files that your own .bashrc or .bash_profile or
> .profile, or .login is sourcing.
>
> And, if you are really interested in finding which process is launching that
> octave, you might try "ps afu" instead. I have to admit I don't know all the
> switches to ps, but at least in GNU's version of ps (in BSD compatible mode,
> I think), "f" seems to bring up a tree view that shows the child-parent
> relationship between processes. If this doesn't work, you can ... well, look
> at "man ps" on your system to see what option will let you see PPID (parent
> process ID).
>
> And until you find a real solution, this bandage that I found might work for
> you too :)
>
> ===
> -su:13> system("exec bash")
> address@hidden:~$
> ===
>
> Regards,
>
> Andrew
> --
> View this message in context: 
> http://www.nabble.com/octave-stole-my-Terminal-tf4431098.html#a12650014
> Sent from the Octave - General mailing list archive at Nabble.com.
>
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://www.cae.wisc.edu/mailman/listinfo/help-octave
>



Hello Andrew, Yes, you seem to understand my problem best.  That
system('bash') bandage works great.  If you'd been right about my
renaming octave to bash or the other way around, that would have been
a real zinger.  I wasn't able to verify that though.  Maybe I DID do a
messy symlink somewhere.    my personal .profile, .bashrc and the
system level /etc/profile and /etc/bashrc offer no hints.  Whatever is
going on, Octave's 'system' command doesn't recognize the alias 'la'
that I define for 'ls -la' in my .profile, either if doesn't get as
far as my .profile or it is calling a different shell.  When I delete
Octave.app and start Terminal I get the following:
"
Last login: Thu Sep 13 15:51:40 on ttyp1
Welcome to Darwin!
xxx:~ xxx$ exec '/Applications/Octave.app/Contents/Resources/bin/octave'
-bash: /Applications/Octave.app/Contents/Resources/bin/octave: No such
file or directory
-bash: exec: /Applications/Octave.app/Contents/Resources/bin/octave:
cannot execute: No such file or directory
xxx:~ xxx$
"


Tricky, huh?
I'll dig around for other config files that bash or Terminal dig
through before initializing.  I guess at this point the problem is no
longer in this list's domain.  Thanks much for your help up to now.

-seth


reply via email to

[Prev in Thread] Current Thread [Next in Thread]