File: INSTALL-UNIX.txt

package info (click to toggle)
zope-externaleditor 0.9.2-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 360 kB
  • ctags: 113
  • sloc: python: 1,166; makefile: 45
file content (115 lines) | stat: -rw-r--r-- 4,432 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
Zope External Editor Installation

  Installation is two-fold: 

  - Install the ExternalEditor product in Zope.

  - Install the helper application on the client(s) and configure the browser(s)

  Product Installation

    Download the archive and extract it into your Zope products directory. Then
    restart Zope. If you succeeded, you'll notice pencil icons next to the
    external editable objects in the Zope management screens.

  Helper Application Installation

    Dependancies: Python 2.2, Tk

    Download the helper app archive and extract it. Enter the ExternalEditor
    directory and run (You may need to be root)::

      python2.2 setup.py install

    This will install the zopeedit.py executable (in /usr/local/bin on my
    system). Alternately, you can just copy zopeedit.py to the location of
    your choosing.

    Once you have the helper application installed, you need to configure your
    browser to fire it off appropriately. To do so, create an entry in the
    helper applications list for your browser(s) that associates the mime type
    "application/x-zope-edit" with the helper application.
    
    Here are the step-by-step configuration instructions for Mozilla:
    
    - From the Edit menu choose Preferences
    
    - Under Navigator choose Helper Applications
    
    - Click on the New Type button
    
    - Enter a description, like "Zope Editor"
    
    - For MIME type, enter application/x-zope-edit
    
    - for Application, select the helper application python file

    Here are instructions for Konqueror (provided by Mark Bucciarelii)

    - Settings -> Configure Konqueror
    
    - Select the File Associations icon
    
    - Add a new File Assocation: group = application, type = x-zope-edit
    
    - This association should now be currently selected in the Known Types 
      tree control
      
    - Add a description, if you like

    - Click the Add button in the Application Preference Order section.  
      Browse to select /usr/local/bin/zopeedit.py

  Tips
  
    The helper application can run any editor program that does not detach
    itself from the controlling process.
    
    To get terminal based editors to work, you need to spawn them inside an 
    xterm. to do this, use something like the following for the editor option::

      editor = xterm -e vi
      
    You can of course modify the above to fire up your favorite terminal and 
    editor or add any command line arguments you want.
    
    As for editors that insist on detaching from the controlling process (gvim
    does this by default), you need to configure them so that they do not
    detach. For gvim you could use::

      editor = gvim -f

 Troubleshooting

    If the helper app won't launch try the following suggestions:
    
    - Make sure you have Tk installed properly. To test this, bring up Python
      in a terminal and enter 'import Tkinter'. If it throws an exception,
      that is your problem.

    - Netscape 4 users, add a "%s" at the end of the application command line. 
      It appears the Netscape  likes to alert you with spurious things coming
      from stderr. I'll see if I can come up with a solution to that.

    - Make sure the file is marked as executable for your user 
      ('chmod +x zopeedit.py' should do it)

    - Make sure the browser is properly configured. Use a full path to the 
      helper app.

    - Make sure you are using a graphical editor (that uses X windows). To use
      a terminal based editor (like vi), setup the editor option to spawn it 
      inside an xterm. See tips above.

    - Try downloading and saving the external editor data to a file manually
      (right click on the pencil icon). Then try running the helper app from 
      the command line, passing it the path to this file. If it runs, then
      there is something wrong with the browser configuration. If not, then it
      should output a traceback to your terminal. Email me a copy of this
      traceback, and the data file and I will try to fix it.

    - If the editor launches, but the helper app complains that it lost its 
      connection to the editor process, this is because your editor detached 
      from the parent process (the helper app). Configure the editor such that 
      it does not do this. Unfortunately this prevents you from using a 
      multi-headed text edit server (like nedit and emacs can provide).