Skip to content

Conversation

@rgarcia
Copy link
Contributor

@rgarcia rgarcia commented Jul 14, 2025

live view has much more chill now:

image
  • no bookmark bar
  • no fullscreen, resolution, or pip controls
  • no "connected" toast
  • no sound
  • ability to set resolution and frame rate with query params e.g. w=1024&h=1336&fr=60
  • ability to make the live view read-only (i.e. no mouse or keyboard input) with readOnly=true

Other nice things:

  • set up dbus so no more log spam
  • get rid of no-sandbox warning

recommend reviewing commit by commit or just ignoring everything in user-data/. In order to load custom preferences had to grab the default user-data directory that chromium creates and modify it / load it onto the image

@rgarcia rgarcia requested a review from heyglassy July 14, 2025 21:58
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

@rgarcia rgarcia force-pushed the raf/kernel-167-remove-picture-in-picture-front-end-control branch from 6562d59 to 43d739d Compare July 15, 2025 21:55
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

Copy link
Contributor

@Sayan- Sayan- left a comment

Choose a reason for hiding this comment

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

Lotta wins in this! None of my comments are blocking.

Confirming I didn't review user-data

Comment on lines 4 to 7
name=chromium-headful-test

# Name for the Kraft Cloud volume that will carry Chromium flags
volume_name="${name}-flags"
Copy link
Contributor

Choose a reason for hiding this comment

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

nit - the mix of upper and lower case vars is a little confusing

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think the convention that lives in my head is: lowercase for local vars, UPPERCASE for things related to env vars

not super consistent but can nudge things in that direction

Comment on lines 28 to 32
# Re-create the volume from scratch every run
kraft cloud volume rm "$volume_name" || true
kraft cloud volume create -n "$volume_name" -s 16M
# Import the flags directory into the freshly created volume
kraft cloud volume import -s "$FLAGS_DIR" -v "$volume_name"
Copy link
Contributor

Choose a reason for hiding this comment

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

do volume names need to be unique? mainly concerned about stepping on each others toes

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah... tricky part is ensuring we delete the previously-created volume (e.g. not sure how to kraft cloud volume rm "$volume_name" || true if we make volume name unique on every run)

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah really good point - honestly this is where I usually just toss $USER in but that's not necessarily desirable 😅

oapi "github.com/onkernel/kernel-images/server/lib/oapi"
)

func (s *ApiService) MoveMouse(ctx context.Context, request oapi.MoveMouseRequestObject) (oapi.MoveMouseResponseObject, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

non-blocking. there is a local dev flow for the server. since xdotool isn't supported on macos we may want to detect and return a 501 instead

Copy link
Contributor Author

Choose a reason for hiding this comment

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

my local dev flow was building / running the docker image and curl'ing this endpoint... wasn't too bad

on mac os we might be able to do this with applescript

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

as always things get complicated going from docker -> unikraft

- disable scale to zero
- add a sleep because this makes it work
Comment on lines 210 to 211
# wait... not sure but this just increases the likelihood of success
sleep 5
Copy link
Contributor

Choose a reason for hiding this comment

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

what were the failure modes you were running into?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

without the sleep I'd often open the live view and see the mouse hovering over the "X" to dismiss the warning, suggesting that xdotool did it's thing before the warning or chromium appeared

will add to the comment describing this

Comment on lines 205 to 206
echo "Waiting for kernel-images API port 127.0.0.1:10001..."
while ! nc -z 127.0.0.1 10001 2>/dev/null; do
Copy link
Contributor

Choose a reason for hiding this comment

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

potential optimization: I'd expect the server to come up faster than chromium so we could probably trim some time by inverting the order

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍


kraft pkg \
--name index.unikraft.io/$image \
--name $UKC_INDEX/$IMAGE \
Copy link
Contributor

Choose a reason for hiding this comment

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

should we default to the public unikraft index to make this easier for folks?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

@rgarcia rgarcia merged commit ae8724a into main Jul 16, 2025
2 checks passed
@rgarcia rgarcia deleted the raf/kernel-167-remove-picture-in-picture-front-end-control branch July 16, 2025 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants