Score:0

java program in xscreensaver

cn flag

Trying to run my Java Swing program in xscreensaver.
The program runs great from command line. It uses the whole screen with

    JFrame frame = new JFrame();
    GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
    GraphicsDevice gd = ge.getDefaultScreenDevice();
    gd.setFullScreenWindow(frame);

    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.setVisible(true);

Added to xscreensaver setup:

/usr/bin/java -jar "$HOME/java/clock/target/clock-0.1-jar-with-dependencies.jar"

` When kicked in, xscreensaver shows black screen.
When I click a button to stop screensaver, it shows my program screen for a moment, then I see the regular screen.
Using Ubuntu 20.04.6, xscreensaver 5.42.
Any ideas?

Score:0
cn flag

In xscreensaver-demo, selecting my script, going to Settings, Advanced, selecting

Visual: Best

resolves the issue!

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.