ronaldrosing Posted September 24, 2019 Share Posted September 24, 2019 I have a handful of chromebooks, each running in Kiosk mode, auto starting a single app - Citrix Workspace App. We are using Citrix Xenapp 7.18. Is there any option to show the battery status from the Chromebook? Link to comment
0 Nick Fuchs1709160433 Posted September 24, 2019 Share Posted September 24, 2019 (edited) Hi Ronald - I'm not aware that this currently exists. I know this doesn't really help and I'm sure you're already aware but battery life can be observed by hitting CTRL+ALT+S at startup of the device. It's worth noting that one of the positive things about Chrome OS is that it's an open source operating system, and allows anyone to read about bugs, make feature requests and even influence the prioritization of those features. It looks like this feature you mention was opened in 2016 -- I recommend that you hit the star button in the top left hand corner which signifies interest in the issue for the dev team: https://bugs.chromium.org/p/chromium/issues/detail?id=591133&q=battery display in kiosk mode&sort=-modified&colspec=ID Pri M Stars ReleaseBlock Component Status Owner Summary OS Modified Cheers. Edited September 24, 2019 by nfuchs15 Removed accidental copy+pasted image. Link to comment
0 Brian Korrow Posted October 2, 2019 Share Posted October 2, 2019 I modified my storefront for this exact case. Add this custom code to Script.js on Storefront 3.x. This displays clock and battery life for Workspace on chromeos. Note: Battery isn’t supported for Windows client, but clock will work. (function () { var div2 = document.createElement("div"); document.getElementsByTagName('body')[0].appendChild(div2); div2.outerHTML = "<div id='txt' style='height: 50px; width: 150px; color: white; top: 0; left: 60%; border-left: 2px solid white; border-right: 2px solid white; border-bottom: 2px solid white; background-color: #1378a6; font-size: 18px; font-family: Segoe UI, sans-serif; position:fixed; cursor: pointer;text-align:center'></div>"; startTime(); function startTime() { var today = new Date(); var h = today.getHours(); var m = today.getMinutes(); var s = today.getSeconds(); m = checkTime(m); s = checkTime(s); document.getElementById('txt').innerHTML = "<b>The Time is Now <br>" + h + ":" + m + ":" + s +"</b>"; var t = setTimeout(startTime, 500); } function checkTime(i) { if (i < 10) {i = "0" + i}; // add zero in front of numbers < 10 return i; } }()); var div3 = document.createElement("div"); document.getElementsByTagName('body')[0].appendChild(div3); div3.outerHTML = "<div id='batt' style='height: 50px; width: 150px; color: white; top: 0; left: 75%; border-left: 2px solid white; border-right: 2px solid white; border-bottom: 2px solid white; background-color: #1378a6; font-size: 18px; font-family: Segoe UI, sans-serif; position:fixed; cursor: pointer;text-align:center'></div>"; navigator.getBattery().then(function(battery) { var battDiv = document.getElementById('batt'); var battL = battery.level; battL= battL.toFixed(2); document.getElementById('batt').innerHTML = "<b>Battery <br>" + battL*100 +"%</b>"; if (battery.level > .75){ battDiv.style.backgroundColor='green'; battDiv.style.color='white'; } else if (battery.level > .5){ battDiv.style.backgroundColor='yellow'; battDiv.style.color='black'; } else if (battery.level > .25){ battDiv.style.backgroundColor='orange'; battDiv.style.color='white'; } else { battDiv.style.backgroundColor='red'; battDiv.style.color='white'; } battery.addEventListener('levelchange', function() { var battDiv = document.getElementById('batt'); var battL = this.level; battL= battL.toFixed(2); document.getElementById('batt').innerHTML = "<b>Battery <br>" + battL*100 +"%</b>"; if (this.level > .75){ battDiv.style.backgroundColor='green'; battDiv.style.color='white'; } else if (this.level > .5){ battDiv.style.backgroundColor='yellow'; battDiv.style.color='black'; } else if (this.level > .25){ battDiv.style.backgroundColor='orange'; battDiv.style.color='white'; } else { this.style.backgroundColor='red'; battDiv.style.color='white'; } }); }); Link to comment
0 Nick Fuchs1709160433 Posted October 3, 2019 Share Posted October 3, 2019 @Brian - This is great work. I'll take a look at implementing this in our lab environment and share any feedback. Will reach out via private message as well. Link to comment
0 ronaldrosing Posted October 7, 2019 Author Share Posted October 7, 2019 On 10/2/2019 at 6:12 AM, Brian Korrow said: I modified my storefront for this exact case. Add this custom code to Script.js on Storefront 3.x. This displays clock and battery life for Workspace on chromeos. Note: Battery isn’t supported for Windows client, but clock will work. (function () { var div2 = document.createElement("div"); document.getElementsByTagName('body')[0].appendChild(div2); div2.outerHTML = "<div id='txt' style='height: 50px; width: 150px; color: white; top: 0; left: 60%; border-left: 2px solid white; border-right: 2px solid white; border-bottom: 2px solid white; background-color: #1378a6; font-size: 18px; font-family: Segoe UI, sans-serif; position:fixed; cursor: pointer;text-align:center'></div>"; startTime(); function startTime() { var today = new Date(); var h = today.getHours(); var m = today.getMinutes(); var s = today.getSeconds(); m = checkTime(m); s = checkTime(s); document.getElementById('txt').innerHTML = "<b>The Time is Now <br>" + h + ":" + m + ":" + s +"</b>"; var t = setTimeout(startTime, 500); } function checkTime(i) { if (i < 10) {i = "0" + i}; // add zero in front of numbers < 10 return i; } }()); var div3 = document.createElement("div"); document.getElementsByTagName('body')[0].appendChild(div3); div3.outerHTML = "<div id='batt' style='height: 50px; width: 150px; color: white; top: 0; left: 75%; border-left: 2px solid white; border-right: 2px solid white; border-bottom: 2px solid white; background-color: #1378a6; font-size: 18px; font-family: Segoe UI, sans-serif; position:fixed; cursor: pointer;text-align:center'></div>"; navigator.getBattery().then(function(battery) { var battDiv = document.getElementById('batt'); var battL = battery.level; battL= battL.toFixed(2); document.getElementById('batt').innerHTML = "<b>Battery <br>" + battL*100 +"%</b>"; if (battery.level > .75){ battDiv.style.backgroundColor='green'; battDiv.style.color='white'; } else if (battery.level > .5){ battDiv.style.backgroundColor='yellow'; battDiv.style.color='black'; } else if (battery.level > .25){ battDiv.style.backgroundColor='orange'; battDiv.style.color='white'; } else { battDiv.style.backgroundColor='red'; battDiv.style.color='white'; } battery.addEventListener('levelchange', function() { var battDiv = document.getElementById('batt'); var battL = this.level; battL= battL.toFixed(2); document.getElementById('batt').innerHTML = "<b>Battery <br>" + battL*100 +"%</b>"; if (this.level > .75){ battDiv.style.backgroundColor='green'; battDiv.style.color='white'; } else if (this.level > .5){ battDiv.style.backgroundColor='yellow'; battDiv.style.color='black'; } else if (this.level > .25){ battDiv.style.backgroundColor='orange'; battDiv.style.color='white'; } else { this.style.backgroundColor='red'; battDiv.style.color='white'; } }); }); thank you but what if i already logged in my citrix session? We are using server shared deskyops in our environment. This is only when logging in right? Link to comment
0 Brian Korrow Posted October 10, 2019 Share Posted October 10, 2019 Looking into that. Regardless of session desktop, virtual desktop, or published app it’s going to take up the whole screen because of kiosk mode. I’m looking to see if it’s possible to hang the indicator off of the session window. Link to comment
0 Kerry Barnes1709159842 Posted May 5, 2020 Share Posted May 5, 2020 Hi Brian, Did you get anywhere with this? Would be great to see the battery status in a session. Link to comment
0 ronaldrosing Posted August 3, 2020 Author Share Posted August 3, 2020 On 5/5/2020 at 8:57 AM, Kerry Barnes1709159842 said: Hi Brian, Did you get anywhere with this? Would be great to see the battery status in a session. No still the same. No solution. Link to comment
Question
ronaldrosing
I have a handful of chromebooks, each running in Kiosk mode, auto starting a single app - Citrix Workspace App.
We are using Citrix Xenapp 7.18.
Is there any option to show the battery status from the Chromebook?
Link to comment
8 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now