comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » CURSOR problems
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
CURSOR problems [message #45220] Mon, 22 August 2005 08:38 Go to next message
K. Bowman is currently offline  K. Bowman
Messages: 330
Registered: May 2000
Senior Member
Is anyone else having problems with CURSOR? I have never seen this behavior
before, and I have no idea if it is an IDL or an OS issue. I am running IDL 6.1
on Mac OS X 10.4.2.

If I run this program:

PRO TEST_CURSOR
PLOT, FINDGEN(5)
CURSOR, x, y, /DATA
PRINT, x, y
END

it opens an X window and draws the graph. I click on the graphics window to
change keyboard focus. Clicking in the window has no effect. I click back to
my terminal window and interrupt execution with control-C. Moving the mouse
back to the graphic window produces an event just as the mouse enters the window
(see below).

IDL> test_cursor
^C% Interrupted at: TEST_CURSOR 3
/Network/Servers/csrp.tamu.edu/Volumes/csrp0/Home/bowman/id
l/test/test_cursor.pro
IDL> .c
-0.34877722 1.8760835

This behavior renders CURSOR completely non-functional.

Thanks, Ken Bowman
Re: CURSOR problems [message #45272 is a reply to message #45220] Wed, 24 August 2005 11:17 Go to previous message
JD Smith is currently offline  JD Smith
Messages: 850
Registered: December 1999
Senior Member
You might find some hints here:

http://www-astro.physics.ox.ac.uk/~eme/mac.html#X11tips

'pbpaste' is quite useful. Going from OSX->X11 is easy, as any copy
command gets put on the X11 clipboard. The other way is a bit more
challenging.

JD
Re: CURSOR problems [message #45280 is a reply to message #45220] Wed, 24 August 2005 06:20 Go to previous message
K. Bowman is currently offline  K. Bowman
Messages: 330
Registered: May 2000
Senior Member
In article <BF314661.259D%rfrench@wellesley.edu>,
"Richard G. French" <rfrench@wellesley.edu> wrote:

> OK, I have done this, but I'm obviously missing something. Here is what I
> did:
>
> 1) add the above code to .cshrc
> 2) Fire up X11
> 3) Fire up Terminal and open a shell (using tcsh)
>
> printenv DISPLAY gives a null. That seems to be the first problem.

I set up my DISPLAY variable like this for tcsh:

if ($?DISPLAY == 0) then
if ($?REMOTEHOST) then
setenv DISPLAY ${REMOTEHOST}:0
else
setenv DISPLAY :0
endif
endif

Apple set up the shells in a very convoluted way, so make sure that you are
actually executing your startup scripts (e.g., with echo). If you would like to
see my whole startup-script set up, send an e-mail to k-bowman at tamu.edu
(replace the at).

On my local machine I see this:

bowman> echo $DISPLAY
:0

On a remote machine I see

csrpc> echo $DISPLAY
localhost:10.0

which is standard for X-Windows forwarding through ssh. I have had problems
running X-Windows apps from multiple remote hosts simultaneously, apparently due
to .Xauthority file locking conflicts.


> From the terminal window, I can open an xterm, and interestingly it DOES
> have a DISPLAY :0.0 but I can't cut and paste just using the mouse from the
> first terminal window to the newly created one. If I open a second xterm,
> then I CAN cut and paste between those two. If I understand your post
> correctly, I should be able to use highlight and middle-button paste between
> TERMINAL windows, not xterms that I fire up from the Terminal application.
>
> So, in my setup, the terminal app does worse than xterm in X11, where at
> least cut and paste work OK. I'd appreciate any suggestions on how to solve
> this problem.

X-Windows apps copy to the X-Windows server buffer. That buffer is available
for pasting to other X-windows apps, but not to Mac apps.

Mac apps copy to the OS X global buffer, which will transfer just about anything
(pictures, text, etc.) to another Mac app. Unfortunately, communication between
X-Windows and the rest of the Mac OS X is virtually nonexistent.

Terminal.app is a standard Mac application, so copy and paste use cmd-c and
cmd-v. You can copy and paste between Terminal windows and other Mac apps, or
between different Terminal windows. If your 3-button mouse has a control panel,
you may be able to program it to work like an X-Windows mouse for copy and paste.

