Results 1 to 3 of 3

Thread: Run script upon VNC connection established

  1. #1

    Default Run script upon VNC connection established

    Dear experts!

    I've been trying to get VNC working for some time now.

    This is the steps I've done:
    Setting up the Server 1. Open YAST > Network Services > Remote Administration(VNC)
    2. Click the radio button "Allow Remote Administration"
    (If in the future you want to disable VNC access, you can re-run this applet and select the "Do not allow..." radio button.)
    3. Click on the radio button to open the appropriate firewall ports.
    4. Click on the "OK" button to start the installation. You will probably also be prompted to authorize installation of an x11 server, do so.
    5. Reboot.
    https://forums.opensuse.org/showthre...01#post2787001

    This probably ("probably" because I haven't tested) works fine, but I want to see the real X session and therfor have done these additional steps:


    Make password file:
    mkdir /root/.vnc/
    chmod 600 /root/.vnc/
    vncpasswd /root/.vnc/passwd
    chmod 600 /root/.vnc/passwd
    https://lists.fedoraproject.org/pipe...ch/012351.html

    Real X session:
    Uncomment "Module" and "Screen" sections inside /etc/X11/xorg.conf.d/10-libvnc.conf
    https://en.opensuse.org/VNC#Sharing_real_screen

    Please note there is a typo in "10-libvnc.conf" (a " missing behind "Screen0").
    This works fine from my mobile phone with one exeption namely that as long as compositor is enabled I get no screen updates.
    Turning compositor off makes the screen update.

    Therefor I'm looking for a way of turning compositor off as long as VNC is connected.
    Or alternatively a way of getting screen updates with compositor on.

    After googling a lot my approach to this would be to configure incron to watch a log file for VNC events and toggling compositor based on VNC connected/disconnected events.
    Problem is I can't seem to find any log files with the information I need. Also I've never used incron so a little start help would be appreciated.
    I know this won't work but something like this might do the trick!? (help!!!)
    Code:
    incrontab -e
    %logfile% IN_MODIFY if {%logfile% | tail | grep VNC connected == connected} {
     then qdbus org.kde.KWin /Compositor suspend
    }
    
    %logfile% IN_MODIFY if {%logfile% | tail | grep VNC disconnected == disconnected} {
    then qdbus org.kde.KWin /Compositor resume
    }
    Edit:
    System: openSUSE 42.2
    Last edited by Klinghust; 28-May-2017 at 12:02. Reason: adding system

  2. #2

    Default Re: Run script upon VNC connection established

    Disregard my stupid script.
    I'll probably figure out that part my self.

    It all boils down to:
    Is there a log file for VNC with connected / disconnected logs?
    If yes, where?

    Don't know if this helps but I connect to the VNC through SSH.

    Best regards
    Kling

  3. #3

    Default Re: Run script upon VNC connection established

    Give this a shot and see if it helps with your logging info!

    https://www.realvnc.com/docs/logging.html

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •