You are not logged in.

#1 2020-12-09 18:50:07

travisb9218
Member
Registered: 2020-12-09
Posts: 5

--incognito chrome

I would like to open Incognito Chrome in Default

is there a way for doing this in a file that I can edit because am not finding no way to do it online form's google search is so bad can't find nothing revelent at all

Search Engines are Dead

Offline

#2 2020-12-09 19:19:47

damo
....moderator....
Registered: 2015-08-20
Posts: 6,575

Re: --incognito chrome

It's easy to change the keybind - edit xbindkeysrc (Find it in Menu > Preferences)

Change

# Web Browser
"x-www-browser"
   Mod4 + w

to (if you are using chromium, else use the relevant chrome executable)

# Web Browser
"chromium --incognito"
   Mod4 + w

Or set up a new keybind of your choice.

Use the same approach if you want to change the menu item as well, by editing ~/.config/jgmenu/prepend.csv


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#3 2020-12-09 19:35:10

travisb9218
Member
Registered: 2020-12-09
Posts: 5

Re: --incognito chrome

When I typed "google-chrome" in terminal or "google chrome --incognito" it works

Edit Does Not Work

# Web Browser
"x-www-browser"
"google-chrome --incognito"
    Mod4 + w

Offline

#4 2020-12-09 20:27:16

damo
....moderator....
Registered: 2015-08-20
Posts: 6,575

Re: --incognito chrome

You have a malformed keybind...

# Web Browser
"x-www-browser"
"google-chrome --incognito"
    Mod4 + w

It should be

# Web Browser
"google-chrome --incognito"
    Mod4 + w

Did you remember restart xbindkeys? Menu > Preferences > Keybinds > Restart

Last edited by damo (2020-12-09 20:29:07)


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#5 2020-12-10 20:30:17

travisb9218
Member
Registered: 2020-12-09
Posts: 5

Re: --incognito chrome

Thanks The Edit Worked For The Key Binding is There a Way I don't know if you stated this before but with the drop up menu the default browser does not start in "google-chrome --incognito" Sorry Should of been more clear about what I was trying to do... But I really thankful for your help with the key binding if there is no way for doing this that alright.

Offline

#6 2020-12-10 22:16:42

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 2,267
Website

Re: --incognito chrome

Multiple ways to do this, for example you have a script in your user ~bin named browser

#!/bin/bash
trap 'kill $(jobs -p) >/dev/null 2>&1' EXIT
google-chrome --incognito "$@"

Then you can add that script as one of the browsers

sudo update-alternatives --install /usr/bin/x-www-browser x-www-browser ~/bin/browser 210

and command

sudo update-alternatives --config x-www-browser 

may return

There are 3 choices for the alternative x-www-browser (providing /usr/bin/x-www-browser).

  Selection    Path                           Priority   Status
------------------------------------------------------------
* 0            /home/b/bin/browser             210       auto mode
  1            /home/b/bin/browser             210       manual mode
  2            /usr/bin/firefox-esr            70        manual mode
  3            /usr/bin/google-chrome-stable   200       manual mode

Press <enter> to keep the current choice[*], or type selection number: 

and we are in business (mostly). At least until you fall unto another meta-tech for starting stuff, like xdg-settings.

Explanation: Whatever part of the system that calls x-www-browser, will now run your script, keeping things meta.
Note: almost untested.

Last edited by brontosaurusrex (2020-12-10 22:35:50)

Offline

#7 2020-12-10 23:09:10

horo
Member
Registered: 2016-03-13
Posts: 47

Re: --incognito chrome

middle office, could you explain what that script is doing?
it looks like you are having jobs feed your kill command, and sending the stdout to null, but I don't understand what the trap command does.

Also, what advantage does this script bring over just manual editing the keybind and menu options with 'chrome --incognito'?

Offline

#8 2020-12-11 07:29:48

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 2,267
Website

Re: --incognito chrome

Trap enables killing instances of browser without pid hunting (if needed)
https://forums.bunsenlabs.org/viewtopic … 83#p108783

test from cli

browser &
killall browser
horo wrote:

manual editing the keybind and menu options with 'chrome --incognito'

You keep all setting in single (very editable) script, v2 might be

#!/bin/bash
trap 'kill $(jobs -p) >/dev/null 2>&1' EXIT
google-chrome --incognito https://duckduckgo.com https://www.bunsenlabs.org "$@" 

and you keep the 'update alternatives' tech in place, so you don't have to edit stuff in multiple places. At least that's the idea.
LcDlLqwb.jpg

Last edited by brontosaurusrex (2020-12-11 08:17:35)

Offline

Board footer

Powered by FluxBB