Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Chromium use System Title Bar and Borders #45

Closed
probonopd opened this issue Nov 20, 2020 · 17 comments
Closed

Make Chromium use System Title Bar and Borders #45

probonopd opened this issue Nov 20, 2020 · 17 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@probonopd
Copy link
Member

probonopd commented Nov 20, 2020

Click on top of browser window and activate 'Use system Title Bar and Borders' - how to do this as part of the system-wide preconfiguration?

image

@probonopd
Copy link
Member Author

probonopd commented Nov 20, 2020

Use a master_preferences file but how exactly?

@probonopd probonopd added good first issue Good for newcomers help wanted Extra attention is needed labels Nov 20, 2020
@grahamperrin
Copy link
Contributor

Discovering the preference

  1. Launch Chromium without the required appearance
  2. in a terminal window
  3. cd ~/.config/chromium/Default
  4. cp Preferences ~/Desktop/chromium-titlebar-disabled.json
  5. give Chromium the required appearance then return to the terminal
  6. cp Preferences ~/Desktop/chromium-titlebar-enabled.json
  7. compare the two files.

Whilst simple output from diff(1) might not help, something with a GUI will.

% pkg rquery '%o %v %R' meld
textproc/meld 3.20.1,1 FreeBSD
% 

2021-01-03 14:04:10

custom_chrome_frame

It's a boolean preference in a JSON file that does not have a .json suffix.

~/.config/chromium/Default/Preferences

Hint

After you finish with the ~/Desktop copies of the file, set one aside for future reference. With the .json suffix, it might be usefully viewed in Firefox, or any other application that's capable of presenting a human-friendly view.

image

@grahamperrin
Copy link
Contributor

grahamperrin commented Jan 3, 2021

Writing the preference before a first run of Chromium

Experiment 001

Essentially:

  1. quit Chromium
  2. cd ~/.config/ then set aside your usual Chromium configuration directory
  3. create a path
  4. write the preference alone to the preference file alone.
mv chromium chromium.setaside
cd
mkdir -p ~/.config/chromium/Default
echo "{"custom_chrome_frame":true}" > /usr/home/grahamperrin/.config/chromium/Default/Preferences
chrome

image

There's the title bar, however:

  • the screenshot was preceded by a Chromium error dialogue about a corrupt profile.

The next run of Chromium was error-free.

Housekeeping

Quit Chromium then put back your usual stuff.

cd ~/.config
mv chromium.setaside chromium.putthisback && rm -r chromium && mv chromium.putthisback chromium
cd 

@grahamperrin
Copy link
Contributor

#45 (comment)

Use a master_preferences file but how exactly?

I don't know.

Strict searches such as this find plenty of discussion, but (at a glance) nothing about pre-configuration:

https://www.google.com/search?q=%22custom_chrome_frame%22+preset%7Cpreconfigure%7Cdefault&tbs=li%3A1#unfucked

https://www.freebsd.org/cgi/man.cgi?query=hier(7) draws attention to:

/usr/share/skel

https://www.google.com/search?q=%2B%22%2Fusr%2Fshare%2Fskel%22+%2BChromium+%2BPreferences&tbs=li%3A1#unfucked&tbs=qdr:y finds nothing.

If there's a Linux equivalent to /usr/share/skel then a Linux-oriented search might find examples of people who truly do wish to preconfigure Chromium (or Chrome) …

@probonopd
Copy link
Member Author

probonopd commented Jan 3, 2021

If there's a Linux equivalent to /usr/share/skel

Use the search, Luke!

Ours is at
https://github.com/helloSystem/ISO/tree/experimental/overlays/uzip/hello/files/usr/share/skel

@grahamperrin
Copy link
Contributor

grahamperrin commented Jan 3, 2021

… this is open for anyone to be Luke :-)

@grahamperrin
Copy link
Contributor

Not effective with hello-0.3.0_0C155-FreeBSD-12.1-amd64.iso.

First run, after installation:

image

@probonopd
Copy link
Member Author

Too bad it didn't work so far. If anyone ever finds out how to preconfigure this, please let us know.

In the meantime we are shipping Falkon which uses the Global Menu out of the box.

@ghost
Copy link

ghost commented Jul 16, 2021

Why would we want chromium?

@probonopd
Copy link
Member Author

Chrome extensions/plugins like uBlock Origin do not work in Falkon. And the Linux version of Chromium is useful for people who need Widevine DRM.

@ghost
Copy link

ghost commented Jul 16, 2021 via email

@probonopd
Copy link
Member Author

It could, but it is ugly as hell and recently got worse.

@grahamperrin
Copy link
Contributor

this

custom_chrome_frame is above.

@probonopd
Copy link
Member Author

Ah right @grahamperrin. I was thinking of the Global Menu. Haven't seen a working solution on FreeBSD for that yet.

@probonopd
Copy link
Member Author

probonopd commented Nov 8, 2021

This as /usr/share/skel/dot.config/chromium/Default/Preferences seems to do the trick:

{
   "browser":{
      "custom_chrome_frame":false
   }
}

image

There are probably other aspects in this file that would be worth customizing.

@probonopd
Copy link
Member Author

Feel free to comment here in case the issue is not fixed properly.
Thanks for your help @grahamperrin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants