Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11
Hi to all, I am struggling to set the size of the VNC resolution to more than default. This is my setup for the VNC server: .vnc/xstartup #!/bin/sh # Uncomment ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2009
    Posts
    6

    VNC - Desktop Resolution


    Hi to all,

    I am struggling to set the size of the VNC resolution to more than default. This is my setup for the VNC server:


    .vnc/xstartup

    #!/bin/sh

    # Uncomment the following two lines for normal desktop -
    #unset SESSION_MANAGER
    #exec /etc/X11/xinit/xinitrc

    [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
    [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
    xsetroot -solid grey
    vncconfig -iconic &
    xterm -geometry 1440x900 -depth 16 -ls -title "$VNCDESKTOP Desktop" &
    exec startkde &


    /etc/sysconfig/vncservers

    VNCSERVERS="10:root"
    VNCSERVERARGS[10]="-geometry 1440x900 -depth 16"



    Thanks to all that reply.

  2. #2
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    That configuration works on my system (except that I replaced root with a regular user).

    Are there any clues/errors in your VNC log?
    ~/.vnc/$HOSTNAME:10.log

    If I were you, I'd run the vncserver as a non-root user, too.

  3. #3
    Just Joined!
    Join Date
    Jul 2009
    Posts
    6
    I took your advice and created it as non-root user. This is the log.

    [oracle@leeds ~]$ less .vnc/leeds.wira.explor.co.uk\:10.log
    Major opcode: 12
    Minor opcode: 0
    Resource id: 0x1c00003
    X Error: BadWindow (invalid Window parameter) 3
    Major opcode: 8
    Minor opcode: 0
    Resource id: 0x1c00003
    X Error: BadWindow (invalid Window parameter) 3
    Major opcode: 25
    Minor opcode: 0
    Resource id: 0x1c00003
    X Error: BadWindow (invalid Window parameter) 3
    Major opcode: 25
    Minor opcode: 0
    Resource id: 0x1c00003
    X Error: BadWindow (invalid Window parameter) 3
    Major opcode: 25
    Minor opcode: 0
    Resource id: 0x1c00003
    Introspect error: A security policy in place prevents this sender from sending this message to this recipient, see message bus configuration file (rejected message had interface "org.freedesktop.DBus.Introspectable" member "Introspect" error name "(unset)" destination "edu.duke.linux.yum")
    Traceback (most recent call last):
    File "/usr/bin/puplet", line 467, in ?
    main()
    File "/usr/bin/puplet", line 464, in main
    p.run()
    File "/usr/bin/puplet", line 451, in run
    self._refreshInfo()
    File "/usr/bin/puplet", line 191, in _refreshInfo
    if self.updatesObject is not None and \
    AttributeError: DBusException instance has no attribute '_dbus_error_name'
    X Error: BadWindow (invalid Window parameter) 3
    Major opcode: 20
    Minor opcode: 0
    Resource id: 0xc00007
    X Error: BadWindow (invalid Window parameter) 3
    Major opcode: 20
    Minor opcode: 0
    Resource id: 0xc00007
    X Error: BadWindow (invalid Window parameter) 3
    Major opcode: 20
    Minor opcode: 0
    Resource id: 0xc00007
    X Error: BadWindow (invalid Window parameter) 3
    Major opcode: 20
    Minor opcode: 0
    Resource id: 0xc00007
    X Error: BadWindow (invalid Window parameter) 3
    Major opcode: 19
    Minor opcode: 0
    Resource id: 0xc00007
    Introspect error: Launch helper exited with unknown return code 0

    Tue Jul 26 14:39:06 2011
    Connections: closed: 192.168.69.103::55026 (Clean disconnection)
    SMsgWriter: framebuffer updates 61
    SMsgWriter: hextile rects 705, bytes 1705054
    SMsgWriter: ZRLE rects 2, bytes 8533
    SMsgWriter: raw bytes equivalent 4451838, compression ratio 2.597964
    could not attach to desktop process

  4. $spacer_open
    $spacer_close
  5. #4
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    I couldn't tell by the log output, does the Xvnc server start up at all? Does it start in default resolution (vs 1440x900)?

    Try taking out everything from VNCSERVERARGS but the geometry stuff, e.g.

    VNCSERVERARGS[10]="-geometry 1440x900"

    For some reason, that made a difference on my Fedora 15 box whereas it worked as is on my RHEL 4 box.

    EDIT: Try starting it manually, as the vnc user, too, e.g.:
    vncserver :10 -geometry 1440x900

  6. #5
    Just Joined!
    Join Date
    Jul 2009
    Posts
    6
    That seemed to work but I really don't know why it doesn't work the other way. I would like to get the default method to work.

  7. #6
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    What seemed to work, starting it manually as the vnc user, or using the minimal VNCSERVERARGS? What version is your distro, btw?

  8. #7
    Just Joined!
    Join Date
    Jul 2009
    Posts
    6
    The manual input, It's on Oracle Linux 5.5 (Red-Hat 5.5).

  9. #8
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    Stop the VNC server (vncserver -kill :10) , then start it up the other way (service vncserver start), and then look at how the server process is running:

    Code:
    ps auxww|grep Xvnc
    What do the Xvnc args look like?

    Also, look in /etc/init.d/vncservers and inspect the start() function. Make sure it is calling your $VNCSERVERARGS properly.

    I've got your config running on a CentOS 5.2 box, which should be very similar, if not exact, to what you've got - so this is perplexing...

  10. #9
    Just Joined!
    Join Date
    Jul 2009
    Posts
    6
    Okay it worked when I started the service. It seemed to read the sysconfig file with geometry settings. I wonder why I can't start the server from the user, i.e. vncserver :10 - at command line?

  11. #10
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    Wait, I thought you said it DID work when you ran it manually? Oh, are you passing -geometry 1440x900 on the command line, too? Running it manually as the reg. user, it will NOT read the sysconfig file, FYI, so you have to pass all those options as arguments to vncserver.

Page 1 of 2 1 2 LastLast

Posting Permissions

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