How to add a UI in Chromium OS?

456 views
Skip to first unread message

Parag

unread,
Jan 29, 2017, 8:29:19 AM1/29/17
to Chromium OS discuss
Hey all,

I'm trying to add a message window in Chromium OS after the initial "Welcome Screen" with Google logo on it.

Correct me if I'm wrong but to achieve this I also need Chromium browser checkout, but I'm not sure about it.

Can anybody help me please. Even a link will work for me to get started :)

Thanks :)

Nathan

unread,
Jan 30, 2017, 9:29:18 AM1/30/17
to Chromium OS discuss
This might be a decent starting point.

Parag

unread,
Jan 31, 2017, 12:57:08 AM1/31/17
to Chromium OS discuss
Hey, Nathan thanks for the link :)

I read the document. Even tried to implement Creating Chrome WebUI Interfaces just to try it out (this is not what I want to achieve). From the looks of it on successful completion I should be able to access chrome://hello-world/ URL from the browser, but I'm stuck at "Adding new sources to Chrome" because the src/chrome/chrome_browser_ui.gypi the resource does not exist in my Chromium checkout which I've downloaded using these steps.

I'm a little confused on where to look, as there is no link provided for it. is there any alternative to searching the code and then find out execution flow?

Nathan

unread,
Jan 31, 2017, 9:18:38 AM1/31/17
to Chromium OS discuss
I am by no means an expert -- just a fellow learner. Unfortunately you have run afoul of one of the big pitfalls of CrOS development: the documentation. Clearly things have changed since that document has been written.

That said, I'm not sure writing a web resource is the best way to get started, especially if the tutorial has crustified compared to the current state of the code.

Maybe a more productive approach would be to write a Chrome App. I suggest this page first followed by this tutorial. I have actually gone through the same thing myself so I can confirm that what is documented there is still mostly correct. I make this suggestion because the login workflow appears to be all JS / HTML / CSS. If you're already familiar with web app programming you could probably skip this step.

Then check out src/ui/login. oobe stands for "Out-of-box experience" and that's the screen you get when you start your chromebook for the first time. I haven't made any modifications to the login process myself so I can't give detailed instructions, but if you play around in that directory you will probably find a way to do what you want.

I don't know how you're testing this, but using a VM might tighten your development cycle a bit for something like this.

Nathan

Sean

unread,
Jan 31, 2017, 7:54:47 PM1/31/17
to Chromium OS discuss
Some links are included below that I hope you will find helpful.  However, before you get in too deep, are you sure you want to add UI to Chromium OS?  What are you doing it for?  There's probably an easier alternative than what you're describing.


This has instructions for how to compile and run the Chromium OS UI on a Linux box:
The instruction are a little old but the chromium-dev can help.

You'll have to dig around for the right flag to run the welcome flow.  This is a list of flags: http://peter.sh/experiments/chromium-command-line-switches/

I think that the component you're looking for is https://cs.chromium.org/chromium/src/chrome/browser/ui/webui/chromeos/login/oobe_ui.h?q=welcome+chromeos&dr=CSs.  You can also look at that file to see how WebUI is implemented.

Happy Hacking!

Parag

unread,
Feb 1, 2017, 8:08:05 AM2/1/17
to Chromium OS discuss
@Nathan Thanks you for the help. Let me go through the links and whether they fit my needs. I'll post the result here.

@Sean,
I just want to add a simple window with a simple welcome message or quote of the day after the Chromium OS Welcome screen (shown in image below)


As @Nathan said I might have to write a Chrome app to achieve this. If there are more alternatives to do this I'm more than happy to try them out :)

Sean

unread,
Feb 1, 2017, 2:50:31 PM2/1/17
to Chromium OS discuss
So if you want a quote of the day, the welcome screen isn't all that useful since you only see it when you boot a new Chromebook.  Really, you want something the runs after login.

However, Chrome OS doesn't support auto-launching programs so your only bet really is adding it to the UI.  However, just FYI, this isn't a feature likely to be accepted upstream.

Parag

unread,
Feb 2, 2017, 1:32:35 AM2/2/17
to Chromium OS discuss
So if you want a quote of the day, the welcome screen isn't all that useful since you only see it when you boot a new Chromebook.  Really, you want something the runs after login.
Yes exactly. I need to add a screen before the login window is shown to the user.

