• Join/Login
  • Business Software
  • Open Source Software
  • For Vendors
  • Blog
  • About
  • More
    • Articles
    • Create
    • SourceForge Podcast
    • Site Documentation
    • Subscribe to our Newsletter
    • Support Request
SourceForge logo
For Vendors Help Create Join Login
SourceForge logo
Business Software
Open Source Software
SourceForge Podcast
Resources
  • Articles
  • Case Studies
  • Blog
Menu
  • Help
  • Create
  • Join
  • Login
  • Home
  • Browse
  • rdesktop
  • Bugs

Clipborad Problem RDesktop <-> Java

rdesktop has moved to GitHub

Brought to you by: astrand, hean01, matthewc
  • Summary
  • Files
  • Reviews
  • Support
  • Mailing Lists
  • Tickets ▾
    • Feature Requests
    • Patches
    • Support Requests
    • Bugs
  • Code
Menu ▾ ▴
  • Create Ticket
  • View Stats

Group

  • Future
  • v1.7.1
  • v1.8.1
  • NextRelease
  • v1.8.3

Searches

  • Changes
  • Closed Tickets
  • Open Tickets

Help

  • Formatting Help

#370 Clipborad Problem RDesktop <-> Java

v1.7.1
open
nobody
None
5
2015-01-07
2013-09-09
Ruedi Steinmann
No

I use rdesktop under Linux to connect to a Windows machine. When using rdesktop with -5 -r clipboard:PRIMARYCLIPBOARD, copy/paste does not work from Java/Swing programs on the Linux machine to applications on the remote windows machine.

I tracked the problem down and found that

  • the java program does not provide the TIMESTAMP content type
  • rdesktop uses the TIMESTAMP to choose between the PRIMARY and the CLIPBOARD selection. (in xclip.c)

(rdesktop 1.7, Java 1.6)

Below is a small Java program for reproducing the bug:

import java.awt.Toolkit;
import java.awt.datatransfer.StringSelection;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JFrame;

public class Main2 {
    public static void main(String[] args) {
        JFrame frame=new JFrame("Clipboard Test");
        JButton button=new JButton("Paste");
        frame.add(button);
        button.addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent e) {
                StringSelection selection=new StringSelection("foo");
                Toolkit.getDefaultToolkit().getSystemClipboard().setContents(selection, selection);
            }
        });
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setSize(200, 200);
        frame.setVisible(true);
    }
}

Discussion

  • Christian Wittmer

    Christian Wittmer - 2015-01-07

    There is a patch from David Fries:
    https://sourceforge.net/p/rdesktop/patches/192/
    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=584686
    Perhaps this could help.

     
    If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
SourceForge
  • Create a Project
  • Open Source Software
  • Business Software
  • Top Downloaded Projects
Company
  • About
  • Team
  • SourceForge Headquarters
    1320 Columbia Street Suite 310
    San Diego, CA 92101
    +1 (858) 422-6466
Resources
  • Support
  • Site Documentation
  • Site Status
  • SourceForge Reviews
SourceForge logo
© 2026 Slashdot Media. All Rights Reserved.
Terms Privacy Opt Out Advertise
MongoDB Logo MongoDB