Difference between revisions of "X Windows on LSPro"

From NAS-Central Buffalo - The Linkstation Wiki
Jump to: navigation, search
Line 18: Line 18:
 
Start X-Ming launcher (X-Launch) and follow these steps for configuration:
 
Start X-Ming launcher (X-Launch) and follow these steps for configuration:
  
1. At Select Display Settings, select 'One Window'. This is my preferred approach and I would suggest you use this until you have confirmed everything is working just fine.
+
# At Select Display Settings, select 'One Window'. This is my preferred approach and I would suggest you use this until you have confirmed everything is working just fine.
2. At Select how to start Xming, select 'Open sessions via XDMCP'
+
# At Select how to start Xming, select 'Open sessions via XDMCP'
3. At Configure a remote XDMCP connection, select 'Search for hosts (broadcast)'
+
# At Configure a remote XDMCP connection, select 'Search for hosts (broadcast)'
4. At Specify parameter settings, just select next.
+
# At Specify parameter settings, just select next.
5. Save configuration to an easily accessable xlaunch file. This will be what you will use to activate X-Ming.
+
# Save configuration to an easily accessable xlaunch file. This will be what you will use to activate X-Ming.
  
 
=== Installing Debian ===
 
=== Installing Debian ===
Line 35: Line 35:
  
 
# Copied everything from /usr to /mnt/disk1/. Make sure you preserve all file right information.  
 
# Copied everything from /usr to /mnt/disk1/. Make sure you preserve all file right information.  
* '''cp -a /usr/* /mnt/disk1/'''
+
** '''cp -a /usr/* /mnt/disk1/'''
 
# Modify /etc/fstab to mount /dev/sda6 to /usr. Remove the old /dev/sda6 fstab entry and replace it with the one below. This will mean you'll need to redirect all your shares if already set up. Make sure you make a backup of the original fstab for recovery if things don't quite go right.
 
# Modify /etc/fstab to mount /dev/sda6 to /usr. Remove the old /dev/sda6 fstab entry and replace it with the one below. This will mean you'll need to redirect all your shares if already set up. Make sure you make a backup of the original fstab for recovery if things don't quite go right.
* '''cp /etc/fstab /etc/fstab.original'''
+
** '''cp /etc/fstab /etc/fstab.original'''
 
The fstab entry should be:
 
The fstab entry should be:
* '''/dev/sda6 /usr xfs,acl defaults,noatime,nodiratime 0 0'''
+
** '''/dev/sda6 /usr xfs,acl defaults,noatime,nodiratime 0 0'''
 
# Rename /usr to /oldusr. There may be some issues with processes that may be accessing /usr. I didn't have any problem with this, but you should be able to use fuser -m /usr to find out which process might be accessing that path.
 
# Rename /usr to /oldusr. There may be some issues with processes that may be accessing /usr. I didn't have any problem with this, but you should be able to use fuser -m /usr to find out which process might be accessing that path.
* '''mv /usr /oldusr''' - can be deleted later.
+
** '''mv /usr /oldusr''' - can be deleted later.
 
# Create a new mount point for the new /usr tree. I actually forgot this step. However, lb_worms [LS_PRO_modified_initrd] helped to recover from that.
 
# Create a new mount point for the new /usr tree. I actually forgot this step. However, lb_worms [LS_PRO_modified_initrd] helped to recover from that.
* '''mkdir /mnt'''
+
** '''mkdir /mnt'''
 
# Reboot the LinkStation. You should, once reboot is complete, see the normal Debian login prompt.
 
# Reboot the LinkStation. You should, once reboot is complete, see the normal Debian login prompt.
 
If you do not see the login prompt, something may be wrong with the steps above. You should easily be able to recover from these modifications by rebooting the LinkStation 3 times and it should drop in to the safe mode shell. At this point, recovery should be done like so:
 
If you do not see the login prompt, something may be wrong with the steps above. You should easily be able to recover from these modifications by rebooting the LinkStation 3 times and it should drop in to the safe mode shell. At this point, recovery should be done like so:
  
* '''rm -rf /usr'''
+
** '''rm -rf /usr'''
* '''mv /oldusr /usr'''
+
** '''mv /oldusr /usr'''
* '''cp /etc/fstab.original /etc/fstab'
+
** '''cp /etc/fstab.original /etc/fstab'
* Reboot.
+
** Reboot.
  
 
If this fails, I suggest getting on to the forums to see what can be done.
 
If this fails, I suggest getting on to the forums to see what can be done.
  
 
# Next, you will need to move the apt working directory. The root volume will be too small for installing gnome. To do this:
 
# Next, you will need to move the apt working directory. The root volume will be too small for installing gnome. To do this:
* '''cp -a /var/cache/apt /usr/local/apt'''
+
** '''cp -a /var/cache/apt /usr/local/apt'''
* '''mv /var/cache/apt /var/cache/apt.old''' - can be deleted later.
+
** '''mv /var/cache/apt /var/cache/apt.old''' - can be deleted later.
* '''ln -s /usr/local/apt /var/cache/apt'''
+
** '''ln -s /usr/local/apt /var/cache/apt'''
 
# Install gnome. This will take some time. Go make a cup of tea.
 
