Forum / NoMachine for Linux / Cannot find default environment after TR09N07188 fix
- This topic has 17 replies, 4 voices, and was last updated 7 years, 8 months ago by Britgirl.
-
AuthorPosts
-
November 29, 2016 at 09:11 #13022EddieAParticipant
This is a continuation of my previous post.
I upgraded to 5.1.62 as per the Trouble Report. However, I still get the “Cannot find default environment” when starting a session.
Re-captured the logs and attached.
Cheers.
Attachments:
December 5, 2016 at 10:29 #13082MthContributorHello
First of all, it seems that there is something wrong with configuration files.
Can you please send us whole /usr/NX/var/log directory along with /usr/NX/etc/server.cfg
and /usr/NX/etc/node.cfg for investigation?To fix it please try a clean installation – uninstall, remove the /usr/NX directory then install again.
If this does not help, please enable the logs as described here: https://www.nomachine.com/DT04M00076
then do /etc/NX/nxserver –restart as administrator and send us the /usr/NX/var/log directory.Also it would help to debug the source of problem if you include the output of
ps awwxo uid,ppid,pid,sid,comm,args
when logged on to desktop.
Please send the logs to forum[at]nomachine[dot]com referencing the post topic in the mail title.
December 6, 2016 at 08:46 #13089EddieAParticipantFirst thing I did was save off the files: /usr/NX/etc/server.cfg and /usr/NX/etc/node.cfg. I can forward them on, if still needed. The log directory was attached to my previous post.
I then uninstalled NX and did an “rm -r /usr/NX” to (hopefully) remove all remnants.
Next, I (re-)installed version 5.1.62. Trying to connect from Windows 10, I now get this message: Cannot run startkde. Please ensure that the requested application is in the system PATH and that you have the appropriate credentials to execute it.
So, I did a “find” on startkde and it threw up just one copy in /usr/bin/startkde, with permissions: -rwxr-xr-x And obviously, /usr/bin, is available in the PATH to all users.
Logs an ps output captured and attached.
Cheers.
Attachments:
December 15, 2016 at 08:46 #13189MthContributorHello
It seems the server has trouble with finding working display. Can you give us
the output of:# lsof -a -c Xorg -U
And if it gives any output, also:
# /bin/netstat -ln –protocol=unix
# ls /tmp/.X11-unix/
If the output include any sockets named like
/tmp/.X11-unix/X0
please make sure that netstat has access rights on at least 755.
If not, there is a possibility that Xorg server has disabled listening on unix sockets, which are vital for connecting via NoMachine. Are you aware of any changes made in this regard? (any changes
in system configuration files, startx script etc.)December 21, 2016 at 14:19 #13237EddieAParticipantSorry, I’ve been out of town for a few days and only just saw this.
At what point are you asking for these commands to be run, as I am not using NoMachine to connect to an existing X11 session. I an using the option to create a session on connection as per https://www.nomachine.com/FR10L02842.
This works perfectly on Slackware 14.1 with KDE 4.14.3, but not Slackware 14.2 with KDE 5.16.07.
Cheers.
January 4, 2017 at 09:11 #13401MthContributorHello.
It seems that the problem lies in DefaultDesktopCommand key from node.cfg.
Please find this key in the /usr/NX/etc/node.cfg file. By default it should look like:
DefaultDesktopCommand “/usr/bin/dbus-launch –exit-with-session startkde”
You need to change the startkde to full path to this program eg:
DefaultDesktopCommand “/usr/bin/dbus-launch –exit-with-session /usr/bin/startkde”
If this does not help please edit the /usr/bin/startkde file by adding
set -x
line at the start.
Then please make sure that the SessionLogClean key in /usr/NX/etc/node.cfg
is uncommented and set to 0.SessionLogClean 0
reproduce the problem and send us the logs again.
January 9, 2017 at 08:42 #13441EddieAParticipantOK, one more step along this time, so beginning to make progress.
On trying to connect, I got the “User connected” pop-up instead of the previous error, but then instead of the KDE start-up splash I just got a black screen with a simple, white, pop-up window that said: “Could not start D-Bus. Can you call qdbus?”.
Stopped NX, updated /usr/bin/startkde, cleared the old logs, and started NX. Reproduced issue and collected server logs. Attached.
This line in one of the node logs caught my eye: /usr/bin/startkde: line 25: qtpaths: command not found
So, it looks like the $PATH from the environment is not making it into the NX start.
I updated that line in /usr/bin/startkde to have the full path for qtpaths, and tried again. This time, no pop-up, but again no KDE splash screen and just a black background. I didn’t bother capturing the logs for this, as I’m sure it’s just going to show the same type of “command not found” error, but just later in the process.
Cheers.
Attachments:
January 10, 2017 at 13:01 #13469EddieAParticipantAnother update.
Looking through some of the scripts that are executed at NX start-up, that manipulate PATH, I found: /etc/NX/etc/nxserver. Turning on debug for this script, I see the following where it checks the current setting of PATH:
+ test x = x
+ export PATH=/bin:/usr/bin
Which could explain why later in the process I see this error, as mentioned above:
/usr/bin/startkde: line 25: qtpaths: command not found
But not why /usr/bin/startkde is not found. Strange.
Cheers.
January 12, 2017 at 12:30 #13512BritgirlKeymasterAfter many attempts, we’ve finally been able to reproduce it. It would appear to be more of a problem with KDE 5, not NoMachine. Whilst we investigate further, it might be better to use an alternative desktop environment until we’ve identified a workaround. When we have some more info we’ll post it here.
January 17, 2017 at 08:25 #13546EddieAParticipantLooking at the traces I pulled from /etc/NX/nxserver and /etc/NX/nxnode, to me it looks like these are both called without the underlying PATH from root being propagating through. Aren’t these both called before startkde is invoked, which is the reason for the initial “Cannot find default environment” issue.
Cheers.
January 20, 2017 at 11:29 #13575BritgirlKeymasterYes, the proper path is not being received (but this is just the tip of the iceberg) We’ll update the topic once we’ve got some more info.
April 4, 2017 at 15:01 #14245EddieAParticipantAny progress on this ??
Cheers.
April 4, 2017 at 15:06 #14255BritgirlKeymasterSorry for not providing any further news on this. It’s in the queue, we promise 😉
April 18, 2017 at 09:36 #14457zaqParticipantHello EddieA
Could you set in your Slackware /usr/NX/etc/node.cfg:
DefaultDesktopCommand "/usr/bin/startSession.sh"
Put attached script to /usr/bin/ and set this permissions:
chown root:root /usr/bin/startSession.sh
chmod 555 /usr/bin/startSession.sh
and try to run NoMachine connection to your Slackware.
- This reply was modified 7 years, 8 months ago by zaq.
- This reply was modified 7 years, 8 months ago by zaq.
Attachments:
April 21, 2017 at 07:07 #14512EddieAParticipantOK, that seems to work. Thank you.
Cheers.
BTW It was pure chance I spotted this update, as I didn’t get an e-mail, despite having the “Notify me” box ticked. Now on to reporting the issue I have with an ARM installation. 🙂
-
AuthorPosts
This topic was marked as solved, you can't post.