vnc issue after reboot


 
Thread Tools Search this Thread
Operating Systems Solaris vnc issue after reboot
# 8  
Old 11-07-2012
It's not the display number that is an issue, just let it find an open one, but my vncserver gets chatty along the way. That option is passed to Xvnc, apparently:
Code:
$ vncserver -h
usage: vncserver [:<number>] [-name <desktop-name>] [-depth <depth>]
                 [-geometry <width>x<height>]
                 [-pixelformat rgbNNN|bgrNNN]
                 <Xvnc-options>...
       vncserver -kill <X-display>
 
$
 
 
 
#
# CheckDisplayNumber checks if the given display number is available.  A
# display number n is taken if something is listening on the VNC server port
# (5900+n) or the X server port (6000+n).
#
sub CheckDisplayNumber
{
    local ($n) = @_;
    socket(S, $AF_INET, $SOCK_STREAM, 0) || die "$prog: socket failed: $!\n";
    eval 'setsockopt(S, &SOL_SOCKET, &SO_REUSEADDR, pack("l", 1))';
    if (!bind(S, pack('S n x12', $AF_INET, 6000 + $n))) {
        close(S);
        return 0;
    }
    close(S);
    socket(S, $AF_INET, $SOCK_STREAM, 0) || die "$prog: socket failed: $!\n";
    eval 'setsockopt(S, &SOL_SOCKET, &SO_REUSEADDR, pack("l", 1))';
    if (!bind(S, pack('S n x12', $AF_INET, 5900 + $n))) {
        close(S);
        return 0;
    }
    close(S);
    if (-e "/tmp/.X$n-lock") {
        warn "\nWarning: $host:$n is taken because of /tmp/.X$n-lock\n";
        warn "Remove this file if there is no X server $host:$n\n";
        return 0;
    }
    if (-e "/tmp/.X11-unix/X$n") {
        warn "\nWarning: $host:$n is taken because of /tmp/.X11-unix/X$n\n";
        warn "Remove this file if there is no X server $host:$n\n";
        return 0;
    }
    if (-e "/usr/spool/sockets/X11/$n") {
        warn("\nWarning: $host:$n is taken because of ".
             "/usr/spool/sockets/X11/$n\n");
        warn "Remove this file if there is no X server $host:$n\n";
        return 0;
    }
    return 1;
}

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Linux

Issue in Bonding during Reboot(Linux)

Respected Members, We encountered an issue during node reboot when eth1 and eth5 of bond1 were behaving unusual(both eth1 and eth5 were in unknown states and ifdown and ifup were used to rectify). Please find the messages and configuration files as below and please let me know for any other... (0 Replies)
Discussion started by: Mudit Bansal
0 Replies

2. IP Networking

Node switched itself from static to DHCP on reboot issue

I'm trying to figure out what circumstances would cause an Open Solaris 11.2 host to switch itself from a static to a DHCP ip address upon reboot. This has only happened once but is a cause for some concern as this machine will be part of a web server pool. Nothing has changed on the LAN that... (2 Replies)
Discussion started by: SmokeyJoe
2 Replies

3. Solaris

vnc Issue

Dear all, I recently installed did VNC configuration on a Solaris Server. I am using VNC E4 2 7 as my Windows client. The issue is that every time I log into my machine and use terminal ( a few commands like df -h or any other command and then close VNC ( windows). When I log back in ,... (9 Replies)
Discussion started by: Junaid Subhani
9 Replies

4. Shell Programming and Scripting

Reboot script issue

Hi guys I am troubleshooting a script that informs me when a system has rebooted. The script is placed in /etc/rc3.d folder under root. The script is as follows: . /opt/scripts/function.sh PATH=/usr/bin EMAIL_ADD=<email address> ... (2 Replies)
Discussion started by: Junaid Subhani
2 Replies

5. Solaris

VNC issue on solaris10

M running solaris 10 u8 my vncserver is running on :0 .. and when i try to connect it through tight vncview i can see just see the screen .. with no terminal .. what could be the issue for it ? and what i need to check for it ? (2 Replies)
Discussion started by: fugitive
2 Replies

6. Solaris

VNC as only 1 user issue

Our current VNC setup is for only 1 user login, but this login can not access a few of the programs that I need. How can I add additional logins to VNC? I have only been able to find the logs in .vnc and the usr/bin scripts. (1 Reply)
Discussion started by: gcad76
1 Replies

7. Solaris

Controller Issue on X4600 after reboot

One of my X4600 server had a power loss and rebooted and now its giving me a strange problem servers internal disk controller naming has changed by itself ... the after failsafe boot md.conf file shows following c3txdx but shows internal disk at c4txdx ... what could be the reason for this and... (1 Reply)
Discussion started by: fugitive
1 Replies

8. SCO

SCO Reboot Issue

Hi, We are using SCO UNIX 7.1.3 and the server recently started rebooting by itself. Do anyone know how can i create a dump or crash dump while the server rebooots? Your quick help on this is really appreciated. Regards, Ravikumar R (1 Reply)
Discussion started by: rrb2009
1 Replies

9. HP-UX

Issue in reboot

Hi, Whenever I reboot this server remotely by using the command 'shutdown -r now' or 'reboot'. The server does not return to normal multi-user mode. It boots in single user mode. To bring back the server, someone is required to connect via console and fire 'init 3'. Please suggest on what... (1 Reply)
Discussion started by: mystition
1 Replies

10. Linux

VNC/Fedora7 issue

Hi, This has been extremely frustrating, and I need help figuring this one out! I am running Fedora 7 on computer A, and am VNCing into it from my Mac using Chicken of the VNC. For Sarah, everything works fine. However for Bob, the toolbar along the top is missing and every... (0 Replies)
Discussion started by: user23
0 Replies
Login or Register to Ask a Question