Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Can I get the ip from another computer connected to my ubuntu one account? I know that I can have this with dyndns but being able to get the ip of every computer connected to my ubuntu account is easier than creating one more account on another site and configuring yet another daemon....

share|improve this question

1 Answer 1

up vote 3 down vote accepted

Do you need to get it when that computer starts or constantly check the ip?

To to it when the computer starts, you can create a script that writes the public ip to a file in the Ubuntu One folder.

On the computer who's IP you want to find out

1. Install curl:

sudo apt-get install curl

2. Create a file and paste this (let's call the file: "getip" and place it in the home folder):

#!/bin/bash
curl icanhazip.com > ~/"Ubuntu One"/ip

3. Make the script executable:

chmod +x ~/getip

4. Add the "getip" script to the startup applications (simply browse for it).

That's it. Now when the computer starts, a file called "ip" is created in the "Ubuntu One" folder (and on each restart, the file is overwritten with that computer's public IP).

If you want to do this for multiple computers, simply replace "ip" in the command above with an unique name for each computer.

share|improve this answer
    
I was hoping there was some way to ask for the ip to the ubuntu one daemon. I didn't heard about curl before, thanks!!! –  Lucass Apr 19 '11 at 16:33
    
Well I would vote you up if I could, but I can't because of my score (15 minimum). –  Lucass Apr 19 '11 at 17:14
    
Don'y worry... :) –  Alin Andrei Apr 19 '11 at 17:26

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.