How to get Remote Linux applications on your Mac or Linux Desktop with X-forwarding.

Dec 11

The great thing about being a cross platform geek is that you don’t need to decide what operating system you use. You can just pick and choose what OS suits your fancy. But if you use the combination of Linux and OSX you can have your cake AND eat it with the wonderful technology called X-Forwarding.

What is it ? : X-forwarding is the art of opening a single application window over and SSH connection. Instead of taking over the desktop of your remote Linux machine with something like VNC or Teamviewer, you can just choose to open a single application on a remote system.

How does it work ? : To open a Linux application on an OSX desktop you need to enable the SSH server on the Linux machine first. If you are using something like Ubuntu or Linux Mint you can just type “Sudo apt-get install openssh-server”  Next up you need to teach your SSH server to allow X-Forwarding. This means, sending screen information across that SSH tunnel. 

To do this edit your  /etc/ssh/ssh_config file and uncomment the line that says “ForwardX11 nl”  and change it to “forwardX11 yes”  Reboot your linux machine and you will be set.

Opening an application. What you need to do on your “other” system  is “Tunnel in” to the machine we configured X11 forwarding on. You need to use an SSH connection with this parameter   :   ssh -X yourusername@ipofyourserver   The -X makes sure that you can open graphical applications.

Once the connection is established , just choose the name of an application and end with an “&”  : For example “firefox&”

Where does it work.

Linux to Linux is not a problem. Xforwarding is a cool way to open up an application on a remote system using the CPU power of that remote system. 

Linux to Mac : Apple decided to remove the funtionality of X11 Forwarding in Mountain Lion : To fix this, download and install X11Quartz to your Lion or Mountain Lion machine an you will be good to go. You cannot turn your Mac into an X11 Server , but you CAN use it as an X11 client , so that way you can open Linux apps on your mac. Download the app HERE

Linux to Windows : You can even do it in Windows ! Download and install Xming to make your Windows machine play nice with X11 forwarding.

So, time to get cracking and tell us : On what Server and Client system are you using X-forwarding and what do you do with it ?  

 

Related Posts

kw405 : Nas4free as your cross-platform network filehub.

Dec 04

We get technical this week with a great open source and free network attached filestorage solution called NAS4FREE. After running down the list of things it can do we show you how to tweak into the core of your cross-platform filesharing world, enabling you to use it as a central filehub for all of your devices and from all of your locations. We top it off with some information on how to virtualise the whole solution and give you a spot of music from Planet Boelex’s new track ‘Refurbished’ all of that and more on Kw405.

Shownotes.

Related Posts


Turn a broken smartphone into a home server with Servers Ultimate.

Nov 30

The most horrible sound that you can imagine is the sound of a smartphone clattering on the floor or the sickening crunch of a breaking tablet display. With many of our favorite devices made out of glass ( I still feel like the Monolith in 2001 a Space Odyssey was actually Apple’s first iPad add) the chance of some of those glass display’s shattering .. is real.  But what then ? What when hairline cracks criss cross your screen, (but the touch-part still works) ? What happens when your smart device becomes broken or obsolete. Should you throw away that old or broken phone or tablet ? If its and Android : Don’t ! There is still life in it !

Enter Servers Ultimate.

Servers Ultimate turns your Android device into a home server. It offers you the ability to run “services” on a smartphone or tablet, that are usually reserved for a VM or a beige box. But think about it ! : Your old phone is light, small, powerful, always connected AND has a built in UPS (uninterruptible power supply) called “A Battery”. Why not hook it up to its charger, plop it down somewhere in a corner and start “Serving”.

Servers Ultimate lets you run the following Services on your Android Device

  • https (webserver)
  • dlna (mediastreamer)
  • dyndns
  • irc (chat)
  • socks (proxy)
  • Webdav (web storage)
  • Scp (secure file transfer)
  • SSH 
  • ……

The free version of the app lets you run 2 services at the same time, the payed version lets you check all the boxes and turn that old DroidX into a small home server. Storage capacity depends on what you hook up to it ( Internal SD card of your phone or some external storage) Power depends on the processor in your smartphone. But all in all  : its a great way to setup a server in your house and re-use an old device.

I’m personally using Servers Ultimate to mess around with my MK802.22 stick to turn that into a home server with the Carbon Footprint of a small fly (its very low power) and hook it up the the wild wild web.  Servers Ultimate is Free , but the Pro version will cost you a measly 4.99 in the Google Play Store.

Related Posts

Turn your home into a virtual datacenter with Virtualbox.

Nov 24

