Showing posts with label fedora. Show all posts
Showing posts with label fedora. Show all posts

Saturday, October 9, 2010

setting up freeNX server on Fedora-13

I have two machines, 1 running fedora-13 and other one running windows XP. I was exploring the options so that I can connect to fedora from windows and get a gnome desktop session. First option that came to my mind is setting up a vnc server on fedora and connecting to it from a vnc client running on windows.
While I was googling, I came through another option - NoMachine NX. NoMachine has a proprietary NX protocol that is supposed to be very optimized and (from the reviews I read) provides much better experience than vnc. And, I thought I will try this one.

NoMachine itself offers free nx client for windows(and for other platforms as well) and there is a free nx server implementation available. So, here is how you install both.

  • on windows machine download nx client for windows and install it, its a fairly trivial process. At the time, I got version 3.4.0-7.
  • on fedora-13 machine, do "yum install freenx-server". At the time, I got freenx-server-0.7.3-18.fc13.i686

Its easy to setup the client with information of the machine you want to connect to. BTW as nx uses ssh, make sure ssh is running on the fedora machine and that you can connect to it using a ssh client on windows machine.

Well, then I tried to connect... provided the username/password for an account that is already setup on fedora. But, it did not work. And, here is the troubleshooting process.

on windows, I used putty to connect to the fedora machine just to make sure that pure ssh connection to fedora was working fine. it was fine. Then, I looked up the "details" provided by nx client, and here is what I saw..
NX> 203 NXSSH running with pid: 4864
NX> 285 Enabling check on switch command
NX> 285 Enabling skip of SSH config files
NX> 285 Setting the preferred NX options
NX> 200 Connected to address: 192.168.1.3 on port: 22
NX> 202 Authenticating user: nx
NX> 208 Using auth method: publickey
NX> 204 Authentication failed.
It looked like that my regular user was connecting fine but nx client is not being able to connect user "nx" using public key authentication. I checked on fedora machine and "nx" user was setup properly(used, "grep -i nx /etc/passwd"). Now it was a trivial affair of getting public key authentication working for user "nx". So, here is how you do it.

Create public-private dsa keys(note that current nx client can not support rsa keys), using "ssh-keygen -t dsa" and remember *not to* give a pass-phrase. On fedora machine, copy the contents of public key to ~nx/.ssh/authorized_keys2 and on windows machine, start nx client, click configure, then tab general, then button Key and copy the contents of private key to the opened window. click the save and ok buttons.(BTW, this is a very short version of setting up ssh public key authentication for a user. If you're not familiar with it already then just look for "ssh public key authentication" on google, this is not a nx client specific but regular ssh stuff)

Now, connect and voila :)

[UPDATE: Nov 05' 11] NoMachine has started giving a free edition of its server for linux and I have started using it instead of freenx-server. It can be downloaded here. All the necessary installation details are there on the mentioned page. Same are copy/pasted here.

RPM version

  • Download the RPMs
  • Change your working directory to the location where you saved the package and install it by running from a console:

    # sudo rpm -i nxclient-3.5.0-7.i386.rpm
    # sudo rpm -i nxnode-3.5.0-7.i386.rpm
    # sudo rpm -i nxserver-3.5.0-9.i386.rpm
If you don't have the sudo utility installed, log on as superuser ("root") and run the commands without sudo.
Note: The NX service can be controlled by the command /usr/NX/bin/nxserver --status|--start|--stop|--restart. Additional commands are available to configure the server. Try /usr/NX/bin/nxserver --help for more information.


Once you do the install you will still need to add your dsa public key to the NX_USER_HOME/.ssh/authorized_key2 .
On Fedora, NX_USER_HOME = /usr/NX/home/nx , Btw it can be easily found by running following command
> grep -i nx /etc/passwd
nx:x:488:474::/usr/NX/home/nx:/usr/NX/bin/nxserver

Important Note: If you have freenx-server setup already then you should remove that before installing nx{client,node,server} by running following commands.
>/sbin/service freenx-server stop
>yum remove freenx-server
>userdel -fr nx #this user was created while freenx-server installation, removing this is *critical*

Friday, October 8, 2010

troubleshooting wireless card with Fedora-13

Last week, I bought a new shiny lenovo Z560-59045422 laptop. It has windows-7 home basic pre-installed with 4 partitions. As usual, I set on to installing fedora(latest one available right now is Fedora-13). I shrinked the C: drive and deleted D: drive so as to have most of space available to Fedora. Then I installed Fedora-13 on it using the dvd ISO image.

I rebooted the machine, and everything worked fine except that Network Manager did not show anything like "Wireless Networks". That is, I could not get connected to my wifi network, however wired ethernet was working fine. It took very small time, with some googling, to figure out that fedora iso probably did not have drivers for the wireless card.

With some more googling, I landed on Getting Started with Wireless - Fedora Unity Project and determined, using /sbin/lspci, that my laptop has "Broadcom Corporation BCM4313 802.11b/g LP-PHY (rev 01)" wireless card. And then I landed on Broadcom Linux STA Driver - Fedora Unity Project. As mentioned on the previous link, I did following things...
  • Added RPMFusion repository (both the free and non-free, it is essential to have non-free because only it has what we need, the broadcom-wl)
  • Updated the system, "yum update"
  • Installed broadcom-wl package, "yum install broadcom-wl"
  • rebooted the system
Its working like a charm now, I'm so happy :)

Saturday, August 1, 2009

Installing Fedora11 from Hard-disk

I have had Fedora-9 installed since long and wanted to move to Fedora-11. I also have windows xp already installed, Here is how I installed Fedora-11 from the hard disk itslef...

  • Booted the machine in windows, downloaded the fedora11 dvd iso in one partition(d:\, its FAT32).

  • Extracted images/install.img from fedora archive into d:\images\

  • Extracted vmlinuz, initrd.img from isolinux directory in the fedora archive into c:\boot\ from the above iso.

  • Downloaded grub4dos-0.4.1.zip and extracted folder grub into c:\boot\.

  • Edited c:\boot\grub\menu.lst, and appended following..
    title my fedora-11 install
    kernel (hd0,0)/boot/vmlinuz
    initrd (hd0,0)/boot/initrd.img

  • Extracted file grldr from grub4dos-0.4.1.zip to c:\.

  • Edit boot.ini and ..append c:\grldr="Start Linux" at the end with a newline.

  • Reboot the machine, select "my fedora-11 install" , on prompt for source of installation select Hard-disk, then select the partition where you saved the fedora iso and then the anaconda installer launches. I like to keep SElinux disabled.


Others...This is the extra stuff I did to start with....

  • Added rpmfusion yum repository to get smplayer.

  • Installed kdebase package for konsole.