GTK+ application not running in full screen - google-chrome

I have a custom google-chromium application (based on X11/Gtk+) which I am running on Ubuntu 13.x. Now what I want is when the system starts up i don't want to load Ubuntu window manager, instead I am starting Ubunut in text mode in console. When It starts in console mode, I want to run my custom google-chromium application. The application should run in 1080P. So here is the sequence.
Start Ubuntu in console mode.
login and start X server. (startx)
Once X server is launched I run google-chrome. (with the help of .xsession)
Everything is working and I am able to start my google-chrome application but there is one problem. My google-chrome application is not on full screen. I have tried geometry=1920x1080 --maximize but nothing is working and it is showing itself in the top - left corner.
As per GTK docs screen sizes are managed by Window Manager, (http://www.gtk.org/api/2.6/gtk/gtk-x11.html), which I am not running.
Question is, since I am not running any window manager how can I tell google-chrome application to run on the full screen.
Thanks.
Regards,
Farrukh Arshad.

what is called "full screen" under X11 is really a client message sent from the application to the window manager, which will then resize the window and hide the window frame; if there is no window manager, there is nothing to honour the policy. even the geometry request goes through the window manager: the toolkit can but ask.
the question is: are you modifying the Chromium code base for your application, or are you just launching the application itself? if you have access to the windowing system code you can get the screen size and set the window geometry yourself; see the GdkScreen API:
https://developer.gnome.org/gdk2/stable/GdkScreen.html
I would still suggest you run a small window manager; running without one degrades the functionality of any application. you can use a simple one, like twm:
http://en.wikipedia.org/wiki/Twm
or a slightly more complex, and yet very plain one, like Metacity:
https://wiki.gnome.org/Projects/Metacity

Related

RenderDoc inject into Google chrome failing

Hi so I am trying to start chrome with white tab(no graphical api) following this Google maps to 3D model tutorial and part of it instructs to inject RenderDoc into Google chrome but the injection is failing
I'm suspecting that this is what is causing the injection to fail is that chrome is loading with graphical api involved:
I made a shortcut with Target in properties holding" C:\Windows\System32\cmd.exe /c "SET RENDERDOC_HOOK_EGL=0 && START "" ^"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe^" --no-sandbox --gpu-startup-dialog""
Using it opens this
But it should be like this
And can inject into it
But when I click the ok button in the pop up "GPU starts with pid: 2408" puts me out and when I try to reinject does this
Any idea how I can fix this?
Tried different versions of RenderDoc (1.17 and 1.24), running on cmd instead of shortcut and restarting machine.
I'm going crazy with this problem....
Chrome restart several times, before restarting I noticed injection success with upper status bar visible, but when chrome restart last time injection fails.
I suspect that chrome has a system to detect injection and try several methods to block it, until a new restarted gpu process has avoided it.
I'm actually searching in this direction to solve the problem (if I'm right).
Confimation of this : https://www.securityweek.com/chrome-block-apps-injecting-its-processes/
...So I'll try a chrome version before 72 of January 2019, when chrome try to blocks all injections...

How do I tell figwheel to start and connect to Google Chrome instead of Firefox?

I'm taking some baby steps with figwheel.
When I fire up the tutorial application, it starts firefox, which then connects back to the figwheel process to get code to run on its JavaScript engine. If firefox is already running, a new tab is opened and the connection proceeds likewise. Figwheel probably just executes the firefox command with appropriate options. Or maybe it is using xdg-open.
The system is a Fedora Linux with KDE. Interestingly a "default browser" is not currently configured (how to configure the default browser is described in these KDE help pages): the application to start is selected based on URL contents. So I am not sure why figwheel selects firefox instead of Google Chrome, also installed.
Now, for testing purposes I sometimes want figwheeel to use a Google Chrome process instead. Is there a way to do that?
There seems to be no option regarding this.
You can use figwheel's :launch-js option to define what action should be taken for example:
:launch-js ["chrome" "--repl" :open-url]

How can XCUITest be used from within an OSX application to remote control iDevices?