You’ve heard us talk lots of times about Virtualbox. Our FAVORITE free (as in ‘Gratis’) cross platform virtualisation software. As we mentioned in the previous podcast episode about “Proxmox” (a more serious virtualisation tool) the machines in our home with their I5 and i7 processors and “Gigglebytes” of ram .. are mostly idling around in a corner when you’re not playing Call of Duty (and perhaps you even do THAT on the Xbox) So lets give those machines something to DO ! Running a ‘dedicated’ solution like dropbox might just be a little too much, but perhaps you have some cycles to spare on another system that is also being used as a desktop ? Why not try Virtualbox.

As an example : Currently I have dragged my I7, 16 gigabyte’s of ram Mac Mini downstairs and hooked it up to our tv. Since it carries most of our media it was a little silly to have it running in my upstairs office and having to stream everything back to the TV using a second (front end) box. So now the little bugger sits in our media cabinet with some 4 terrabyte of USB Harddisks hooked up to it. Having it just sit there running OSX and acting as a mediaserver or fileserver was a waste of power and cpu cycles. So with virtualbox I gave it something to do. I installed Virtualbox, hooked up a big external usb drive and started cooking some VM’s.

  • Ubuntu 12.10 vm with LXDE : This is my ‘internal’ ubuntu desktop. I use it for running cronjobs, copy operations and scripts that are meant for internal use only. Its my ‘Secure box’. I’ve enabled the RDP server on it (a builtin function of Virtualbox) so I can cantrol the screen of the virtual machine from afar.
  • Ubuntu 12.10 vm with LXDE : The second machine has a torrent client running as does the ‘dirty deeds’ that need to be done on the internet. Insecure surfing, downloading and remote access via SSH are its main goals. Once a week I ‘roll back’ the machine to its original (clean) post install state with the “snapshot” function of Virtualbox.
  • Ubuntu 12.10 Server : The main task of this machine is running OWNCLOUD (also featured in one of our podcasts) as my personal cloud storage.
  • Nas4Free : With a 1800 gigabyte virtual disk, this VIRTUAL machine acts as my main file storage system. So instead of putting my files on a disk and sharing them out via the file-sharing options on my (host) OSX system, I made a virtual machine of a linux application geared towards storage and filesharing … and put all of my files INSIDE a virtual machine. Performance is very good so far and the added perks to running Nas4free are going to be a topic for next weeks podcast.

In the end, controlling these virtual machines is a little messy sometimes. I mean you can’t just interrupt @Niejana when she is watching “Blood and Chrome” to say : Sorry about that, I need to mess with something on my Virtualbox and for that I need to use the TV ?   You need ‘remote’ ways to manage that virtual machine situation.

  • Controlling the Virtual Machines. Remote controlling the virtual machines is easy. You can use the built in RDP server in Virtualbox to use an RDP client (on any operating system) to open up the remote machine. If you also want to access them from the outside, try installing Teamviewer on the Virtual Machine.  If you are using a Linux operating system as your virtual machine you can enable the SSH Server and go in via the terminal.
  • Controlling Virtualbox. Unbeknown to many, virtualbox has a powerful set of terminal commands you can use. With a simple terminal window to my Mac (SSH) I can use the ‘VboxManage’ commands to do just about anything. Make a new virtual machine, clone a drive, resize a drive. Everything runs in the background and its a very very powerful tool. You can find the entire list of Virtualbox commands HERE
  • Controlling Virtualbox with a web interface. Virtualbox also has a web interface that helps you control your virtualmachines. In a point and click way you can start and stop VM’s and do anything you can do on the ‘regular’ desktop window. Installing it might be a little chore (depending on the host operating system you use) but the results are pretty spiffy. Find the howto HERE.  

And with those little tips you know can turn that headless box OR that powerful machine upstairs that is always on, but sometimes used by your kids for gaming… into your own personal datacenter. Don’t have the spare beige box for Proxmox ? Just have a desktop and want to get it to do some cool things ‘under the hood’. Want your own invisible datacenter ?  Here you go ! Download Virtualbox NOW.

Related Posts

The A to Z of Osx command line commands.

Oct 15

With the shiny fancy walled garden that OSX Mountain Lion is today, we sometimes forget what is under the hood. Apple’s minimalistic and well designed interface might be clutter free, but the downside of this “Designer kitchen of computing” is that there are not a lot of hints to what powers lurk beneath its glossy surface. Unlike cluttered Windows (and Linux) programs from days gone by, riddled with cascading menu’s and massive help files, you have to be “in the know’ to  access some of the features.  

So today we have the A to Z of OSX terminal commands for you. Have fun revealing the power of the Unix like heat that beats in your big cat and have fun with THIS A TO Z index of commmand line commands. You can get started with some “basics” , make your Mac talk with the “say” command ,  or read the bible from Apple on the command line.

As a real cross platform slider you of course don’t have to be physically at your machine. You can turn your mac into an SSH server and connect from any other system using the terminal on your Linux machine,  or from another mac. Or from your IOS device, your Android Smartphone or your Windows box.

Related Posts