EnableScreenLock not working fully on Linux

Forums / General Discussions / EnableScreenLock not working fully on Linux

Viewing 6 posts - 16 through 21 (of 21 total)
  • Author
    Posts
  • #12953
    Avatarjayltee
    Participant

    Sorry to go over this again but I create a single system image that I then install on many machines.  It is not feasible to reinstall on each one.  This was not an issue with Opensuse 13.1 as I was doing the same process there with no problem.

    Is there a specific file that identifies the server/client that I may be able to wipe clean manually?  Maybe removing a file which gets recreated at startup?

    #13066
    Avatarmlyn
    Contributor

    We are investigating how to solve this problem, in the meanwhile please use attached script to change UUID on cloned system, if NoMachine is installed in default patch on Linux script is ready to use, on other systems or not default installation patch please change only variable “path” at the beginning of script.

    #13081
    Avatarmlyn
    Contributor

    it seems it didn’t attach, so I’ve pasted it:
    #!/bin/bash

    path=/usr/NX/

    old=cat $path/etc/uuid

    sudo /etc/NX/nxserver –shutdown > /dev/null
    sudo rm $path/etc/uuid
    sudo /etc/NX/nxserver –startup > /dev/null
    sudo /etc/NX/nxserver –shutdown > /dev/null
    new=cat $path/etc/uuid

    sudo sed -i s/$old/$new/g $path/etc/nodes.db

    sudo /etc/NX/nxserver –startup > /dev/null

    echo “UUID changed form $old to $new.”;

    #13103
    Avatarjayltee
    Participant

    Thanks for the idea but it doesn’t quite work. After doing the steps above (modified to work in my environment) I end up being unable to connect to the physical desktop and get an error saying no sessions available and “The server was unable to make the local display available or access to the local display is disabled.”

    The status of the server looks different and I cannot work out how to get it to the previous state.

    Before the script:

    ischia:/usr/NX/etc # systemctl status nxserver.service
    nxserver.service – NoMachine Server daemon
    Loaded: loaded (/lib/systemd/system/nxserver.service; enabled)
    Active: active (running) since Tue 2016-12-06 15:27:59 GMT; 2s ago
    Main PID: 17694 (nxserver.bin)
    CGroup: /system.slice/nxserver.service
    ├─17694 /usr/NX/bin/nxserver.bin –daemon
    └─17749 /usr/NX/bin/nxd -p 3389

    Dec 06 15:27:59 ischia systemd[1]: Started NoMachine Server daemon.

    ischia:~ # /etc/NX/nxserver –status
    NX> 161 Enabled service: nxserver.
    NX> 161 Enabled service: nxnode.
    NX> 161 Enabled service: nxd.

    After the script:

    ischia:/usr/NX/var/log # systemctl status nxserver.service
    nxserver.service – NoMachine Server daemon
    Loaded: loaded (/lib/systemd/system/nxserver.service; enabled)
    Active: active (running) since Tue 2016-12-06 15:48:11 GMT; 5min ago
    Main PID: 22370 (nxserver.bin)
    CGroup: /system.slice/nxserver.service
    ├─22370 /usr/NX/bin/nxserver.bin –daemon
    ├─22398 /usr/NX/bin/nxserver.bin –connectionmonitor –node localhost:4000
    └─22399 /usr/NX/bin/nxd -p 3389

    Dec 06 15:48:11 ischia systemd[1]: Started NoMachine Server daemon.

    ischia:/usr/NX/var/log # /etc/NX/nxserver –status
    NX> 161 Enabled service: nxserver.
    NX> 162 Disabled service: nxnode.
    NX> 161 Enabled service: nxd.

    ########

    How can I stop the “/usr/NX/bin/nxserver.bin –connectionmonitor –node localhost:4000” from happening? Is this why the nxnode service is disabled? If not, what can I do to resolve that?

    NB. file ownership and perms are correct after the script has run.

    If I reinstall NoMachine I get back to where it works but that is what I am trying to avoid doing.

    Thanks.

    #13139
    Avatarjayltee
    Participant

    I have resorted to doing a reinstall of NX at firstboot via systemd.  Knowing if/how to resolve the last post would be useful but is less important for now.

    I am on vacation now until January.  Thanks for the work you have all done on this issue.

    Cheers.

    #13175
    Avatarmlyn
    Contributor

    We prepared new script which should fix your issue, you can use it on host where previous didn’t work.

    #!/bin/bash
    
    path=/usr/NX
    
    sudo $path/bin/nxserver --shutdown > /dev/null
    sudo rm $path/etc/uuid
    sudo $path/bin/nxserver --startup > /dev/null
    sudo $path/bin/nxserver --shutdown > /dev/null
    new=<code>cat $path/etc/uuid</code>
    
    sudo sed -i -E "s/\w{8}-\w{4}-\w{4}-\w{4}-\w{12}/$new/g" $path/etc/nodes.db
    sudo sed -i -E "s/unreachable/running/g" $path/etc/nodes.db
    
    sudo $path/bin/nxserver --startup
    
    echo "UUID changed to $new.";

    We tested it on a few different Linux distros  without any problems. That said we can’t guarantee 100% that it will work correctly on your OS with NoMachine free 5.1.54.

Viewing 6 posts - 16 through 21 (of 21 total)

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