> By the way, what fonts do you use in your terminals? The list of choices is
> very long.

I like Monaco.

Cheers, Ken B.
Re: CURSOR problems [message #45281 is a reply to message #45220] Wed, 24 August 2005 06:05 Go to previous message
btt is currently offline  btt
Messages: 345
Registered: December 2000
Senior Member
Kenneth P. Bowman wrote:
> In article <Pine.OSX.4.61.0508232044150.9617@gouda.local>,
> Ken Mankoff <mankoff@gmail.com> wrote:
>
>
>> OK, I'm thinking of making the switch. Everything works well so far.
>> But I figure I might as well go all the way, and switch from the X
>> emacs (mine is installed via fink) to the Aqua Emacs.app. Emacs.app
>> runs IDLWAVE fine, but not IDLWAVE help because I can't get it
>> running w3m. Googling for emacs.app and w3m turns up suprisingly
>> few results. Any suggestions?
>
>
> Sorry, I'm not an emacs user. I prefer my editor to be less complicated
> than my operating system. ;-) But then, I don't mind using the PDF
> help files.
>
> I'm happy with a simple editor. I like BBEdit. You can download the
> free version, TextWrangler, from barebones.com.

I would like to chime in here with a testimonial for SubEthaEdit text
editor.

http://www.codingmonkeys.de/subethaedit/

Larry van Peursam, formerly of RSI, write the mode configuration to
enable syntax highlighting for IDL 6.1. The editor comes with a a
command line system - so I can call it from IDL with a spawn command
wrapped in a IDL procedure...

IDL> see, 'tvimage'

and tahdah! tvimage.pro opens up in the editor.

It's worth the try - don't forget to download the IDL syntax mode.