However, Chrome OS doesn't support auto-launching programs so your only bet really is adding it to the UI.
So are you trying to say that I'll have to add UI before the login screen rather than writing an app for the same?

Sean Kau

unread,
Feb 2, 2017, 2:17:46 AM2/2/17
to parag...@gmail.com, Chromium OS discuss

Apps have to be launched by a user by clicking on an icon. For what you're describing, you'd have to modify Chromium. If you want to run a customized version of Chromium personally, that's fine. But if this is a feature you'd like to see in chrome OS I would ask the dev list first as it would be a large UI change.


--
--
Chromium OS discuss mailing list: chromium-...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-os-discuss?hl=en

---
You received this message because you are subscribed to a topic in the Google Groups "Chromium OS discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/a/chromium.org/d/topic/chromium-os-discuss/9F944h0ai64/unsubscribe.
To unsubscribe from this group and all its topics, send an email to chromium-os-dis...@chromium.org.

Parag

unread,
Feb 2, 2017, 2:32:22 AM2/2/17
to Chromium OS discuss, parag...@gmail.com
This will get me going. I'm not yet sure about posting it upstream, just want to learn and understand how things work so I can contribute in a better way. :)

Thank you, Nathan & Sean. I'll post the results once I manage to get it done.

To unsubscribe from this group and all its topics, send an email to chromium-os-discuss+unsub...@chromium.org.

Parag

unread,
Feb 5, 2017, 5:10:45 AM2/5/17
to Chromium OS discuss, parag...@gmail.com

Sean Kau

unread,
Feb 6, 2017, 2:01:51 PM2/6/17
to parag...@gmail.com, Chromium OS discuss
That looks about right.  You probably need to look at this as well.


If you haven't already, you'll want to read the WebUI documentation.  https://www.chromium.org/developers/webui.  Also, if you're developing with a chromebook or VM, read this as well.
http://www.chromium.org/chromium-os/how-tos-and-troubleshooting/building-chromium-browser.  You'll need to know how to attach a debugger to see how everything fits together.

Good luck!

To unsubscribe from this group and all its topics, send an email to chromium-os-dis...@chromium.org.

--
--
Chromium OS discuss mailing list: chromium-...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-os-discuss?hl=en

---
You received this message because you are subscribed to a topic in the Google Groups "Chromium OS discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/a/chromium.org/d/topic/chromium-os-discuss/9F944h0ai64/unsubscribe.
To unsubscribe from this group and all its topics, send an email to chromium-os-dis...@chromium.org.

Parag

unread,
Feb 7, 2017, 2:00:03 AM2/7/17
to Chromium OS discuss, parag...@gmail.com
Hey Sean,

Thanks for the links, I have read the WebUI documentation but I had trouble finding the src/chrome/chrome_browser_ui.gypi resource (apparently such file does not exist in Chromium checkout I have) and I'll try to attach a debugger to Chromium OS and see how things goes. I'll update the results here.

Appreciate your help. :)
To unsubscribe from this group and all its topics, send an email to chromium-os-discuss+unsub...@chromium.org.

--
--
Chromium OS discuss mailing list: chromium-...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-os-discuss?hl=en

---
You received this message because you are subscribed to a topic in the Google Groups "Chromium OS discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/a/chromium.org/d/topic/chromium-os-discuss/9F944h0ai64/unsubscribe.
To unsubscribe from this group and all its topics, send an email to chromium-os-discuss+unsub...@chromium.org.

Sean Kau

unread,
Feb 7, 2017, 2:28:48 PM2/7/17
to parag...@gmail.com, Chromium OS discuss
Those instructions are a bit old.  We have since migrated from gyp to GN.  This should be the appropriate file: https://cs.chromium.org/chromium/src/chrome/browser/ui/BUILD.gn

To unsubscribe from this group and all its topics, send an email to chromium-os-dis...@chromium.org.

--
--
Chromium OS discuss mailing list: chromium-...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-os-discuss?hl=en

---
You received this message because you are subscribed to a topic in the Google Groups "Chromium OS discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/a/chromium.org/d/topic/chromium-os-discuss/9F944h0ai64/unsubscribe.
To unsubscribe from this group and all its topics, send an email to chromium-os-dis...@chromium.org.

