cockpit-desktop: check if cockpit-bridge exists#23144
Open
jelly wants to merge 1 commit into
Open
Conversation
Check it upfront so the user does not have to wade through a wall of error messages. Nor does the opened browser so an error message but just "Internal error in login process" if cockpit-ws is installed locally. Fixes: cockpit-project#20766
martinpitt
reviewed
Apr 17, 2026
Comment on lines
+108
to
+111
| if ! ${2:+ssh "$2"} command -v cockpit-bridge >/dev/null 2>&1; then | ||
| echo "cockpit-bridge is not installed${2:+ on $2}" >&2 | ||
| exit 1 | ||
| fi |
Member
There was a problem hiding this comment.
Hmm, but this sucks a bit when using ssh, no? It makes two connections, with all the overhead of key unlocking, password entry, possible 2FA, etc. Can we perhaps run a shell script on the remote side which handles this more gracefullY?
Member
Author
There was a problem hiding this comment.
Sure, btw we don't have a desktop file for this? Or do we as if we do this is all kinda moot.
Member
There was a problem hiding this comment.
The only .desktop file I'm aware of is for sub-man-cockpit, that's shipped in RHEL desktop. Of course without ssh.
Alternatively, only do this check if $ssh is empty? That at least makes it simpler for the local case.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Check it upfront so the user does not have to wade through a wall of error messages. Nor does the opened browser so an error message but just "Internal error in login process" if cockpit-ws is installed locally.
Fixes: #20766