Cheers,
Ben
Re: CURSOR problems [message #45282 is a reply to message #45220] Wed, 24 August 2005 04:41 Go to previous message
Patrick Broos is currently offline  Patrick Broos
Messages: 27
Registered: December 1996
Junior Member
hi Dick,
You're almost there. As you can see the little code snippet is testing
for the existance of a file named /tmp/.X?-lock which is written by
X11.app. This works when the shell is stared after X11. (I choose to
start X11 at login using the GUI in Preferences->Accounts->...

Hard coding
setenv DISPLAY ":0.0"
probably works 99% of the time (and can be done before X11 starts), but
I saw someone else doing it this way so I followed suit. :)

Regarding middle paste, I don't know if Terminal.app can be configured
that way or not. I recommend iTerm at http://iterm.sourceforge.net
which definitely can.

I think I use Monaco in iTerm. Now if I could just get a nice looking
font in the text editor I'm test-driving, jedit ...

Regards,
Patrick Broos
Re: CURSOR problems [message #45286 is a reply to message #45220] Tue, 23 August 2005 19:07 Go to previous message
Kenneth P. Bowman is currently offline  Kenneth P. Bowman
Messages: 585
Registered: May 2000
Senior Member
In article <Pine.OSX.4.61.0508232044150.9617@gouda.local>,
Ken Mankoff <mankoff@gmail.com> wrote:

> OK, I'm thinking of making the switch. Everything works well so far.
> But I figure I might as well go all the way, and switch from the X
> emacs (mine is installed via fink) to the Aqua Emacs.app. Emacs.app
> runs IDLWAVE fine, but not IDLWAVE help because I can't get it
> running w3m. Googling for emacs.app and w3m turns up suprisingly
> few results. Any suggestions?

Sorry, I'm not an emacs user. I prefer my editor to be less complicated
than my operating system. ;-) But then, I don't mind using the PDF
help files.

I'm happy with a simple editor. I like BBEdit. You can download the
free version, TextWrangler, from barebones.com.

Ken B.
Re: CURSOR problems [message #45287 is a reply to message #45220] Tue, 23 August 2005 18:47 Go to previous message
Richard French is currently offline  Richard French
Messages: 173
Registered: December 2000
Senior Member
What would help would be if you would post the response to
Defaults read com.apple.Terminal

Here is what I have (completely irrelevant stuff omitted). Perhaps you will
be able to spot my problem from this:

defaults read com.apple.Terminal
{
AutoFocus = YES;
Autowrap = YES;
BackgroundImagePath = "";
Backwrap = YES;
Bell = YES;
BlinkCursor = NO;
BlinkText = YES;
CleanCommands = "rlogin;telnet;ssh;slogin";
Columns = 80;
CursorShape = 0;
CustomTitle = Terminal;
DeleteKeySendsBackspace = NO;
DisableAnsiColors = NO;
DoubleBold = YES;
DoubleColumnsForDoubleWide = NO;
DoubleWideChars = YES;
EnableDragCopy = YES;
ExecutionString = "";
FontAntialiasing = NO;
FontHeightSpacing = 1;
FontWidthSpacing = 1;
IsMiniaturized = NO;
KeyBindings = {
"$F708" = "\033[25~";
"$F709" = "\033[26~";
"$F70A" = "\033[28~";
};
LastCommand = "ssh prometheus.wellesley.edu";
MacTermFunctionKeys = NO;
Meta = "-1";
NSColorPanelMode = 6;
NSColorPanelVisibleSwatchRows = 1;
NSColorPickerSlidersDefaults = 0;
NSColorPickerUserDefaults = Spectrum;
NSFixedPitchFont = VT100;
NSFixedPitchFontSize = 12;
NSFontPanelAttributes = "1, 0";
NSFontPanelLastUsedPane = 0;
NSFontPanelPreviewHeight = 0;
NSNavLastCurrentDirectory = "~/Research/HST/Cycle13/PhaseII";
NSNavLastRootDirectory = "~";
NSNavPanelExpandedSizeForOpenMode = "{518, 401}";
...
"NSWindow Frame Inspector" = "21 143 268 435 0 0 800 578 ";
"NSWindow Frame NSColorPanel" = "427 410 214 309 0 0 1280 832 ";
"NSWindow Frame NSFontPanel" = "722 431 320 221 0 0 1280 832 ";
"NSWindow Frame RunCommand" = "390 511 499 112 0 0 1280 832 ";
OptionClickToMoveCursor = NO;
PadBottom = 3;
PadLeft = 5;
PadRight = 3;
PadTop = 3;
PermanentServers = ("prometheus.wellesley.edu", "sarah.wellesley.edu",
"pandora1.wellesley.edu");
PreviousCommands = (
);
RewrapOnResize = YES;
Rows = 24;
SaveLines = 10000;
ScrollRegionCompat = NO;
ScrollRows = 0;
Scrollback = YES;
Scrollbar = YES;
Shell = "";
ShellExitAction = 1;
StartupFile = "";
StrictEmulation = NO;
StringEncoding = 4;
TermCapString = dtterm;
TerminalOpaqueness = 1;
TextColors = "0.000 0.000 0.000 0.199 0.672 1.000 0.000 0.000 0.000
0.000 0.000 0.000 0.199 0.672 1.000 0.000 0.000 0.000 0.666 0.666 0.666
0.333 0.333 0.333 ";
TitleBits = 3;
Translate = YES;
UseCtrlVEscapes = NO;
VisualBell = NO;
WinLocULY = 439;
WinLocX = 359;
WinLocY = 0;
WindowCloseAction = 1;
}
Re: CURSOR problems [message #45288 is a reply to message #45220] Tue, 23 August 2005 18:32 Go to previous message
Richard French is currently offline  Richard French
Messages: 173
Registered: December 2000
Senior Member
On 8/23/05 8:39 AM, in article
1124800745.178227.298470@g47g2000cwa.googlegroups.com, "Patrick Broos"
<patb@astro.psu.edu> wrote:

> I don't have any ideas on your xterm configuration, but as a Solaris
> user just moving to OS-X I do have a suggestion about xterms: leave
> them behind! As long as $DISPLAY is set correctly you can start X11
> programs from a shell running in any terminal application.
> Terminal.app (from Apple) is better than xterm, and iTerm is even
> better than Terminal.app. You'll be able to use much better fonts than
> I could ever get in xterm (on OS-X), multiple ("tabbed") shells, full
> integration with other OS-X applications (e.g. drag a file from Finder
> and the file's path is printed in the shell), standard OS-X keyboard
> shortcuts, configurable menus (e.g. to ssh to favorite other machines),
> middle mouse paste, focus-follows-mouse, etc. Here's some code I found
> to put in .cshrc to set $DISPLAY in all shells:
>
> # Set DISPLAY so that Carbon terminals can run X
> applications.
> # This only works if an X server is running; it's a
> good idea to start
> # an X server at login via System
> Preferences->Accounts->Login Items.
> # Figure the correct value for DISPLAY from the lock
> files /tmp/.X?-lock
> if ($?DISPLAY == 0) then
> foreach x (0 1 2 3 4 5 6 7 8 9 )
> if ( -o /tmp/.X$x-lock ) then
> setenv DISPLAY :${x}.0
> break
> endif
> end
> endif
>
> I choose to start the X11 server automatically at login.
>
> Patrick Broos
>


OK, I have done this, but I'm obviously missing something. Here is what I
did:

1) add the above code to .cshrc
2) Fire up X11
3) Fire up Terminal and open a shell (using tcsh)

printenv DISPLAY gives a null. That seems to be the first problem.

From the terminal window, I can open an xterm, and interestingly it DOES
have a DISPLAY :0.0 but I can't cut and paste just using the mouse from the
first terminal window to the newly created one. If I open a second xterm,
then I CAN cut and paste between those two. If I understand your post
correctly, I should be able to use highlight and middle-button paste between
TERMINAL windows, not xterms that I fire up from the Terminal application.

So, in my setup, the terminal app does worse than xterm in X11, where at
least cut and paste work OK. I'd appreciate any suggestions on how to solve
this problem.

By the way, what fonts do you use in your terminals? The list of choices is
very long.

Dick French
Re: CURSOR problems [message #45289 is a reply to message #45220] Tue, 23 August 2005 17:46 Go to previous message
Ken Mankoff is currently offline  Ken Mankoff
Messages: 158
Registered: February 2000
Senior Member
On Tue, 23 Aug 2005, Kenneth Bowman wrote:

> In article <1124800745.178227.298470@g47g2000cwa.googlegroups.com>,
> "Patrick Broos" <patb@astro.psu.edu> wrote:
>
>> I don't have any ideas on your xterm configuration, but as a
>> Solaris user just moving to OS-X I do have a suggestion about
>> xterms: leave them behind!
>
> I second this idea with one caveat. If you use a lot of X-windows
> applications and need to cut and paste between them, use xterm.
> If you want to be able to cut and paste between OS X applications,
> use Terminal.app (or alternatives, I'm not familiar with iTerm).
>

OK, I'm thinking of making the switch. Everything works well so far.
But I figure I might as well go all the way, and switch from the X
emacs (mine is installed via fink) to the Aqua Emacs.app. Emacs.app
runs IDLWAVE fine, but not IDLWAVE help because I can't get it
running w3m. Googling for emacs.app and w3m turns up suprisingly
few results. Any suggestions?

-k.
Re: CURSOR problems [message #45294 is a reply to message #45220] Tue, 23 August 2005 07:12 Go to previous message
K. Bowman is currently offline  K. Bowman
Messages: 330
Registered: May 2000
Senior Member
In article <1124800745.178227.298470@g47g2000cwa.googlegroups.com>,
"Patrick Broos" <patb@astro.psu.edu> wrote:

> I don't have any ideas on your xterm configuration, but as a Solaris
> user just moving to OS-X I do have a suggestion about xterms: leave
> them behind! As long as $DISPLAY is set correctly you can start X11
> programs from a shell running in any terminal application.
> Terminal.app (from Apple) is better than xterm, and iTerm is even
> better than Terminal.app.

I second this idea with one caveat. If you use a lot of X-windows applications
and need to cut and paste between them, use xterm. If you want to be able to
cut and paste between OS X applications, use Terminal.app (or alternatives, I'm
not familiar with iTerm).

I configure Terminal to automatically open a set of predefined terminal windows
at login (use Terminal Preferences).

Cheers, Ken Bowman
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: if there is a command "clear lot" in IDLWAVE like "Ctrl+Y" in Windows
Next Topic: Re: Different FFT times for same array size ?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 11:34:59 PDT 2025

Total time taken to generate the page: 0.00942 seconds