Cannot find the default environment. Please contact your system administrator

Forum / NoMachine for Linux / Cannot find the default environment. Please contact your system administrator

Viewing 15 posts - 1 through 15 (of 17 total)
  • Author
    Posts
  • #16985
    unlim
    Participant

    I start to get that error message while connecting to CentOS6 node from Win10.
    Both server and client are latest.

     

    Screen attached.

    How to fix that ?

    Attachments:
    #17019
    kroy
    Contributor

    Which desktop environment do you have installed on that CentOS? You can check it with command ls /usr/share/xsessions. If there are some files – search for line started with “Exec=”. There should be a command to start a new session. That command you can put in to the DefaultDesktopCommand "" key which is in the /usr/NX/etc/node.cfg.

    Example:

    ls /usr/share/xsessions
    Output: fluxbox.desktop
    grep Exec /usr/share/xsessions/fluxbox.desktop
    Output: Exec=startfluxbox

    Now edit /usr/NX/etc/node.cfg file. And uncomment DefaultDesktopCommand and add there “startfluxbox” so in that case all line should looks like this: DefaultDesktopCommand "startfluxbox".

    #17024
    unlim
    Participant

    Thank you.
    Unfortunately, that does not change anything, problem still exists.

    # ls /usr/share/xsessions
    gnome.desktop

    # grep Exec /usr/share/xsessions/*
    Exec=gnome-session
    TryExec=gnome-session

    # grep DefaultDesktopCommand /usr/NX/etc/node.cfg
    DefaultDesktopCommand “/etc/gdm/Xsession gnome-session”

    So it does not work with that setting.
    As you suggested I have change that line to:
    DefaultDesktopCommand “gnome-session”

    and perform VDS restart.

    Result was the same, error was the same exactly.

    #17029
    kroy
    Contributor

    We couldn’t reproduce problem on centos 6.9 with Gnome. Are there any crashes in the home directory on that Linux machine?

    Can you enable debug, restart nxserver (sudo /usr/NX/bin/nxserver --restart) and reproduce problem? Please collect server side logs and send them to forum[at]nomachine[dot]com. Instructions about debug and collecting logs you can find there: https://www.nomachine.com/DT07M00098.

    #17031
    unlim
    Participant

    OK, logs were sent…

    #17044
    kroy
    Contributor

    As we can see you are starting xvfb server. NoMachine supports such kind of sessions, but you need to run GUI environment in that xvfb server if you want to see the desktop.

    There should be two solutions:

    1. Start gnome session on display with xvfb and connect again with NoMachine.
    2. Kill xvfb session and restart nxserver. Then you should be able to connect with NoMachine session.

    #17052
    unlim
    Participant

    I perform simple VDS restart few times – and this not help.
    I have following script on server boot:
    COOKIE=ps -ef | md5sum | cut -f 1 -d " "
    AUTHFILE=$HOME/Xvfb-0.auth
    xauth -f $AUTHFILE add :0 MIT-MAGIC-COOKIE-1 $COOKIE
    xauth add :0 MIT-MAGIC-COOKIE-1 $COOKIE
    Xvfb :0 -auth $AUTHFILE -screen 0 1920x1080x24 &
    DISPLAY=:0 nohup /etc/gdm/Xsession gnome-session &

    I tried to not run that script on server boot – still no luck.

    What should I do more ?

    #17065
    kroy
    Contributor

    Since version 5 there is no need to create a display manually. A new desktop should be created automatically if there is no physical display (https://www.nomachine.com/FR10L02842).

    It looks like the main problem is a wrong installation of the graphical environment. Please refer to https://www.nomachine.com/accessing-your-remote-linux-desktop-on-amazon-elastic-compute-cloud-via-NoMachine. There is “Getting the VM desktop environment ready” paragraph with useful commands to install GUI. You can find there full instruction how to use NoMachine on headless machine.

    #17072
    unlim
    Participant

    OK, I perform those instructions from link you suggested.

    They didn’t help.

    Pls note that this VDS was working for years. And problem start to happen for few days only (maybe from last NX update).

    Here are the output:

    # yum update -y
    Loaded plugins: fastestmirror, priorities, refresh-packagekit
    Setting up Update Process
    Determining fastest mirrors

    extras                                                                                                                                                                    | 3.4 kB     00:00
    updates                                                                                                                                                                   | 3.4 kB     00:00
    vz-base                                                                                                                                                                   |  951 B     00:00
    vz-updates                                                                                                                                                                |  951 B     00:00
    No Packages marked for Update

     

    # yum groupinstall -y “Desktop”
    Loaded plugins: fastestmirror, priorities, refresh-packagekit
    Setting up Group Process
    Loading mirror speeds from cached hostfile

    base/group_gz                                                                                                                                                             | 226 kB     00:00
    Package nautilus-2.28.4-26.el6.x86_64 already installed and latest version
    Package 1:control-center-2.28.1-41.el6.x86_64 already installed and latest version
    Package gvfs-smb-1.4.3-27.el6.x86_64 already installed and latest version
    Package xdg-user-dirs-gtk-0.8-7.el6.x86_64 already installed and latest version
    Package gnome-power-manager-2.28.3-7.el6_4.x86_64 already installed and latest version
    Package alsa-plugins-pulseaudio-1.1.0-1.el6.x86_64 already installed and latest version
    Package at-spi-1.28.1-2.el6.centos.x86_64 already installed and latest version
    Package 1:gdm-2.30.4-67.el6.x86_64 already installed and latest version
    Package notification-daemon-0.5.0-1.el6.x86_64 already installed and latest version
    Package 1:NetworkManager-0.8.1-113.el6.x86_64 already installed and latest version
    Package 1:NetworkManager-gnome-0.8.1-113.el6.x86_64 already installed and latest version
    Package polkit-gnome-0.96-4.el6.x86_64 already installed and latest version
    Package gnome-session-2.28.0-24.el6.x86_64 already installed and latest version
    Package gnome-terminal-2.31.3-11.el6_6.x86_64 already installed and latest version
    Package gnome-panel-2.30.2-16.el6.x86_64 already installed and latest version
    Package gvfs-fuse-1.4.3-27.el6.x86_64 already installed and latest version
    Package metacity-2.28.0-23.el6.x86_64 already installed and latest version
    Package gnome-screensaver-2.28.3-28.el6.x86_64 already installed and latest version
    Package yelp-2.28.1-17.el6_3.x86_64 already installed and latest version
    Package 1:dbus-1.2.24-8.el6_6.x86_64 already installed and latest version
    Package gvfs-archive-1.4.3-27.el6.x86_64 already installed and latest version
    Package 1:gdm-user-switch-applet-2.30.4-67.el6.x86_64 already installed and latest version
    Package 1:control-center-extra-2.28.1-41.el6.x86_64 already installed and latest version
    Package eog-2.28.2-4.el6.x86_64 already installed and latest version
    Package gnome-packagekit-2.28.3-10.el6.x86_64 already installed and latest version
    Package gok-2.28.1-5.el6.x86_64 already installed and latest version
    Package gnome-media-2.29.91-6.el6.x86_64 already installed and latest version
    Package gnome-vfs2-smb-2.24.2-8.el6.x86_64 already installed and latest version
    Package openssh-askpass-5.3p1-123.el6_9.x86_64 already installed and latest version
    Package pulseaudio-module-x11-0.9.21-26.el6.x86_64 already installed and latest version
    Package pulseaudio-module-gconf-0.9.21-26.el6.x86_64 already installed and latest version
    Package 1:gnome-applets-2.28.0-7.el6.centos.x86_64 already installed and latest version
    Package orca-2.28.2-1.el6.x86_64 already installed and latest version
    Package vino-2.28.1-10.el6.x86_64 already installed and latest version
    Package 1:gdm-plugin-fingerprint-2.30.4-67.el6.x86_64 already installed and latest version
    Warning: Group basic-desktop does not have any packages.
    No packages in any requested group available to install or update

    #17075
    kroy
    Contributor

    It’s looks like it is a system issue. For some reason gnome-session cannot start on the display. Please note that your screenshot is what you can see on display with xvfb server. NoMachine is just connecting there.

    Did you try solution with disabled xvfb server and allow NoMachine to create the desktop? Is there shows the same messagebox? Can you check if there is no .xsession-error file in home directory? Can you attach it here?

    #17078
    unlim
    Participant

    There is no /home/user/.xsession-error.

     

    How exactly can I “solution with disabled xvfb server and allow NoMachine to create the desktop” ?

    #17087
    kroy
    Contributor

    There is two options. First: disable the startup script which runs Xvfb and reboot the system. Second: kill Xvfb process and restart nxserver (sudo /usr/NX/bin/nxserver --restart).

    In both cases if you connect to that server you should see: “Cannot detect any display running. Do you want NoMachine to create a new display and proceed to connect to the desktop?” in the nxplayer window. Then click on “Yes” and that should start the session, which you have set in the DefaultDesktopCommand key (in your case: “/etc/gdm/Xsession gnome-session”).

    #17089
    unlim
    Participant

    I see.

    I said earlier that I already tried to run VDS w/o that script – w/o Xvfb.
    And problem not gone.
    I just tried one more time – problem still appear.

    And I do not see “Cannot detect any display running. Do you want …” in any case.
    Earlier, before this problem, I saw that message (it appears within client interface).
    But now, when I have this problem, I do not see this message (“Cannot detect…”) at all.

    #17092
    kroy
    Contributor

    The problem is that – on your machine a physical session is running without GUI environment. Whilst that is still running NoMachine will be connecting there.

    If you want to connect via NoMachine to gnome-session on that machine, you need to shutdown that existing session without GUI. Then restart nxserver.

    #17098
    unlim
    Participant

    I see.
    But seems, I do that already – I disable startup script and restart whole VDS.
    What should I do more ?

    # ps -elfH
    F S UID        PID  PPID  C PRI  NI ADDR SZ WCHAN  STIME TTY          TIME CMD
    5 S root         1     0  0  80   0 –  4820 poll_s Jan06 ?        00:00:00 init
    1 S root         2     1  0  80   0 –     0 kthrea Jan06 ?        00:00:00   [kthreadd/10006]
    1 S root         3     2  0  80   0 –     0 kthrea Jan06 ?        00:00:00     [khelper]
    5 S root       459     1  0  80   0 – 44418 poll_s Jan06 ?        00:00:03   /sbin/rsyslogd -i /var/run/syslogd.pid -c 5
    5 S root       726     1  0  80   0 –  1028 n_tty_ Jan06 ?        00:00:00   /sbin/mingetty console
    5 S root       727     1  0  80   0 –  1028 n_tty_ Jan06 ?        00:00:00   /sbin/mingetty tty2
    5 S root       721     1  0  80   0 – 16577 poll_s Jan06 ?        00:00:01   /usr/sbin/sshd
    5 S root       687     1  0  80   0 –  5289 hrtime Jan06 ?        00:00:00   /usr/sbin/atd
    5 S smmsp      659     1  0  80   0 – 19579 sys_pa Jan06 ?        00:00:00   sendmail: Queue runner@01:00:00 for /var/spool/clientmqueue
    5 S root       672     1  0  80   0 –  5009 hrtime Jan06 ?        00:00:00   crond
    5 S root       628     1  0  80   0 – 16636 skb_wa Jan06 ?        00:00:00   /usr/sbin/saslauthd -m /var/run/saslauthd -a pam -n 2
    5 S root       629   628  0  80   0 – 16636 fcntl_ Jan06 ?        00:00:00     /usr/sbin/saslauthd -m /var/run/saslauthd -a pam -n 2
    5 S root       650     1  0  80   0 – 22758 poll_s Jan06 ?        00:00:02   sendmail: accepting connections
    5 S root       616     1  0  80   0 –  5441 poll_s Jan06 ?        00:00:00   xinetd -stayalive -pidfile /var/run/xinetd.pid
    5 S 68         539     1  0  80   0 –  8911 poll_s Jan06 ?        00:00:00   hald
    5 S root       540   539  0  80   0 –  5111 poll_s Jan06 ?        00:00:00     hald-runner
    5 S root       541     1  0  80   0 – 11260 poll_s Jan06 ?        00:00:00   /usr/sbin/wpa_supplicant -c /etc/wpa_supplicant/wpa_supplicant.conf -B -u -f /var/log/wpa_supplicant.log -P /var/run
    5 S root       516     1  0  80   0 – 23070 ep_pol Jan06 ?        00:00:00   cupsd -C /etc/cups/cupsd.conf
    5 S root       494     1  0  80   0 – 23142 poll_s Jan06 ?        00:00:00   NetworkManager –pid-file=/var/run/NetworkManager/NetworkManager.pid
    5 S dbus       481     1  0  80   0 –  5403 poll_s Jan06 ?        00:00:00   dbus-daemon –system
    5 S nx         218     1  0  80   0 – 149459 poll_s Jan06 ?       00:00:03   /usr/NX/bin/nxserver.bin root 1 –daemon
    5 S nx         765   218  0  80   0 – 139490 futex_ Jan06 ?       00:00:00     /usr/NX/bin/nxd
    5 S root       498     1  0  80   0 – 14521 poll_s Jan06 ?        00:00:00   /usr/sbin/modem-manager
    5 S root       144     1  0  80   0 –  2679 poll_s Jan06 ?        00:00:00   /sbin/udevd -d
    0 S root     12965     1  0  80   0 –  2873 do_wai 15:21 pts/0    00:00:00   -bash
    0 R root     12996 12965  0  80   0 –  3342 –      15:21 pts/0    00:00:00     ps -elfH

Viewing 15 posts - 1 through 15 (of 17 total)

This topic was marked as solved, you can't post.