# Install gnome. This will take some time. Go make a cup of tea.
* '''apt-get install gnome'''
+
** '''apt-get install gnome'''
 
# Modify /etc/gdm/gdm.conf.
 
# Modify /etc/gdm/gdm.conf.
* Below the section marked [Security] add the following:
+
** Below the section marked [Security] add the following:
** '''AllowRoot=1'''
+
*** '''AllowRoot=1'''
** '''AllowRemoteRoot=1'''
+
*** '''AllowRemoteRoot=1'''
* Below the section marked [xdmcp] add the following:
+
** Below the section marked [xdmcp] add the following:
** '''Enable=1'''
+
*** '''Enable=1'''
 
# Restart gdm:
 
# Restart gdm:
* '''/etc/init.d/gdm restart'''
+
** '''/etc/init.d/gdm restart'''
  
 
At this point, you should be able to launch xming and you will, hopefully, see the Debian login screen appear.
 
At this point, you should be able to launch xming and you will, hopefully, see the Debian login screen appear.

Revision as of 07:37, 27 November 2007

Reasons for doing this

I have been attempting to get GDM running on the LSPro to allow me to do a remote X login.

The idea is fairly straight forward, I want to install the X server on a WindowsXP machine, that will allow me to connect to the linkstation and have the linkstation be the actual X server. *WARNING* X server/client terminology is awfully confusing. This is the convention I am using here:

1. X Server is a program running on the LinkStation that will allow an X client to connect to it. This is, typically, gdm or kdm controlled. 2. X Client is a remote PC, be it XP or Linux.

The X client I am using for Windows Vista is XMing. I have been using this for some time at work to connect an X session within XP to a Debian configured Linux box.

This is very much a work in progress, things aren't running 100%, but it seems to function to some extent.

Installing X-Ming

X-Ming can be obtained from SourceForge. Install each of the packages.

Start X-Ming launcher (X-Launch) and follow these steps for configuration:

  1. At Select Display Settings, select 'One Window'. This is my preferred approach and I would suggest you use this until you have confirmed everything is working just fine.
  2. At Select how to start Xming, select 'Open sessions via XDMCP'
  3. At Configure a remote XDMCP connection, select 'Search for hosts (broadcast)'
  4. At Specify parameter settings, just select next.
  5. Save configuration to an easily accessable xlaunch file. This will be what you will use to activate X-Ming.

Installing Debian

Install FreeLink as shown on the FreeLink page. My experience with this, after following the instructions to the letter, was very straight forward. I was much relieved when I saw the login prompt. Don't be scared! Just make sure you have a backup of everything, just in case.

I had just bought a DLink DNS-323 with 1TB storage that is used as a primary storage device, with the LinkStation being the backup device. After all, it *only* has 500GB.

The primary root volume does not have sufficient space to install gnome so I had to move it. I was reluctant to resize the partition due to the sheer amount of data that would have to be restored.

So, this is how I proceeded (be careful not to reboot during these steps until needed):

  1. Copied everything from /usr to /mnt/disk1/. Make sure you preserve all file right information.
    • cp -a /usr/* /mnt/disk1/
  1. Modify /etc/fstab to mount /dev/sda6 to /usr. Remove the old /dev/sda6 fstab entry and replace it with the one below. This will mean you'll need to redirect all your shares if already set up. Make sure you make a backup of the original fstab for recovery if things don't quite go right.
    • cp /etc/fstab /etc/fstab.original

The fstab entry should be:

    • /dev/sda6 /usr xfs,acl defaults,noatime,nodiratime 0 0
  1. Rename /usr to /oldusr. There may be some issues with processes that may be accessing /usr. I didn't have any problem with this, but you should be able to use fuser -m /usr to find out which process might be accessing that path.
    • mv /usr /oldusr - can be deleted later.
  1. Create a new mount point for the new /usr tree. I actually forgot this step. However, lb_worms [LS_PRO_modified_initrd] helped to recover from that.
    • mkdir /mnt
  1. Reboot the LinkStation. You should, once reboot is complete, see the normal Debian login prompt.

If you do not see the login prompt, something may be wrong with the steps above. You should easily be able to recover from these modifications by rebooting the LinkStation 3 times and it should drop in to the safe mode shell. At this point, recovery should be done like so:

    • rm -rf /usr
    • mv /oldusr /usr
    • cp /etc/fstab.original /etc/fstab'
    • Reboot.

If this fails, I suggest getting on to the forums to see what can be done.

  1. Next, you will need to move the apt working directory. The root volume will be too small for installing gnome. To do this:
    • cp -a /var/cache/apt /usr/local/apt
    • mv /var/cache/apt /var/cache/apt.old - can be deleted later.
    • ln -s /usr/local/apt /var/cache/apt
  1. Install gnome. This will take some time. Go make a cup of tea.
    • apt-get install gnome
  1. Modify /etc/gdm/gdm.conf.
    • Below the section marked [Security] add the following:
      • AllowRoot=1
      • AllowRemoteRoot=1
    • Below the section marked [xdmcp] add the following:
      • Enable=1
  1. Restart gdm:
    • /etc/init.d/gdm restart

At this point, you should be able to launch xming and you will, hopefully, see the Debian login screen appear.