-
Bug
-
Resolution: Unresolved
-
P4
-
8u221, 11
-
None
-
Citrix (remote desktop windows system)
-
generic
-
windows_10
This bug has been originally reported at AdoptOpenJDK here:
https://github.com/AdoptOpenJDK/openjdk-build/issues/1277
In an Citrix remote desktop scenario on Windows 10 an incorrect default printer is being returned by javax.print.PrintServiceLookup.lookupDefaultPrintService(). Example code:
public class PrintServiceLookupTest {
public static void main(String[] args) {
javax.print.PrintService service = javax.print.PrintServiceLookup.lookupDefaultPrintService();
if (service != null) {
String printServiceName = service.getName();
System.out.println("Default print service name (" + printServiceName+")");
} else {
System.out.println("No default print service found.");
}
}
}
Steps to reproduce:
1. Logon to session Citrix or RDP
2. set a local or network default printer
3. run the code "PrintServiceLookupTest".
4. set a redirected default printer
5. run the code "PrintServiceLookupTest".
The registry key used for local or network printers is:
HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows\Device
The registry key used for redirect printers is:
HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows\SessionDefaultDevices\ "session" \Device
It looks like OpenJDK isn't using the correct registry key for the RDP/Citrix use case. This isn't an issue on a default host Windows OS. So a remote setup via Citrix is necessary to reproduce.
Actual output:
Some printer which isn't the redirected default printer.
Expected output:
Same as this windows query:
> Get-WmiObject -Query " SELECT * FROM Win32_Printer" | Where-Object {$_.Default -eq "true"} | Select Name
https://github.com/AdoptOpenJDK/openjdk-build/issues/1277
In an Citrix remote desktop scenario on Windows 10 an incorrect default printer is being returned by javax.print.PrintServiceLookup.lookupDefaultPrintService(). Example code:
public class PrintServiceLookupTest {
public static void main(String[] args) {
javax.print.PrintService service = javax.print.PrintServiceLookup.lookupDefaultPrintService();
if (service != null) {
String printServiceName = service.getName();
System.out.println("Default print service name (" + printServiceName+")");
} else {
System.out.println("No default print service found.");
}
}
}
Steps to reproduce:
1. Logon to session Citrix or RDP
2. set a local or network default printer
3. run the code "PrintServiceLookupTest".
4. set a redirected default printer
5. run the code "PrintServiceLookupTest".
The registry key used for local or network printers is:
HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows\Device
The registry key used for redirect printers is:
HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows\SessionDefaultDevices\ "session" \Device
It looks like OpenJDK isn't using the correct registry key for the RDP/Citrix use case. This isn't an issue on a default host Windows OS. So a remote setup via Citrix is necessary to reproduce.
Actual output:
Some printer which isn't the redirected default printer.
Expected output:
Same as this windows query:
> Get-WmiObject -Query " SELECT * FROM Win32_Printer" | Where-Object {$_.Default -eq "true"} | Select Name
- duplicates
-
JDK-8232511 The redirected default printer not return on Citrix Xendekstop and RDP Session
-
- Closed
-
- relates to
-
JDK-8232511 The redirected default printer not return on Citrix Xendekstop and RDP Session
-
- Closed
-