On 2/18/2010 11:28 AM, Craig Moore wrote:
On Thu, 18 Feb 2010 10:34:56 -0500, Ken Brown<kbrown at cornell dot edu>  wrote:
How do I configure the XWin Server so that it opens xterm correctly?

This happens because xterm doesn't start a login shell, and PS1 gets unset. One 
way around this is to set PS1 in your ~/.bashrc file. For example:

PS1='\[\e]0;\w\a\]\n\[\e[32m\...@\h \[\e[33m\]\w\[\e[0m\]\n\$ '

I added this to my ~/.bashrc and the problem went away. Thanks!

Also, is there a way I can add a shortcut on my desktop to open a new
terminal window without having to type 'xterm' in the existing
terminal window or the system tray icon?

I use a shortcut with target

C:\cygwin\bin\run.exe /usr/bin/xterm -ls -display 127.0.0.1:0.0

Perfect, with this I don't even need to bother with the system tray
icon. However, I do get a small error message when I execute it:

-bash: Files/MiKTeX: No such file or directory

cr...@craig-laptop ~
$

I imagine that this has something to do with the way cygwin deals with
the PATH variable? Here is the text in my PATH variable as seen from
Cygwin:

$ echo $PATH
/cygdrive/c/Users/craig/Programming/scripts:/home/craig/bin:/usr/local/bin:/usr/bin:/bin:/cygdrive/c/Program
 Files/MiKTeX 
2.7/miktex/bin:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Program
 Files/Common Files/Roxio Shared/10.0/DLLShared/:/cygdrive/c/Program 
Files/Common Files/Roxio 
Shared/DLLShared/:/cygdrive/c/modeltech_6.5c/win32:/cygdrive/c/Users/craig/Software/ant-1.7.1/apache-ant-1.7.1/bin

Alternatively , this is what it looks like from DOS cmd:

ECHO %PATH%
C:\Program Files\MiKTeX 
2.7\miktex\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program
 Files\Common Files\Roxio Shared\10.0\DLLShared\;C:\Program Files\Common 
Files\Roxio 
Shared\DLLShared\;C:\modeltech_6.5c\win32;C:\Users\craig\Software\ant-1.7.1\apache-ant-1.7.1\bin

Its not a big problem, but I thought I would make you all aware of it.

You have spaces in your PATH but probably did not quote it
properly in your scripts when you used it ...

I have things like this in my .bash_profile:

PATH="${HOME}/bin:/c/miktex2.8/miktex/bin:${PATH}:${M2_HOME}/bin"

Note the quotes :-) ....

Since I run MiKTeX from cygwin, I added to PATH within cygwin only,
so that's not my point. My point is always using the quotes when
adjusting PATH, and so forth, if it might have spaces in it.

Cheers -- EM

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/

Reply via email to