[SOLVED] How to access another desktop via router.
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have 2 desktop computers. One with ubuntu 11.04 and the other with debian 6.0.
They are both connected to dsl modem thru router.Is it possible to connect one from the other using the same router. If so, what package should I install to each one of them.
Why not? When the "normal" person or company adds their Windows machine to the network, they will be set up. Linux is greatg and all, but at this point, there is typically no getting away from Windows.
Sure NFS would work too, but then, if Windows is added to the network, there's more work to do and even more daemons running.
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233
Rep:
Quote:
Originally Posted by kasl_33
Why not? When the "normal" person or company adds their Windows machine to the network, they will be set up. Linux is greatg and all, but at this point, there is typically no getting away from Windows.
Sure NFS would work too, but then, if Windows is added to the network, there's more work to do and even more daemons running.
Plan ahead.
I would personally have to disagree with that, you don't use a hammer to put in screws or a screwdriver to pound in nails. Until someone ACTUALLY puts a windows machine on the network NFS is far more efficient for Linux -> Linux sharing and when they DO add a windows machine that needs samba, the extra processor load of the extra daemon especially on machines from this day and age is minimal, that and NFS is a LOT easier to configure than samba, trust me I've configured both NFS servers AND samba servers as well as netatalk and NFS was the easiest by far to get running.
Oh yes, on a side note, supposedly modern versions of Mac OS also support NFS, so if someone adds a mac to your network you're covered by NFS as well.
So on my PC the IP address is 192.168.0.112. Do the same thing on the other PC. It will have a different address. While you are at the second PC use the address of the first PC in the ping command. Here is my example
Quote:
ken@taylor13:~$ ping 192.168.0.112
PING 192.168.0.112 (192.168.0.112) 56(84) bytes of data.
64 bytes from 192.168.0.112: icmp_seq=1 ttl=64 time=6.08 ms
64 bytes from 192.168.0.112: icmp_seq=2 ttl=64 time=0.254 ms
64 bytes from 192.168.0.112: icmp_seq=3 ttl=64 time=0.313 ms
The ping command shows that the second PC can touch my first PC. At this point we know that the two PCs are "connected". So what do you want to do next?
The easiest thing is to make a secure shell connection between the PCs. To do this install openssh-server on each PC. This can be done with the Ubuntu Software Center, Synaptic package manager or apt-get whichever you are comfortable with. Synaptic or apt-get on the Debian PC. When this is done open a terminal on one PC and issue the ssh command with the IP address of the other PC. You will be prompted for your password on the other PC. My example
Last login: Wed Sep 7 16:07:54 2011 from taylor13wd
ken@taylor12:~$
I am now able to enter commands on my PC at 192.168.0.112 (which is called taylor12).
You can transfer files between the PCs several ways. The easiest is probably to select from the menu Places; Connect to server... and the fill in the data. In my case from the second PC I would enter:
Service Type: SSH
Server: 192.168.0.112
User Name: ken
perhaps [X] Add bookmark - so I do not have to enter this again
and then Connect. I am prompted for ken's password on the first PC. The first PC acts just like another directory in the Nautilus file manager.
Finally you may want to access the desktop of the other PC. Ubuntu (perhaps Debian I don't know for sure) has this built in. On one PC select System; Preferences; Remote Desktop and [X] Allow other users to view your desktop. I always require a password. On the other PC launch the Remote Desktop Viewer (under Applications; Internet on Ubuntu) and click Connect. Enter data:
Protocol: VNC
Host: IP address of the other PC
and then press Connect.
There are some limitations to the way Ubuntu has set this up. You have to be logged in to the remote PC first. The connection is not secure but for a home network behind a router it is not too bad. If you want to make a fancier connection TightVNC might be the way to go. However, it is more involved to setup.
Please try some of these things and post any problems you encounter.
I would suggest sshfs (that's what I use). I have ssh daemons running on all machines and they're setup so I can log in without a password. With sshfs it's trivial to mount a folder on the remote machine on the local machine then I can just drag and drop files from one folder to the other, edit files on the remote machine, play music or films. It's very convenient and secure if you're using wireless. Last time I used gnome nautilus could use ssh with little trouble. Have a look at sshfs
In order to answer the question, we have to determine what you mean by 'connecting' two computers.
That could mean a lot of things.
If you want to PHYSICALLY connect them, you can do that as a cluster. (Don't do it with DSL. Too slow.).
If you want to merely access the other computer's files, use ftp. And connect through the internal ip address of that computer (192.168.1.#). You can also use the external IP, which you'd use to connect from outside your local network, but you'd need to go into the router and port-forward the ftp port to that computer. Since you're staying in-network, you can simply use the internal ip and then you don't have to bother with anything else.
If you want to physically logon to that computer from another computer, telnet or ssh would work for that purpose.
And none of these require any installation of any programs unless you want a GUI. Just launch the appropriate daemon (ftpd, telnetd, or sshd) from the host computer and then go to the other computer and login!
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233
Rep:
on second thought another relatively easy way to share files between two Linux boxes is fuse SSHfs. I use that extensively to mount a directory on my company's virtual hosting server on my workstation at my office.
Thank you very much Ken (Taylorkh) for your very helpful post.
I just encounter one problem on the Ubuntu side. I can't make Ubuntu's nautilus see the Debian machine,that is, I am limited to terminal of remote desktop viewer.In my Ubuntu I have no menu>Places>Connect to server. Can I do this on Ubuntu?
I am glad I was able to help. You say that you are running Ubuntu 11.04. I am guessing that you have the "Unity" interface installed. The long string of icons up and down the left side of the screen. If so, it appears that this is a known "feature". You have some options:
1 - You can disable Unity and use the "old fashion" Ubuntu classic interface. Personally I despise the Unity interface. I don't have a Unity machine available at the moment. I believe the choice to disable Unity is just before you login to the PC.
2 - There are some fixes described on the Internet which may do the trick. I have not yet tried them. Here is a link http://www.google.com/search?client=...utf-8&oe=utf-8 The lifehacker.com article is well written. There is even a video of the fix being applied.
3 - Just run nautilus from the All Programs search window. Under the nautilus menu File you should see Connect to server. You can also add a launcher for nautilus to the column of buttons (or whatever Unity calls it). I do not use Unity so I cannot tell you the steps. Do a search and I am sure you will find detailed instructions.
Please let me know how this works for you. Copying and sharing files between PCs is one of the main reason to network your home PCs - second to sharing an Internet connection of course.
I am glad I was able to help. You say that you are running Ubuntu 11.04. I am guessing that you have the "Unity" interface installed. The long string of icons up and down the left side of the screen. If so, it appears that this is a known "feature". You have some options:
1 - You can disable Unity and use the "old fashion" Ubuntu classic interface. Personally I despise the Unity interface. I don't have a Unity machine available at the moment. I believe the choice to disable Unity is just before you login to the PC.
2 - There are some fixes described on the Internet which may do the trick. I have not yet tried them. Here is a link http://www.google.com/search?client=...utf-8&oe=utf-8 The lifehacker.com article is well written. There is even a video of the fix being applied.
3 - Just run nautilus from the All Programs search window. Under the nautilus menu File you should see Connect to server. You can also add a launcher for nautilus to the column of buttons (or whatever Unity calls it). I do not use Unity so I cannot tell you the steps. Do a search and I am sure you will find detailed instructions.
Please let me know how this works for you. Copying and sharing files between PCs is one of the main reason to network your home PCs - second to sharing an Internet connection of course.
Ken
Number 3 did the trick for me. Nautilu's menu in the top panel is in autohide mode that is why I was not able to see it.I moved the mouse cursor there and the 'File > Connect to server' menu appeared.
Glad it worked for you. Option 1 works for me I installed 11.04 with Unity on an old test PC. And I remember why I HATE it. Nautilus does not seem to be available in Unity. It is installed and can be launched from a terminal. Why it will not run from the programs window - I have no idea. Unity is supposed to be easy to use. Having to edit configuration files to
create a launcher does not fit in with that philosophy.
You can switch to the old interface and back to Unity without breaking anything. Just click on your name at the login screen. At the bottom of the screen will be menu titled Ubuntu. Click on it and it will provide the choices to login to Unity (called just Ubuntu), Ubuntu classic etc. You can change the interface each time you login.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.