Possible additions to x11.en.xml?
Michèle Garoche <[email protected]>
| Newsgroups | gmane.os.apple.fink.i18n |
|---|---|
| Message-ID | <[email protected]> |
File: x11.en.xml, section Tips, change or addition in red
8.1 Launching X11 apps from Terminal.app
To launch X11 applications from a Terminal.app window, you must set the
environment variable "DISPLAY". This variable tells the applications
where to find the X11 window server.
In the default setup - XDarwin runs on the same machine - you can set
the variable as follows:
• For tcsh users:
setenv DISPLAY :0.0
• For bash users:
export DISPLAY=":0.0"
A nice setup is to have XDarwin.app started when you log in (settable
in the Login panel of the System Preferences):
• For tcsh users:
Add the following to your .cshrc:
if (! $?DISPLAY) then
setenv DISPLAY :0.0
endif
•For zsh users:
Add the following to your .zhrc file:
if [[ -z $?DISPLAY ]] then
export DISPLAY=":0.0"
endif
Same syntax for bash users???
This sets DISPLAY automatically in every shell. It doesn't override
the current value when DISPLAY is already set, though. This way you can
still run X11 applications remotely or through ssh with X11 tunneling.
8.2 Launching Aqua apps from an xterm
One way to launch Aqua applications from an xterm (or any other shell,
actually) is the open command. Some examples:
open /Applications/TextEdit.app
open SomeDocument.rtf
open -a /Applications/TextEdit.app index.html
The second example opens the document in the application that is
associated with it, the third example explicitly gives an application
to use.
8.3 Copy and Paste
Copy and Paste generally works between the Aqua and X11 environments.
There are still some bugs. Emacs is reported to be picky about the
current selection. Copy and paste from Classic to X11 doesn't work.
Anyway, the trick is to use the respective methods of the environment
you're in. To transfer text from Aqua to X11, use Cmd-C in Aqua, then
bring the destination window to the front and use the "middle mouse
button", i.e. Option-click on a single-button mouse (this can be
configured under XDarwin's Preferences), to paste. To transfer text
from X11 to Aqua, simply select the text with the mouse in X11, then
use Cmd-V in Aqua to paste it.
The X11 system actually has several separate clipboards (called "cut
buffers" in X11 speak), and some applications have weird views which
one should be used. In particular, pasting into GNU Emacs or XEmacs
sometimes doesn't work because of this. The program autocutsel can help
here; it automatically synchronizes the two main cut buffers. To run
it, install the autocutsel Fink package and add the following line to
your .xinitrc:
autocutsel &
(Make sure it's before the line that exec's the window manager and
never returns! Don't just add it at the end, it won't be executed.)
If you are using Apple's X11, then you can use Command-C or
Edit->Copy, as usual for Mac apps, to copy text to the clipboard, and
the middle-mouse button or Command-V to paste from the clipboard to
Apple X11.
In any case, if you encounter problems copying or pasting from Aqua to
X11, or from X11 to Aqua, you may first try to do the pasting part
twice (it may happen that the copy does not occur at once), then use
intermediate applications, e.g. TextEdit or the Terminal.app on the
Aqua side, nedit or an xterm on the X11 side. In my experience, there
is always a solution.
And maybe something on X11Forwarding?
Michèle
<http://micmacfr.homeunix.org>
PGP.sig
(application/pgp-signature, 186 B) - not displayed