I'm posting instructions for headless operation here because I'm out of space in the first post and didn't reserve the second and third posts for expansion
The following steps outline a very basic method of creating a virtual display and allowing for remote control of Mediacenter on the pi.
NOTE: If you're using a different username than "pi", you should replace all instances of "pi" in the code below with your username.
Enter the following commands
sudo apt-get install tightvncserver
tightvncserver
After the second command, you will be prompted for a regular password, pick one you will remember. You will also be asked whether you want to create a view-only password. Type 'n'.
If it worked correctly you should see something like:
New 'X' desktop is pi:1
If you see a number other than :1 in that output, use that instead of :1 below. Now enter the following lines in the terminal
sudo vncserver -kill :1
vncserver :1 -geometry 1920x1080
You should now have a virtual desktop running on your pi. Test it out by trying to log in from another computer using a VNC client. For example, tigervnc is available for Windows, Mac, and Linux:
https://bintray.com/tigervnc/stable/tigervnc/1.4.3When you start TigerVNC it will ask you for the VNC server details. Enter the ip address* of your pi, followed by ":1". It will look something like
192.168.1.35:1
Once you enter the address, click connect, and it will prompt you for your password.
*If you don't know the ip address of your pi, enter "sudo ifconfig" in a terminal on your pi, and it will tell you. You're looking for a 4-part number separated by periods next to the phrase "inet addr." You want the one in the paragraph labelled eth0 if your pi has a wired connection or wlan0 if your pi has a wireless connection.
You should now be looking at a virtual desktop on your pi, from which you can run MC!
We're not done yet, though, as we still need to configure the pi to start the vncserver and MC on boot. The easiest way to do this is with a cron script. Type "sudo nano ~/headless" into the terminal and type the following
#!/bin/bash
export USER=pi
ps -e | grep tightvnc || vncserver :1 -geometry 1920x1080
export DISPLAY=':1'
ps -e | grep mediacenter || mediacenter20 /mediaserver
Once you're done, press CTRL-X, and choose "y" and press "enter" twice. Now type
sudo chmod 755 ~/headless
crontab -e
After you enter the second command, you may be prompted you to choose an editor; if so choose /bin/nano, which should be option 1. Now you should now be looking at a file with some information in it.
If you want mediacenter to launch on boot type the following line at the bottom of the file:
@reboot /home/pi/headless > /dev/null
If, instead, you want mediacenter to launch on boot, but also make sure that it's still running and relaunch it if it has crashed, enter the following at the bottom of the file INSTEAD of the previous
* * * * * /home/pi/headless > /dev/null
Once you've added the one you want, press CTRL-X and then "y" and "enter" twice. Now reboot your pi as described above, and within a few minutes you should be able to access MC and your VNC desktop.
There are some limitations to this method. For example, you cannot use this method to control the pi's actual display output, so you couldn't use this to remote control a pi's display when it's hooked up to a monitor.
If you want a more robust solution that doesn't have these limitations (but requires a few more steps), Hilton provided step by step instructions for a fuller featured remote access method which allows using windows remote desktop, and an alternative VNC method that allows you to remotely control the Pi. His method can be found here:
http://yabb.jriver.com/interact/index.php?topic=95578.msg666290#msg666290, with some extra configuration bits here:
https://yabb.jriver.com/interact/index.php?topic=95578.msg666323#msg666323.