Wednesday, February 17, 2016

The Netbook Server - You Need To Be Able To Look In Remotely With XRDP

Blogs have many purposes.  One that is not often stated is that it serves as a place to put things that the writers feel they need to remember.  I have a habit of creating Linux computers for my own personal desktop use or as a server from time to time.  It isn't often enough for me to memorize everything, and you do forget things.

So to make it easier, I'm going to do this in a couple of steps.  Last time I wrote, I talked long and hard about setting up either a RaspberryPi or a Netbook as a server.  The reality is that these instructions work with pretty much anything that takes a version of Debian as the operating system.  Since Debian has been copied and serves as one of the main "seeds" of the trees of distributions, the instructions can be used elsewhere. 

If you followed those instructions, at this point you now have a computer that has Debian.  It's time to get it Up To Date, and set up so that it can be seen from other computers on your network.  The reality is that this is pretty simple and if I cut out the editorializing, it could be written in about three well crafted paragraphs.

Most Linux distributions take a "You're the boss" attitude.  If you break it, you can fix it, but it will allow you to break it if you know the right commands.  Most also take the attitude that it will only install what you need to be a "role" of a desktop/laptop or a server.  Debian Linux is an excellent desktop or laptop for general home or office uses.  I use it for 95% of my own computing needs, but there are some things that need to be added.

----

Firstly, start the computer, and log in.

Second, get your terminal started up.  Terminal will look like the old style DOS computers.  It's a command line interface - you type stuff in.  Not to worry, all the commands I type in can be copied from this blog article and pasted directly into your terminal session. 

Third, you have to be "Root".  Root is the administrator of the computer.  When you created your computer you gave it two passwords.  They may be the same one, but the one that you need is your root password.  In Terminal type in: su .  Enter in your root password.

The result is that everything that you do in the terminal window has full control over your computer.  It will allow you to completely remove everything, so be careful.  It is after all, at your own risk.

Fourth - get the computer up to date.  In terminal you need to enter in three commands, one after another.  Each time, if there are changes, it will ask you to enter a "y" or "n" depending if you want to continue.  If you simply hit enter under Debian 8, it will assume you want to continue.

  • apt-get update
  • apt-get upgrade
  • apt-get dist-upgrade

What that says is update the list of programs that you know about.  Then find out if there are any upgrades and give you the option to upgrade or not.  Then if there is a distribution upgrade, give you the option to upgrade or not.  Distribution upgrades are rare.  Sometimes there are updates that require you to enter in some information.  In this case, you will need to consult the internet for what is going on.  Mine was asking for a "Root Certificate" update and put up a list of changes. I read it, typed q to quit, and it went back to installing "stuff".  Major changes could be much more involved.

Depending on what is installed, you may want to restart your computer.  Linux does not require this, but sometimes you should.  It's up to you, I did, and all that took me a good half hour to get to this point.  Get something to drink and settle in.  When you get back, get yourself back to a terminal and log in as root.

I'll wait.

---

Next step.  Remote Desktop.  Why you need this is that if you get this beast up and running you may decide to put it in a closet somewhere.  Inconvenient.  You might want to do work on it directly.  So why not be able to start a window up and actually look at the desktop.  Windows has the software available to look at it installed on the newer versions - RDP. 

It also makes it easier for me to sit at one computer and work on two at the same time.  Keyboard in lap is easier than two keyboards on a desk.  I can relax!

To install type:  apt-get install xrdp

To get it to work, you simply open up a remote desktop client to the computer name and you will get a windowed representation of the other computer.   This can be adjusted to size in the configuration files.  Without any tweaks, it worked on my Linux machine using Remmina. 

What it is actually doing is getting you to log into another session on the remote Linux machine.  If this were windows, it would take over the existing session.  Linux gives you the option to do it that way as well, but you would need to reconfigure it.

It is a little odd to see the default behavior.  I had the computer up under remote desktop, and it was sitting on my desk near me.  Screensaver came on on the table, but not on the remote desktop.  Then when remote desktop went to screensaver, it was different from the table.  Shows that you're under a completely different session by the default behavior. 

---


To actually use the machine remotely:



You need to know what IP Address the remote computer is "at".   Most times the machine name you gave it when you installed the operating system will be visible to the world.  I find that usually shows up when the network is set up with sharing via something called Samba.  Installing Samba can be an annoying process.

ifconfig -  the old school way of doing things. 

open that terminal prompt on the computer and log in with su as root.  Once there, type in ifconfig.  You will get a bunch of text.  If the computer is connected with an "ethernet" wire to the network, you need to look at the "eth0" otherwise, "wlan0" is most likely how you are connected with Wifi.

The line you are looking for will be the second one in the group for wlan0 or eth0.  Look for "inet addr:" and you will find your internet address.   In the case of the picture below, I am on wlan0 (wifi), and my internet address is 192.168.1.208 .

Open your remote desktop program.  You may have to actually install one in windows.  Since I use mine so heavily I might have done that literally years ago.  Mine was found by clicking:

  • start
  • all programs
  • windows accessories
  • remote desktop connection
For me to connect to my server, I enter the IP address 192.168.1.206 in the computer box, then click connect.

There you will have to enter in the log in information to log into xrdp.

  • sesman-Xvnc
  • your login will be your username on the computer
  • your password for the computer

Hopefully you will get there and you will see a desktop - here's mine!


No comments:

Post a Comment