image
image

Go Back   macosx.com > Mac Help Forums > Mac OS X System & Mac Software

Reply
 
Thread Tools
  #1  
Old February 11th, 2002, 04:24 AM
Registered User
 
Join Date: Dec 2001
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
mjia is on a distinguished road
Editing files remotely

I would like to be able to edit text files on a remote server. I am able to access my account on a remote Sun Solaris UNIX server over SSH and upload and download files, but I would like to be able to directly edit text files without having to download them and then upload them back. I would rather not have to use vi or emacs, so is it possible to edit the files with a text editor that has a GUI? I have heard that I need to "forward X11" but I have no idea how to do this (or what X11 is).
Reply With Quote
  #2  
Old February 12th, 2002, 09:49 AM
Registered User
 
Join Date: Sep 2000
Posts: 139
Thanks: 0
Thanked 0 Times in 0 Posts
dsnyder is on a distinguished road
If your Solaris box has it installed, you may want to try using the editor "pico", which is much simpler than vi or emacs (although not as powerful). It doesn't have a gui, but it's very easy yo use. If you've ever used pine, you can probably figure out pico.

X11 is the windowin system used by most Unices. It is not native on OS X, but it is possible to install it and use it, although I'm not sure on the details. I'm sure there is more information about this in the forums here (but it isn't something I have a use for, so I haven't been paying attention).
Reply With Quote
  #3  
Old February 19th, 2002, 04:22 PM
kilowatt's Avatar
mach-o mach-o man
 
Join Date: Mar 2001
Location: irc.lfnet.net #kilonet
Posts: 980
Thanks: 0
Thanked 0 Times in 0 Posts
kilowatt is on a distinguished road
Here's how I would go about using a gui editor over an ssh connection:

First, install X11, and a window manager.

Now, you gotta enable X11 tunneling over ssh. I believe the configuration is client-side, but I'm not posative. you can find informatino about this via:
man ssh
I believe the best way to do this is to:
pico /etc/ssh_config
uncoment the following lines:
Code:
# Host *   
#   ForwardX11 no
then change the 'no' to a 'yes'

next,
locate a binary on the solaris computer similar to osx's text edit. You may wish to just ask them where it is - solaris is kinda strange sometimes.
But its probably in the same directiry as the solaris xterm.

The next step is to allow x11 clients to connect to your mac. here's how you do that:
launch your X11 server on the mac. Open an xterm (a regular macintosh terminal will NOT work from here on - its got to be within the x server).
type:
Code:
xhost +hostIamConnectingTo
if you are not worried about hackers and stuff, just type:
xhost +
to disable everything you've done, type:
xhost -hostIamConnectingTo
or xhost -
to remove all the entries.

Ok, we're almost set.
now, from an xterm (or aterm or gnoterm or kterm... ) ssh to the server:
ssh hostIamConnectingTo
log in, and set your DISPLAY variable:
in the bash, type:
DISPLAY=myhost:0.0
in tcsh or csh:
setenv DISPLAY myhost:0.0
(you may need to swap DISPLAY with $DISPLAY in tcsh, I'm not posative).

now, load your text editor like this:
./TextEdit -DISPLAY myhost:0.0

I might have that a little wrong, you can check on it in the manual page for almost any X11 app.

btw, this is alot easier with telnet - you don't have to edit your ssh config files.

if you are feeling crazy, there is a way to launch solaris's window manager on your mac remotely - just figure out the command on the server, and launch an x11 'failsafe' session. ssh in, etc.

hope this works, please tell if it does/doesn't, I'm interested.

EDIT:
I don't think its needed, but after you edit that ssh file in /etc, you may need to re-init or reboot.
__________________
irc.lfnet.net #kilonet -+=join in=+-
Quote:
...the belief that the rights of man come not from the generosity of the state but the hand of God...
PEBKAC - Problem Exists Between Keyboard And Chair. --who said it first?
Audio Engineer - ProTools and Logic Pro Certified.
FCC Licensed RF Technician
Reply With Quote
  #4  
Old February 21st, 2002, 05:16 AM
usin UNIX since '92
 
Join Date: Oct 2000
Location: Barcelona, Catalonia - Spain
Posts: 249
Thanks: 0
Thanked 0 Times in 0 Posts
dani++ is on a distinguished road
One great X11 visual editor is 'nedit'.


You might want to try it as well.


I've you never heard of X11, you'd better start small and once you are comfortable with each step (which kilowatt has outlined very well) you can begin with the next.

First of all, install X11 locally and be comfortable with it, I recommend Fink to do that but it's not compulsory. Then you can move on with connecting remotely and stuff.

dani++
Reply With Quote
  #5  
Old February 21st, 2002, 03:13 PM
Registered User
 
Join Date: Jun 2001
Posts: 204
Thanks: 0
Thanked 0 Times in 0 Posts
howardm4 is on a distinguished road
You'd be best off using emacs and
the 'ange-ftp' module.

It transparently moves remote files back
and forth.
Reply With Quote
  #6  
Old February 22nd, 2002, 05:42 PM
kilowatt's Avatar
mach-o mach-o man
 
Join Date: Mar 2001
Location: irc.lfnet.net #kilonet
Posts: 980
Thanks: 0
Thanked 0 Times in 0 Posts
kilowatt is on a distinguished road
noooo emacs....
....bad!



ok so its a stupid debate



cheers!

btw I think bb edit can do this too
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Editing binary files bbloke Unix & X11 7 May 29th, 2003 05:16 PM
moving my itunes files to another location Numbers1820 Mac OS X System & Mac Software 2 December 20th, 2002 10:02 PM
Native FTP program? bighairydog Apple News, Rumors & Discussion 17 November 30th, 2001 02:31 PM
Solution: OS X creating "." files on Samba shares dricci Apple News, Rumors & Discussion 0 November 21st, 2001 11:23 PM
Editing plain old text files Allan Crowson Mac OS X System & Mac Software 6 December 4th, 2000 11:19 AM


All times are GMT -5. The time now is 09:40 PM.


Mac Support® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2000-2008 DigitalCrowd, Inc.