Bookmarks to particular apps

20 views
Skip to first unread message

tonymcdaniel

unread,
Nov 20, 2010, 11:22:44 PM11/20/10
to iterm2-discuss
I'm creating bookmarks for particular apps that I use in iTerm2. This
way, I have keyboard shortcuts and can set the tab title and working
directory automatically depending on the program.

For example, I have a bookmark that opens ipython -pylab, another that
opens octave, etc.

The problem that I'm having is that these shells don't seem to pick up
the info in my .profile. As a result, I have to enter the full path
for each program (ie. /opt/local/bin/octave). This isn't a big deal,
except that maxima won't launch at all. I think it's because it
depends on sbcl (which is also installed under /opt/local) and
therefore can't be found.

Does anyone have suggestions on how to get this working?

George Nachman

unread,
Nov 21, 2010, 4:52:59 PM11/21/10
to iterm2-...@googlegroups.com
If you use bash as your shell, I found two options:

1. /bin/bash -i -c /usr/bin/emacs
This loads your .bashrc but not your .profile and then runs emacs.

2. /bin/bash --login -c /usr/bin/emacs
This loads your .profile but not your .bashrc and then runs emacs.

This is covered (confusingly) in the bash man page under the INVOCATION section.

I couldn't find a way to make it work with login, but then I use tcsh for my shell because I am an old man. You damn kids get off my lawn!

-G

tonymcdaniel

unread,
Nov 22, 2010, 11:31:07 AM11/22/10
to iterm2-discuss
George,

Thanks for the help. Using /bin/bash -i -c /opt/local/bin/maxima
didn't work, but /bin/bash -l -c maxima does. According to the man
page for bash, -l is the same as --login and since the path
in .profile is loaded, I can just use the name of the binary instead
of the full path.

Thanks again for your help.

Tony

On Nov 21, 4:52 pm, George Nachman <gnach...@llamas.org> wrote:
> If you use bash as your shell, I found two options:
>
> 1. /bin/bash -i -c /usr/bin/emacs
> This loads your .bashrc but not your .profile and then runs emacs.
>
> 2. /bin/bash --login -c /usr/bin/emacs
> This loads your .profile but not your .bashrc and then runs emacs.
>
> This is covered (confusingly) in the bash man page under the INVOCATION
> section.
>
> I couldn't find a way to make it work with login, but then I use tcsh for my
> shell because I am an old man. You damn kids get off my lawn!
>
> -G
>
> On Sat, Nov 20, 2010 at 8:22 PM, tonymcdaniel <tonymcdan...@gmail.com>wrote:> I'm creating bookmarks for particular apps that I use in iTerm2. This
Reply all
Reply to author
Forward
0 new messages