LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Freenx Server, the Client always crashes for one user, other users work (https://www.linuxquestions.org/questions/linux-server-73/freenx-server-the-client-always-crashes-for-one-user-other-users-work-777104/)

zurcherart 12-20-2009 04:55 PM

Freenx Server, the Client always crashes for one user, other users work
 
I almost have the FreeNX server running successfully on Ubuntu (Jaunty).

However, when I use the NX Client to login, the client crashes (log shows segfault) just as soon as the user X session starts up.

What I realize though, is that my user is the only user that has this problem. I can use the same NX Client to login to the other user on the machine ... the client establishes the connection and everything works perfectly.

I can also create a new user, and login through the NX Client, see the desktop and everything works perfectly.

So there is something going on with my main user that crashes the NX client.

The only hint I have is the .xsession-errors log on the server for the failing login.

Code:

Xsession: X session started for zzzzzzz at Sun Dec 20 23:31:07 CET 2009
No protocol specified
xrdb: Permission denied
xrdb: Can't open display ':1001'
Setting IM through im-switch for locale=en_US.
Start IM through /etc/X11/xinit/xinput.d/all_ALL linked to /etc/X11/xinit/xinput.d/default.
No protocol specified
I: caps.c: Limited capabilities successfully to CAP_SYS_NICE.
I: caps.c: Dropping root privileges.
I: caps.c: Limited capabilities successfully to CAP_SYS_NICE.
No protocol specified
E: client-conf-x11.c: XOpenDisplay() failed
Failure: Module initalization failed
No protocol specified
GPG_AGENT_INFO=/tmp/seahorse-mCTpBn/S.gpg-agent:2747:1; export GPG_AGENT_INFO

The xrdb errors seem to be where the problem lies. The login sessions for successful users don't have these errors But I have no idea what to do next to troubleshoot this further.

I have tried this from two different clients machines (1 ubuntu client and one MacOs Client) and two different clients (nx client, and qtnx) and the result is always exactly the same.

Is anyone able to help me troubleshoot this?

zurcherart 12-20-2009 05:03 PM

Well, just after as I asked for help, I solved my problem. I decided to remove my .Xauthority file and let the system recreate it.

I don't understand what was offending the system in that file ... but deleting .Xauthority DID solve the problem.

On further thought, I think the original problem was that the user I was having trouble with had compiz+fusion going--which pretty much doesn't work with the freenx server. It's pretty well-documented around the forums that if the default compositor is running on the server with Freenx the client will sigfault. Maybe during one of the failed login attempts my .Xauthority became corrupted so that afterwards even after I disabled the compiz+fusion I kept getting the sigfaults. Or, maybe it was a different problem.

If it helps someone else here is what I did to successfully create an environment so that I could login to my Ubuntu development "workhorse" from my Apple Mac desktop or my Ubuntu laptop.

First, I followed the instructions to install the freenx server on Ubuntu (Jaunty) here (but I used Synaptic rather than the command line): https://help.ubuntu.com/community/FreeNX

Don't forget the step:
Code:

sudo /usr/lib/nx/nxsetup --install
I'm used to Synaptic doing everything, so I almost overlooked that one CLI step which is of course necessary.

Make sure the user account you will be logging into doesn't start a fancy compositor:
Code:

System > Preferences > Appearances > Visual Effects > None
It's ok to turn the compositing feature on in Metacity. Metacity will be running with Visual Effects set to none, but on my installation the compositing functino of Metacity was disabled. The compositing is rudimentary, but it does give you alt-tab, I'm told it works with AWN, and it doesn't crash the client:
Code:

gksudo gconf-editor (Apps -> Metacity -> General-> tick compositing-manager )
I followed the instructions contained in the first link to install the qtnx client on my Ubuntu Laptop (via Synaptic).

I installed the free Mac client from NoMachine on my Mac Desktop. (Honestly, I can't see any significant difference between qtnx client and the NX Client from NoMachine--but it's also nice to have both running for comparison/troubleshooting.)

As reported earlier, both clients kept crashing on both machines when attaching to a specific user (which previously had compositing enabled, whether that is fully relevant or not I don't know). Deleting .Xauthority in the users home directory solved the problem for me.

Finally, my user theme decorations were all wrong (and a bit ugly) most of the time (though occasionally they'd be ok ?!??). This is apparently caused by this bug: Free-nx, gnome-settings-daemon and Jaunty not working correctly (which is apparently present in both Karmic and Jaunty)

Downgrading libxklavier to version 3.9-0ubuntu1 fixed the issue for me. (In Synaptic find libxklavier, highlight it, from the package menu chose "Force Version ...")

(To reduce the complications I have not tried--yet--to change the default NX key used in the authentication steps....)

Now finally, I have have actual multi-user logins (not desktop sharing) to the Ubuntu Server from a Mac an Ubuntu Laptop. It all works seamlessly and it's FAST. Most importantly the keyboard mapping from the Mac keyboard is perfect (which was a problem with alternative solutions like XDMPC/Xephyr etc). It just took lots of "fiddling" to get things just right.

Maybe someone else will benefit from my experience.


All times are GMT -5. The time now is 08:15 AM.