Skip to content
This repository was archived by the owner on Apr 29, 2026. It is now read-only.

add headless flag for CLI execution (2)#62

Closed
sarumaj wants to merge 1 commit intopixelomer:mainfrom
sarumaj:main
Closed

add headless flag for CLI execution (2)#62
sarumaj wants to merge 1 commit intopixelomer:mainfrom
sarumaj:main

Conversation

@sarumaj
Copy link
Copy Markdown

@sarumaj sarumaj commented Jun 19, 2025

Hello, I would like be able to run Shijima-Qt in headless mode without the need to display the manager window. This is my personal proposal how we could achieve it. It might as well solve the issue #48, which in particular requests just this behavior. What did I change?

  • I added a headless flag in main.cc.
  • When headless flag is passed, the manager window is not shown and other CLI arguments are not evaluated, thus the application process is just being launched without user interface.
  • User can run the CLI commands, .e.g. to spawn mascots, since the application process is already running in the background.

Since, the HTTP server is started by ShijimaManager, this time we allow the manager to be created, we just obstruct its visibility (opposingly to PR #61).

@sarumaj
Copy link
Copy Markdown
Author

sarumaj commented Jun 19, 2025

It is failing due to changes in submodules

Comment thread libshijima
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There was no reason to update this dependency. There are breaking changes and the changes are completely unrelated to this pull request.

https://github.com/pixelomer/Shijima-Qt/commits/d904504183581512c859a368d9b260053fda0373/

Comment thread cpp-httplib
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No reason to update this dependency either, at least not within the context of this pull request.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I revoked the dependency updates.

Comment thread main.cc
Comment on lines +56 to 59
auto manager = ShijimaManager::defaultManager();
if (!headless) {
ShijimaManager::defaultManager()->show();
manager->show();
}
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change does make the HTTP server run, but also causes the shimeji windows to have no parent. This causes all of them to show up as separate icons in the bottom bar, at least on KDE Plasma.

Copy link
Copy Markdown
Author

@sarumaj sarumaj Jun 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I give up then. The design would have to change to separate concerns (GUI/backend operability). Would be really cool though if you happen to restructure Shijima a bit and make the headless execution possible. Thanks!

@pixelomer
Copy link
Copy Markdown
Owner

Have you tried running or even just compiling your changes before submitting this pull request or the previous one?

@sarumaj
Copy link
Copy Markdown
Author

sarumaj commented Jun 19, 2025

Have you tried running or even just compiling your changes before submitting this pull request or the previous one?

Not yet. Adapting the pipelines to run in my forked repository scope would be too much effort (you hard-coded references to you own repository there), I will have to build it locally.

@sarumaj sarumaj closed this Jun 19, 2025
@sarumaj
Copy link
Copy Markdown
Author

sarumaj commented Jun 19, 2025

Feature request handed over to @pixelomer.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants