I would like to create a launcher launching:
chromium-browser chrome://inspect
However, this simply opens the chromium as if not url has been specified at all.
Is it even to start Chromium opening a chrome://
url?
I would like to create a launcher launching:
chromium-browser chrome://inspect
However, this simply opens the chromium as if not url has been specified at all.
Is it even to start Chromium opening a chrome://
url?
While "normal" url's do work as expected, it seems impossible at first to use the
chrome://
urls from a command, and there is nothing in theman chromium-browser
man page on this.However, it is very well possible to work around this, with the help of xdotool.
How it works
install
xdotool
Use the following command in your
.desktop
file:What it will do is open
chromium browser
,xdotool
will type thechrome://inspect
url and (simulate) press return.Effectively this will do exactly what you want.
No need to say that you can replace
chrome://inspect
with any other of thechrome://
commands.Note
In the command, there is a small break included of 2 seconds, to make sure the browser is loaded before
xdotool
starts to type. On my system (not the most recent) it can be changed tosleep 1
and still work perfectly. You can experiment a bit with it.edit
Alternative
Dirty or not, a solution should always work. I tried the solution above now and then, and found that occasionally, it takes too long for the
chromium-browser
window to appear. Especially when the computer is heavily occupied, there is a chance xdotool starts typing "blindly".The solution below is "time-proof" and should work under all circumstances; it makes sure
xdotool
only starts typing when a newchromium-browser
window appears within appr. 15 seconds.How to use
run_chrcommand.py
use as command in your
.desktop
file:The script