FedoraForum.org - Fedora Support Forums and Community
Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2007
    Posts
    24

    Unable to Move or Drag Windows in VNC

    Ok, I've been at this off and on for weeks, but I'm just about out of gas. When I connect to my Fedora 9 desktop with vncviewer (windows client), I don't get many of the window controls that are necessary (e.g., maximize, minimize, etc.) and I can't move the windows at all. I'd send you a printscreen of it if I could but it doesn't seem to work through the VNC window.

    Here's my xstartup file:

    Code:
    #!/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 1280x1024 -ls -title "$VNCDESKTOP Desktop" &
    gnome-session &
    ... And here's my /etc/sysconfig/vncservers file:

    Code:
    VNCSERVERS="1:Kevin"
    VNCSERVERARGS[1]="-geometry 1280x1024 -depth 16"

    It might also be of some significance that the Fedora box uses dual monitors and the akmod-nvidia driver.

    Any help would be much appreciated. I've searched and searched and I just can't find anyone else with a problem like this :/

  2. #2
    Join Date
    Mar 2007
    Posts
    24
    Ok, I've gotten closer to solving this. Apparently if I open a terminal, su to root, and start a new gnome-session, the windows go back to normal. While under my username (Kevin), it says a "session manager is already running" if I try to execute the gnome-session again.

    So the question is, what's going wrong when the gnome-session executes as an unprivileged user? Here's a copy of the log when VNC starts as my username (the one that doesn't work):

    Code:
    Mon Oct 20 13:11:14 2008
     vncext:      VNC extension running!
     vncext:      Listening for VNC connections on port 3389
     vncext:      created VNC server for screen 0
    expected keysym, got XF86Info: line 914 of inet
    SESSION_MANAGER=local/unix:@/tmp/.ICE-unix/3486,unix/unix:/tmp/.ICE-unix/3486
    
    (gtk-window-decorator:3560): Gdk-WARNING **: Using Cairo rendering requires the drawable argument to
    have a specified colormap. All windows have a colormap,
    however, pixmaps only have colormap by default if they
    were created with a non-NULL window argument. Otherwise
    a colormap must be set on them with gdk_drawable_set_colormap
    
    (gtk-window-decorator:3560): Gdk-CRITICAL **: gdk_cairo_create: assertion `GDK_IS_DRAWABLE (drawable)' failed
    compiz (core) - Fatal: No composite extension
    14
    
    ** (nm-applet:3602): WARNING **: <WARN>  applet_dbus_manager_start_service(): Could not acquire the NetworkManagerUserSettings service as it is already taken.  Return: 3
    
    
    (nm-applet:3602): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed
    Error: Screen isn't composited. Please run compiz (-fusion) or another compositing manager.
    
    ** (nautilus:3559): WARNING **: Unable to add monitor: Not supported
    
    ** (nautilus:3559): WARNING **: Can not calculate _NET_NUMBER_OF_DESKTOPS
    
    ** (nautilus:3559): WARNING **: Can not calculate _NET_NUMBER_OF_DESKTOPS
    
    ** (nautilus:3559): WARNING **: Can not get _NET_WORKAREA
    
    ** (nautilus:3559): WARNING **: Can not determine workarea, guessing at layout
    could not attach to desktop process
    
    Mon Oct 20 13:11:29 2008
     Connections: accepted: 159.140.254.187::35711
    
    Mon Oct 20 13:11:30 2008
     SConnection: Client needs protocol version 3.8
     SConnection: Client requests security type VncAuth(2)
    And when I run the gnome-session as root, I get this output to the terminal, but it DOES work:
    Code:
    SESSION_MANAGER=local/unix:@/tmp/.ICE-unix/3734,unix/unix:/tmp/.ICE-unix/3734
    Window manager warning: Failed to read saved session file /root/.metacity/sessions/default1.ms: Failed to open file '/root/.metacity/sessions/default1.ms': No such file or directory
    Failure: Module initalization failed
    
    ** (nm-applet:3786): WARNING **: <WARN>  applet_dbus_manager_start_service(): Could not acquire the NetworkManagerUserSettings service as it is already taken.  Return: 3
    
    
    (nm-applet:3786): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed
    
    ** (nautilus:3758): WARNING **: Unable to add monitor: Not supported
    could not attach to desktop process

    I guess the only problem is that I have 2 taskbars running after that. If I hover over it, it will flicker between the user task bar and the root taskbar. So, there is SOMETHING wrong with my window manager and what user it executes with. Does anyone have any ideas?



    Also, here's a SC of what it looks like when it's not working:

  3. #3
    Join Date
    Mar 2007
    Posts
    24

    Figured it Out ...

    Well, I didn't exactly get much help here, but I thought I'd at least document the solution to my problem so future searchers have some help ...

    The problem (not seeing the title bar, window controls, etc. of windows) in VNC was caused by not having a "window manager" running. I don't know about you, but I had always thought Gnome was my window manager (I'm only a casual Linux guy). Turns out, Gnome is a desktop which uses a window manager. That distinction had never been clear to me.

    In most cases, Gnome's window manager is called metacity (command: "metacity" to start it). However, if you have desktop effects enabled in your Gnome desktop, your gnome-session will actually start "compiz" instead of metacity. Compiz is a different window manager that incorporates transparency and all sorts of goofy effects. These effects (I think) are achieved by bringing the desktop into a "composited mode". This composited mode is not available while in VNC ... or at least I never got it to work.

    So, the answer to the $30 million dollar question: How the **** do I get my windows to work in VNC then? Use metacity instead of compiz when in VNC.

    1. vi $HOME/.vnc/xstartup . Or use gedit instead of vi ... whatever text editor you want.

    2. At the bottom of your xstartup, you should have a line that says gnome-session& or "exec gnome-session&". After that, make a new line and put in metacity&. If you don't have gnome-session or you have twm&, erase any other window manager (like twm) and add gnome-session&, then metacity&.

    3. Comment out the line at the TOP of the file that says "exec /etc/X11/xinit/xinitrc" by putting a # before it. I'm not entirely sure what this file does but I think it starts all the various programs needed for your X environment.

    4. Save the file and restart the vncserver. (service vncserver restart)

    So, that may not be the prettiest fix in the world, but it works. If you have anything better I'd certainly like to see the improvement, but right now I'm just talking to myself.

    Finally ... a copy of my xstartup:

    Code:
    #!/bin/sh
    
    # Uncomment the following two lines for normal desktop:
    #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 80x24+10+10  -ls -title "$VNCDESKTOP Desktop" &
    unset SESSION_MANAGER
    gnome-session&
    metacity&

  4. #4
    Join Date
    Oct 2008
    Posts
    1
    Thanks! "metacity" is exactly what I needed to solve the problem. Much time saved.

  5. #5
    Join Date
    Feb 2012
    Location
    bengaluru
    Posts
    1

    Re: Unable to Move or Drag Windows in VNC

    Thanks a lot it helped solve my problem too..
    but vncserver couldn't be restarted, it had to be killed using
    vncserver -kill :1
    and created again using
    vncserver :1

  6. #6
    Join Date
    Jun 2014
    Location
    CA
    Posts
    1

    Re: Unable to Move or Drag Windows in VNC

    Thank you soo much for this helpful post!! I've been going nuts with this for a week..

    Thanks for sharing!

Similar Threads

  1. click and drag windows
    By dynoweb in forum Using Fedora
    Replies: 9
    Last Post: 14th October 2007, 12:56 AM
  2. Cant drag windows
    By dubb in forum Using Fedora
    Replies: 2
    Last Post: 4th September 2007, 04:29 AM
  3. can't drag windows
    By m0laria in forum Using Fedora
    Replies: 5
    Last Post: 23rd April 2006, 02:04 AM

Tags for this Thread

Posting Permissions

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