Teknologi Alam

5 ways to make using multiple computers and devices more efficient with Ubuntu

I hate cables.
There, I have finally managed to start the article. But getting back to the cables, I have a mouse, which connects to my computer. Fair enough: that’s a worthy cause for a cable.
But then I got a second computer. Now what do I do? Just use the touchpad on one? Or do I get a second mouse and make my desk even more cluttered? A better option would be to have the mouse shared between the two computers.
In this article I will provide a series of solutions which aim to make using multiple computers/devices a far more efficient business. Obviously you may not need all (or any) or them but I hope that you find some of them useful.

1) Connecting your devices / sharing internet

The first thing to do is get all the devices on a network talking to each other. At home this is easy as I have a wireless network setup and I can join that with all my devices however at University there is a wired network which I can only connect a single device to.
Enter Ad-Hoc. By connecting my laptop to the wired network, and creating an Ad-Hoc network on it, I can share the internet connection and have all my devices on a private network. Whether or not you can host an Ad-Hoc network depends on your network card – some support it, some don’t, some support it but don’t like encryption, etc. If your network card does support it then you can host an Ad-Hoc network by clicking on the network icon in the panel and “Choosing create new wireless network…”. You will then be presented with a dialog where you can enter the network settings. Once created, you can join this network just as you would any other with your devices.
It is worth mentioning that you can only connect to 1 network per network card, so you can’t join a wireless network and host an Ad-Hoc. However, you can use Mobile Internet or Ethernet and host.

2a) Sharing files

So you want to share files between your devices, so what is the easiest way?
There are several ways to share files but as a start I would recommend Samba.
Samba implements the network sharing protocol used by windows on other operating systems such as Linux, Mac, Unix, BSD etc. It integrates very well with nautilus but for some reason doesn’t seem to come fully installed by default.
click to install Samba in Ubuntu
Once installed you may need to restart your computer before it’s recognised (or simply start the required services if you know what you’re doing).
You can share a folder in Nautilus, by right clicking on it and selecting “Sharing Options”. It is fairly clear what to do here and you have a few options you can configure. (See the screenshot above.)
To browse shares on the network, go to Places > Network > Windows Network > {{WORKGROUP}} > {{COMPUTER-NAME}}

2b) Sharing files with devices

Sure, we all have a data-cable for our phone lying around somewhere, but it’s not always practical to use. For example, when I plug my phone into my computer, my phone no longer reads the memory card, resets the theme, re-orders my applications menu and changes the locations texts are saved to!
Even without that, it is the 21st century and there are easier ways; You can connect to most devices wirelessly, either over FTP or SSH.
For example, with my phone (Symbian) there is a program called SypFTP which hosts an FTP server on my phone. iPhone users can install an SSH server from Cydia (remember to change your password if you do this, for both root and user). Have a Google to try and find out how to host an FTP or SSH server on your phone device.
It is also possible to run an SSH or FTP server on a computer by installing ‘ssh-server‘. You can then connect to it in the same way.
To connect to your device from your computer, make sure you know the local IP of the device, that is the IP of the device on the network.
From Nautilus, select File > Connect to Server. Under service type, select the type of connection. This is mostly likely to be SSH or FTP (with login).
Type in your devices IP in the server box, and the username in the appropriate box. You can leave the others blank usually, unless you are hosting on an unconventional port. If you add a bookmark your device will appear in the places menu and it will be easy to connect to it again.
Press connect and your device will be available in Nautilus.

3) Sharing mice and keyboards

Two computers on one desk is bad enough, but then add 2 mice and 2 keyboards and you are rapidly approaching spaghetti junction! It’s much more convenient to use one mouse and one keyboard for both computers. But how?
Enter Synergy.
Synergy allows you to share a mouse, keyboard, and clipboard between 2 computers over the network. Yes, that’s copy and paste over the network! Synergy also works cross platform so you can share you mouse between an Ubuntu PC and a Windows one!
image
Synergy is a command line utility but a nice GUI frontend called ‘Quick Synergy’ is also available. For the purposes of this article we’ll be using Quick Synergy.
Launch ‘Quick Synergy’ on both computers that intend to share the mouse. The computer which has the mouse physically plugged into it will be the server. In Quick Synergy this goes in the ‘Share’ tab.
The other computer(s) will be the clients. Allocate these screen-names in the ‘Use’ tab.
For the server hostname/IP address you need to type in the IP (or hostname) of the computer you are connecting to.
On the server, in the share tab, there is a home icon with 4 text boxes surrounding it. In these you should type the screen-names of the client computer(s). Once you are done press execute followed by close. You can now press execute one each of the clients, and close, and your cursor should change between computers when you go over the screen edge.

4) Sharing audio

Pulse audio runs as a server and a client however there is no reason why the server and client should be on the same computer. In order to configure pulse audio, you first need to install some additional programs: -
image
Once installed, you need to launch the app on all your computers. It can be found as “Pulse Audio Preferences” in the Unity Dash or launched from the Terminal by running ‘paprefs‘.
On the computer connected to your speakers, use the “Network Server” tab, and check both “Enable network access to local sound devices” and “Allow other machines on the LAN to discover local sound devices“. I found I also had to enable “Don’t require authentication“, however, obviously this is not recommended for a public network.
On the computers you want to connect with check the “Make discoverable PulseAudio network devices available locally” option.
You should now be able see the shared output devices in the default Sound Preferences application.
If you don’t see the devices straight away, sometimes un-checking and re-checking “Make discoverable PulseAudio network devices available locally” will cause them to be discovered.

5) Sharing applications

Between your own computers there is often not a great deal of need to share applications, however, if you are in a position like me, where there is a lot of useful software on the university computers which you would like to be able to run conveniently, then you can use SSH.
For simple cli based programs, you can simply connect with the command
  • ssh user@host
So, for example, to connect to my laptop I would run
  • ssh anthony@129.234.126.157
After you have run this any commands you run will be like running a command directly on the computer. This is useful for very simple things, however, if you want to run more complex applications, you need an X server.
To do this run the following command instead,
  • ssh -X user@host
This will then forward X programs to your own X server. You can run programs for command line, such as nautilus to get the file manager. However, I have found it far more convenient to simply run gnome-panel &, which gives you the panel from the computer you are connected to on your desktop. You can then browse through the applications using easy-to-use menus.
Screenshot4-r93