This discussion is archived
9 Replies Latest reply: Nov 1, 2012 4:58 PM by Dude! RSS

How to enable clipboard with VNC/Gnome ??

Aacc Newbie
Currently Being Moderated
I'm accessing my Linux through VNC/Gnome session by un-commented these 2 lines in ~/.vnc/xstartup:
unset SESSION_MANAGER
exec /usr/local/lib/X11/xinit/xinitrc
It mostly working except clipboard . I'm not able to copy / paste between Gnome and my Windows desktop.
the copy paste works fine within the Gnome itself . also, if I did not enable Gnome for VNC (commented out above lines), the copy / paste works between VNC and windows desktop as well.
Could someone share some tip to enable copy/paste between windows and Gnome in my VNC?

Thanks
  • 1. Re: How to enable clipboard with VNC/Gnome ??
    Dude! Guru
    Currently Being Moderated
    Version? Linux distribution? What vncserver are you using?
  • 2. Re: How to enable clipboard with VNC/Gnome ??
    Aacc Newbie
    Currently Being Moderated
    Oracle Linux 5 64 bit.
    TightVNC viewer 2.5.2
    not sure how to check what VNCserver, it come with Linux
    Thanks
  • 3. Re: How to enable clipboard with VNC/Gnome ??
    Dude! Guru
    Currently Being Moderated
    How about the following xstartup:
    # 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 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
    gnome-session &
  • 4. Re: How to enable clipboard with VNC/Gnome ??
    Aacc Newbie
    Currently Being Moderated
    Thanks for replying. however, this still not working.
    without uncomment two lines as I mentioned earlier, I'm not able to see gnome GUI.
    the copy/paste still now working...
    any idea?
    thanks
  • 5. Re: How to enable clipboard with VNC/Gnome ??
    Dude! Guru
    Currently Being Moderated
    VNC provides you 3 options:

    1. Create a new remote desktop session:

    This is the default when you type "vncserver" in a terminal Window. Connecting with VNC to the shown display/port will use the TWM Window manager. TWM is an efficient, robust and light-wight X Window manager and default on Unix.

    2. Share an existing desktop session (Screen sharing)

    Open/Login to your Gnome desktop on your Linux server. Select System/Preferences/Remote Desktop and Enable Desktop Sharing. Connecting to the shown display/port will let you use VNC to share the display on your Linux server.

    3. Create a new remote desktop session using the same window and session manager as your Linux X Window system. For this to work you need to start vncserver (terminal) with the 2 lines disabled as mentioned.

    What kind of session are you trying to establish?

    Clipboard sharing is complete different story and depends also on your client VNC/Desktop integration. Which you have not specified.
  • 6. Re: How to enable clipboard with VNC/Gnome ??
    Aacc Newbie
    Currently Being Moderated
    I'm fine with either way as long as:
    -- I can see the gnome GUI through VNC ; and
    -- clipboard working.

    currently, I'm using the option #1 as mentioned in your post.


    the client side, I'm using Windows 7 + Tight VNC Viewer version 2.5.2
    Please let me know if you need further detail information or recommend the integration as long as above 2 works.

    Thanks
  • 7. Re: How to enable clipboard with VNC/Gnome ??
    Dude! Guru
    Currently Being Moderated
    The $HOME/.vnc/xtartup I previously shown should to the trick. You may have to restart the machine or kill your account vncserver process for the change to apply.

    You should see the Gnome desktop (provided it is installed on your system) with [VNC config] in the taskbar at the bottom of the screen. When you click on VNC config it shows the following options selected:

    - Accept clipboard from viewers
    - Send clipboard to viewers
    - Send primary selection to viewers.

    Primary is the buffer you select with the mouse. The clipboard is used when you select Copy from the Edit menu.
  • 8. Re: How to enable clipboard with VNC/Gnome ??
    Aacc Newbie
    Currently Being Moderated
    I saw these 3 options in VNC viewer without gnome :
    - Accept clipboard from viewers
    - Send clipboard to viewers
    - Send primary selection to viewers.

    however,I don't see these 3 options if I see gnome in VNC viewer. where are they?

    Thanks
  • 9. Re: How to enable clipboard with VNC/Gnome ??
    Dude! Guru
    Currently Being Moderated
    If it is not there than you are not using the same xstartup file as previously shown. When you make changes to the file you need to restart your vncserver session (vncserver --kill:number) or create a new servers session at use that new port.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points