You are not logged in.
Pages: 1
Hello,
I've written a bash script which depends on my web browser being started with some flags. but the browser itself is not started by the script. I've defined an alias in my bashrc file and can start the browser from the command line and it works fine, however, if I start it using the keybindings, it does not work as the script www-browser is called, which apparently does not care if there is an alias or not. How can I incorporate the alias into www-browser, so that it will also start the browser with the necessary flags?
Last edited by Wismut (2019-05-09 08:59:03)
Offline
An alias is for the shell. Please post your script, using [ code ]tags.
Be Excellent to Each Other...
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline
more precisely:
aliases are not considered in shell scripts, only on the command line.
but there's plenty of way around that.
show us what you got, i'm not 100% sure i understood.
i have some scripts in ~/bin that override applications in /usr/bin, but i'm not sure if x-www-broser would use that.
does it have to be x-www-browser?
BL quote proposals to this thread please.
how to ask smart questions | my repos / my repos | my blog
Offline
I want to start the Vivaldi web browser with the remote-debugging-port flag enabled even when launching it from openbox using either super+w or from the super menu. However, by default the browser is not launched directly, but from openbox, x-www-browser is invoked, which then starts the browser, but without flags. In the background there is a programm running that tries to connect to the remote-debugging-port of the browser, but it obviously fails if the browser is started without the flag. At the moment, I have to start the browser from the command line with the flags added, which is not what I want. It would be nice if it would be possible to start the browser with its flags added using super+w.
Offline
I'd do a browser script in ~/bin/browser , like
vivaldi --stuff ...
and edit .config/openbox rc.xml and menu.xml accordingly to call that script.
Example browser script:
#!/bin/bash
if cat $HOME/.gtkrc-2.0 | grep Adapta-Nokto ; then
echo "mkay"
GTK_THEME=Adapta /usr/bin/firefox
else
echo "just using what's there"
/usr/bin/firefox
fi
Last edited by brontosaurusrex (2019-03-15 11:34:38)
Offline
I want to start the Vivaldi web browser with the remote-debugging-port flag enabled even when launching it from openbox using either super+w or from the super menu. However, by default the browser is not launched directly, but from openbox, x-www-browser is invoked, which then starts the browser, but without flags. In the background there is a programm running that tries to connect to the remote-debugging-port of the browser, but it obviously fails if the browser is started without the flag. At the moment, I have to start the browser from the command line with the flags added, which is not what I want. It would be nice if it would be possible to start the browser with its flags added using super+w.
sounds like you want to create a custom .desktop file that does what you want.
BL quote proposals to this thread please.
how to ask smart questions | my repos / my repos | my blog
Offline
Or just edit rc.xml to replace the command 'x-www-browser' with your custom 'vivaldi --option --option2'.
(x-www-browser is an alias that points to whatever browser has been configured as that Debian alternative. The idea is that even if you switch to another browser all your menu entries and keybinds will go on working.)
John
--------------------
( a boring Japan blog, idle Twitterings and GitStuff )
In case you forget, the rules.
Offline
Sorry for the late reply, but this worked, thank you
Offline
Pages: 1