--
--
Chromium OS discuss mailing list: chromium-...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-os-discuss?hl=en

---
You received this message because you are subscribed to a topic in the Google Groups "Chromium OS discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/a/chromium.org/d/topic/chromium-os-discuss/9F944h0ai64/unsubscribe.
To unsubscribe from this group and all its topics, send an email to chromium-os-dis...@chromium.org.

Parag

unread,
Apr 29, 2017, 9:24:57 AM4/29/17
to Chromium OS discuss, parag...@gmail.com
Hey Sean,

Apologies for the late reply.

I am trying to debug the main browser to check which files are being invoked in the process. I tried to debug with 
gdb-amd64-generic --remote=192.168.1.4 --attach=browser
and fired 
`where`
command but got never could find the files mentioned below. Is it the correct process that I am following if I want to add an UI (welcome message) before the login screen.

To unsubscribe from this group and all its topics, send an email to chromium-os-discuss+unsub...@chromium.org.

--
--
Chromium OS discuss mailing list: chromium-...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-os-discuss?hl=en

---
You received this message because you are subscribed to a topic in the Google Groups "Chromium OS discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/a/chromium.org/d/topic/chromium-os-discuss/9F944h0ai64/unsubscribe.
To unsubscribe from this group and all its topics, send an email to chromium-os-discuss+unsub...@chromium.org.

--
--
Chromium OS discuss mailing list: chromium-...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-os-discuss?hl=en

---
You received this message because you are subscribed to a topic in the Google Groups "Chromium OS discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/a/chromium.org/d/topic/chromium-os-discuss/9F944h0ai64/unsubscribe.
To unsubscribe from this group and all its topics, send an email to chromium-os-discuss+unsub...@chromium.org.

Sean

unread,
May 1, 2017, 10:55:59 PM5/1/17
to Chromium OS discuss
If you're trying to debug a running instance of Chromium on a Chrome OS device, you should follow these instructions:


On Sunday, January 29, 2017 at 5:29:19 AM UTC-8, Parag wrote:

Parag Jadhav

unread,
May 2, 2017, 1:18:14 AM5/2/17
to sk...@chromium.org, Chromium OS discuss
Hey Sean,

I'm trying to debug Chromium browser on Chromium OS, do I need to follow the same link (https://www.chromium.org/chromium-os/how-tos-and-troubleshooting/debugging-tips) or is there a other way to do it?

Regards,
Parag Jadhav
Mobile: 9403449189

--
--
Chromium OS discuss mailing list: chromium-os-discuss@chromium.org

Sean Kau

unread,
May 2, 2017, 11:38:54 AM5/2/17
to Parag Jadhav, Chromium OS discuss
That's the best way to do it.  There might be other ways, but that is the method we have in place.

On Mon, May 1, 2017 at 10:18 PM Parag Jadhav <parag...@gmail.com> wrote:
Hey Sean,

I'm trying to debug Chromium browser on Chromium OS, do I need to follow the same link (https://www.chromium.org/chromium-os/how-tos-and-troubleshooting/debugging-tips) or is there a other way to do it?

Regards,
Parag Jadhav
Mobile: 9403449189
On Tue, May 2, 2017 at 8:25 AM, Sean <sk...@chromium.org> wrote:
If you're trying to debug a running instance of Chromium on a Chrome OS device, you should follow these instructions:
https://www.chromium.org/chromium-os/how-tos-and-troubleshooting/debugging-tips

On Sunday, January 29, 2017 at 5:29:19 AM UTC-8, Parag wrote:
Hey all,

I'm trying to add a message window in Chromium OS after the initial "Welcome Screen" with Google logo on it.

Correct me if I'm wrong but to achieve this I also need Chromium browser checkout, but I'm not sure about it.

Can anybody help me please. Even a link will work for me to get started :)

Thanks :)

--
--
Chromium OS discuss mailing list: chromium-...@chromium.org

View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-os-discuss?hl=en

---
You received this message because you are subscribed to a topic in the Google Groups "Chromium OS discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/a/chromium.org/d/topic/chromium-os-discuss/9F944h0ai64/unsubscribe.
To unsubscribe from this group and all its topics, send an email to chromium-os-dis...@chromium.org.

Reply all
Reply to author
Forward
0 new messages