Visionary scenario and current goal
My visionary scenario is to remotely control an non-jailbroken iDevice as lag-free as possible.
My current goal is to execute a tap on an iDevice from within an OSX application. For example: A button in a cocoa application which when clicked taps the middle of the screen on a lightning-connected iDevice.
I am not bound to OSX and am open to other avenues.
Approach
XCUITest in the XCTest framework allows to run automatic UI Tests. It is the native way of executing remote taps on iDevices.
The following line would execute a tap in the middle of the screen:
XCUIApplication().coordinateWithNormalizedOffset(CGVectorMake(0.5, 0.5)).tap()
Cheat Sheet for XCUITest: http://masilotti.com/ui-testing-cheat-sheet/
Unofficial Reference: http://masilotti.com/xctest-documentation/
Question
How can I use the XCUITest framework from within an OSX application to remotely tap a connected iDevice? I don't actually want to UI Test an existing application.
My problems start with #import XCTest which is not allowed without a test target and continue with .tap() (iOS) not being available in my cocoa application. How do integrate all this?
Other avenues
What other way should I possibly use instead? It must be possible to execute taps on a connected iDevice remotely, because Appium and Calabash use the now deprecated UIAutomation framework to do so. Both must switch to XCUITest from iOS10 onwards.
Edit 1 - Current status
It seems like my approach is much too complicated and basically means implementing Appium-light. My current approach is to use the Appium Server which handles UIAutomation (and in the future XCUITest). I then implement my own Client to send HTTP requests to the Appium REST-API.

Can Google Chrome be made to auto reload after network outage in kiosk scenario?

I have an unattended touch screen kiosk application which needs to be able to automatically reload the browser home page after a network outage has occurred. At the moment the browser will display an "Unable to connect to the internet" error and will wait for a manual reload to be carried out before proceeding. Can this be automated?
I've searched for plugins and have found some plugins which deal with auto-reload but they don't seem to work in this context. I am guessing that the plugin is only active when a page is loaded so in this case with an error condition, perhaps the plugin is not active.
One alternative might be to override the error page which is displayed by Chrome but I don't know if this is possible. I could then instantiate a Javascript timer to try a reload every n seconds for example. Is this possible?
I saw a suggestion to use frames to allow the outer frame (which is never refreshed) to keep trying the loading of an inner frame but I'm not keen to use frames unless there is no alternative. I also saw a suggestion to use AJAX calls to check if the network was working before attempting a page load but this seems overkill if there is a way to correct the error only when it has occurred rather than pre-empt an error for every page load.
Host system is Windows 7 by the way. I'm keen to keep the browser running if possible rather than kill and create a new browser process.
If you don't want to tackle chrome extension development, you could wrap your site in an iframe, and then periodically refresh the iframe from the parent frame. That way you don't need to worry about OS issues.
if the content were loaded from ajax from the start then the it could simply output a custom message on the page as it does a check via AJAX. Probably prevention over remedy is always recommended
Assuming linux, you could create an ifup script to simply relaunch the browser with something like
#!/bin/sh
killall google-chrome
DISPLAY=:0 google-chrome
On debian/ubuntu, edit /etc/network/interfaces to include a post-up line; Google ifupdown for other distros.
On windows, you'd do roughly the same with a PowerShell script.
If you really want the precise behaviour you describe (without restarting the whole browser), I suggest you develop a plugin/extension: http://code.google.com/chrome/extensions/getstarted.html
I know you are using Chrome, but in Firefox this is trivial by overriding the netError.xhtml page to do a setTimeout(location.reload, 10000);.

Any screen capture tool for Windows that can run from command line and has auto-scroll capability?

I'm looking for a screen capture tool for Windows (ideally supports xp, vista and 7),
that can execute command in command line and take screenshot of, say, web page.
Then it should have auto-scroll feature so that I can scroll down the captured images.
I've tried FastStone capture and DuckLink and while they do have auto-scroll feature, it is not supported in command line (command line would just take screenshot without auto-scroll).
Maybe Autohotkey might help, building scripts to run i.e. faststone and select "capture webpage with scroll".