Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

starrin

macrumors member
Original poster
Aug 22, 2004
42
0
Okay - I am trying to work with x11. And I do not understand it ... read some docs but all the technical unix jargon ... i am not getting ... so any help is appreciated.

I go into the terminal and ssh into my university server ... use the password.

I get logged in and on the command line. But I thought that x11 was like a remote client that would show me a desktop from that server account?

Also - how do I move files from my computer to the account on the server?
 

Chundles

macrumors G5
Jul 4, 2005
12,037
493
No, X11 is a windowing environment for Unix apps.

I'm not sure but would a VNC program work in this situation?
 

BearRanger

macrumors member
May 23, 2005
70
0
Deep in the Woods
starrin said:
Okay - I am trying to work with x11. And I do not understand it ... read some docs but all the technical unix jargon ... i am not getting ... so any help is appreciated.

I go into the terminal and ssh into my university server ... use the password.

I get logged in and on the command line. But I thought that x11 was like a remote client that would show me a desktop from that server account?

Also - how do I move files from my computer to the account on the server?

As has been pointed out, X11 is a windowing system. You can use it in such a way that you can execute programs on your server and have the graphical output displayed on your local computer. But I wouldn't recommend it. The performance is bound to be slow, and unless you're using VPN you'll have security issues as well. It will take some work on your part to make this happen, though. For one thing, you'll need an X server on both sides of the connection. And you'll need to read up on environment variables.

As for transferring files, it depends on the server OS. Most servers support FTP in some form or another. If you'd like to know more, consult the OSX man page on ftp. (type "man ftp" in a terminal window)
 

theBB

macrumors 68020
Jan 3, 2006
2,453
3
starrin said:
Also - how do I move files from my computer to the account on the server?

Not every server allows FTP. I remember there was a command like "scp" (=secure-copy) to copy files from the server to your local computer. I am not absolutely sure about the name of the command, so it may be a slight variation of scp. Check it from the man pages.
 

gekko513

macrumors 603
Oct 16, 2003
6,301
1
Yes, scp can be used to transfer files. It's almost like the cp command.

Code:
scp sourcefile destinationfile

There is a special syntax to indicate files that reside on remote systems. Example:

Code:
scp myfile.txt apple.com:/var/www/html/

This will try to copy the file "myfile.txt" in the current local directory to the server apple.com and place the file in the /var/www/html/ directory using the same username on the remote system as you're currently logged in as on the local system.

Code:
scp gekko513@apple.com:~/myfile.txt .

This will try to copy the file myfile.txt from the server apple.com using the username gekko513 and from the home directory of that user. It will be put in the current local direcory.

Alternatively, download Fugu and do the same thing but with a nice graphical user interface instead of the command line.
 

semaja2

macrumors 6502a
Dec 12, 2005
576
18
Adelaide
you could use ssh ftp to transfer files, not as fast but does a great job, as for remote viewing use vnc and u could tunnel vnc through ssh
 

starrin

macrumors member
Original poster
Aug 22, 2004
42
0
Hi everyone and thank you for your replies.

I feel pretty Unix saavy when it comes down to environment variables and the like as I am a developer by trade.

Essentially this is for a graduate class I am taking ... the professor asked up to put some code up on the server and then run it on the server so that you can verify it is working. I assume he is going to use this server to check our projects.

So this is a User Interface course ... so I assume I could export the display of a Java Gui app to my mac.

But isn't there something that would make it more like Remote Desktop?
 

jhu

macrumors 6502a
Apr 4, 2004
854
1
starrin said:
Hi everyone and thank you for your replies.

I feel pretty Unix saavy when it comes down to environment variables and the like as I am a developer by trade.

Essentially this is for a graduate class I am taking ... the professor asked up to put some code up on the server and then run it on the server so that you can verify it is working. I assume he is going to use this server to check our projects.

So this is a User Interface course ... so I assume I could export the display of a Java Gui app to my mac.

But isn't there something that would make it more like Remote Desktop?

forget what other people have said about remote x sessions being insecure and slow. well, depending on your connection it may be slow, but definitely in combination with ssh it is secure.

now the only way that remote x sessions will work is if the server you're logging onto allows x-forwarding. you can test this by typing

ssh -X *****

where ***** is your remote server. once you're in there type

echo $DISPLAY

if you get nothing, then that means the remote ssh server doesn't allow x-forwarding. if it does, then you home free. fire up the x server on your side and start executing x programs remotely. if that all works, next time type:

ssh -X -c ****

that allows x-forwarding and compression to speed up transfers.
 

jhu

macrumors 6502a
Apr 4, 2004
854
1
theBB said:
Not every server allows FTP. I remember there was a command like "scp" (=secure-copy) to copy files from the server to your local computer. I am not absolutely sure about the name of the command, so it may be a slight variation of scp. Check it from the man pages.

a better method is sftp. it works exactly like the ftp program but through ssh.
 

jhu

macrumors 6502a
Apr 4, 2004
854
1
BearRanger said:
As has been pointed out, X11 is a windowing system. You can use it in such a way that you can execute programs on your server and have the graphical output displayed on your local computer. But I wouldn't recommend it. The performance is bound to be slow, and unless you're using VPN you'll have security issues as well. It will take some work on your part to make this happen, though. For one thing, you'll need an X server on both sides of the connection. And you'll need to read up on environment variables.

As for transferring files, it depends on the server OS. Most servers support FTP in some form or another. If you'd like to know more, consult the OSX man page on ftp. (type "man ftp" in a terminal window)

you only need the x server on the client side. the remote side isn't displaying any of the output so an x server isn't necessary there.
 

starrin

macrumors member
Original poster
Aug 22, 2004
42
0
Hi,

I went into X11 and an xterm terminal window is opened

So I do the following:

ssh -X user@machine_name (obviously not the real parameters)

type in my password

and get a prompt to the machine.

so then I type:
echo $DISPLAY

and get the following back:

localhost:11.0

Now is there a way to get a desktop or do I need to launch stuff to see it come up on my display?
 

maestro55

macrumors 68030
Nov 13, 2005
2,708
0
Goat Farm in Meridian, TX
If you don't have a fast connection, I wouldn't use remote x11, I have never tried it so I don't know how fast the connection should be to get it to work without being too slow. However, I will say that you should be able to move files using scp and ssh will do a lot in the terminal. If you know your way around the terminal, don't bother with remote x11.
 

blackstone

macrumors regular
Dec 12, 2005
213
0
Washington, DC
starrin said:
Hi,

I went into X11 and an xterm terminal window is opened

So I do the following:

ssh -X user@machine_name (obviously not the real parameters)

type in my password

and get a prompt to the machine.

so then I type:
echo $DISPLAY

and get the following back:

localhost:11.0

Now is there a way to get a desktop or do I need to launch stuff to see it come up on my display?

To see anything come up on your display, you'll need to launch it from the command line, e.g. if you enter xemacs & then it'll launch xemacs.

If you want to use a desktop environment, then you're probably better off using VNC tunnelled over SSH, as others have suggested.
 

balamw

Moderator emeritus
Aug 16, 2005
19,366
979
New England
starrin said:
Now is there a way to get a desktop or do I need to launch stuff to see it come up on my display?
That depends very heavily on what's installed on the remote machine, but you should be able to fire up a X window manager or desktop on the remote machine that points back to your Mac and gives you a desktop. Helps if you know what environment is used on the remote machine. Here's a site that gives a nice overview of the many options. http://xwinman.org/

B
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.