DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 28th August 2017
handy handy is offline
Port Guard
 
Join Date: Aug 2017
Posts: 17
Default [SOLVED] DPI - How to change the setting - (Openbox)?

Hi, I'm running Openbox on a 24" display @ 1200p using an Intel CPU/GPU. I've adjusted the fonts sizes via the Openbox Configuration Manager (I'd like to also install LXAppearance but it doesn't seem to be available in the repo's but that's not the problem that this post is about), & the most of the what I see is fine, as I'm using 20 point fonts everywhere I can.

The size of the system fonts (as per any requesters, or the OB Config' Manager, or the Firefox menu fonts) are all really small. I believe that this is caused by OpenBSD natively using 96 DPI.

So, I'd like to know how to raise that number?

I've searched on the web, & on the OpenBSD site. The best I can come up with (which I've tried with no success) is to use the following command:

Code:
doas xrandr --dpi 130
I just chose 130 as a trial number, as I see trial & error being the method of coming up with the right DPI to use.

Any help much appreciated.

Last edited by handy; 29th August 2017 at 10:37 AM. Reason: marked the thread solved :)
Reply With Quote
  #2   (View Single Post)  
Old 28th August 2017
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,507
Default

Quote:
The size of the system fonts
The font size is often set in the application itself. For instance, you can set firefox font family and size in the preferences panel. For xterm the default fonts are specified in ~/.Xdefaults
Code:
! $OpenBSD: dot.Xdefaults,v 1.3 2014/07/10 10:22:59 jasper Exp $
! XTerm
XTerm*loginShell: true
XTerm*locale: utf8 
XTerm*background: #292929
XTerm*foreground: white
XTerm*scrollBar: true
XTerm*rightScrollBar: true
XTerm*multiScroll: on
XTerm*jumpScroll: on
!XTerm*locale: true
XTerm*faceName: Bitstream Vera Sans Mono
XTerm*faceSize: 10
XTerm*eightBitInput: true
XTerm*pointerShape: left_ptr
XTerm*showBlinkAsBold: true
XTerm*colorBDMode: true
XTerm*ActiveIcon: true
XTerm*scrollbar.foreground: #212121
XTerm*scrollbar.background: #393F3F
XTerm*scrollbar.thumb: black
XTerm*VT100.scrollbar.translations:  #override \n\
        <Btn5Down>:     StartScroll(Forward) \n\
        <Btn1Down>:     StartScroll(Continuous) MoveThumb() NotifyThumb() \n\
        <Btn4Down>:     StartScroll(Backward) \n\
        <Btn1Motion>:   MoveThumb() NotifyThumb() \n\
        <BtnUp>:        NotifyScroll(Proportional) EndScroll()
XTerm*VT100.color1: #2F4F4F
The selections in obconf adjust the fonts in the openbox right-click menu, window titles and pop-up messages.

Usually dpi does not refer to fonts but rather the density of the screen pixels.
Reply With Quote
  #3   (View Single Post)  
Old 28th August 2017
ibara ibara is offline
OpenBSD language porter
 
Join Date: Jan 2014
Posts: 783
Default

130 is an awkward number. Try 120 (25% increase) or 144 (50% increase).
The downside to the xrandr method is that only applications that respect the setting will use it. So while xterm might do something, Firefox might not.

Unfortunately, I don't have other suggestions. It should, however, be a generic X thing and not OpenBSD-specific, if that helps you broaden your search.
Reply With Quote
  #4   (View Single Post)  
Old 28th August 2017
IdOp's Avatar
IdOp IdOp is offline
Too dumb for a smartphone
 
Join Date: May 2008
Location: twisting on the daemon's fork(2)
Posts: 1,027
Default

Does the apparent solution in this thread help? See the first and last posts. It is for gtk-2 based applications.
Reply With Quote
  #5   (View Single Post)  
Old 28th August 2017
scottro's Avatar
scottro scottro is offline
Real Name: Scott Robbins
ISO Quartermaster
 
Join Date: Apr 2008
Location: NYC
Posts: 653
Default

I've used (for a yoga2 which has a hires screen), in .Xdefaults

Xft.dpi: 180

Maybe you can set the DPI there?

I have a page on the yoga2, which mentions that and some xrandr stuff.
http://srobb.net/yoga2.html
Reply With Quote
  #6   (View Single Post)  
Old 28th August 2017
Head_on_a_Stick's Avatar
Head_on_a_Stick Head_on_a_Stick is offline
Real Name: Matthew
Bitchy Nerd Elitist
 
Join Date: Dec 2015
Location: London
Posts: 465
Default

How are you starting your desktop?

The most reliable method of setting DPI in the X server is to call it as an option with `startx` (or `xinit`); so this:
Code:
startx /usr/local/bin/openbox-session -- -dpi 120
Or this:
Code:
xinit /usr/local/bin/openbox-session -- -nolisten tcp -tst -dpi 120
Works for me
Reply With Quote
  #7   (View Single Post)  
Old 29th August 2017
handy handy is offline
Port Guard
 
Join Date: Aug 2017
Posts: 17
Default

@shep Thanks for your reply.

Unfortunately the changes you can make to the fonts in Firefox allow you to only change what you see inside the Firefox "window", but NOT the Firefox menu or the contents of that menu - i.e. the Firefox Preferences tabs, etc.

I understand the (unfortunate in my case at least) limitations of what OBConf can & can't do.

You were right about ~/.Xdefaults (see the section further below).

What I've found over previous years, due to similar needs as those that caused me to start this thread, is that on both OS/X & Win7 - there is no other method to enlarge certain fonts, than this method of enlarging the DPI of your display. (OS/X has a maximum size of 16pt for the desktop menu & other system setting displays - i.e. Preferences again...)

Enlarging the DPI enlarges everything - ALL fonts - so if you have enlarged all of the fonts that you can control the size of, you will have to reduce the size of those fonts that you can control after you have upped the DPI. I most certainly have to - a LOT.

For those of us that truly NEED to enlarge the size of the smallest fonts, this DPI method is our salvation.

@ibara Thanks for your reply.

I expected that the -dpi 130 would not be the solution. It was just an example, in what I knew would be a trial & error solution.

Yes, what you said about the xrandr being unlikely to be a solution was certainly correct for me. As the command I tried was ignored completely!

I also agree with you that this is an X problem, & not one that is belongs to OpenBSD.

@IDOp Thanks for your reply.

I had already looked at that thread prior to posting, during my search the internet phase. It is unfortunately (or fortunately as it turns out - see below) of no help.

@scottro Thanks for your reply.

You nailed it for me. By adding Xft.dpi: 192 to my ~/.Xdefaults file I've now got the display that I want. Admittedly I had a couple of trial dpi numbers before I got the one that I'm now using. I also had to reduce the size of the fonts via OBConf & in applications that allow me to set font size, like: Firefox (Preferences -> Content); Terminator; Leafpad; Worker. I'll probably discover the odd program that I've missed, but that's fine.

I'm really VERY happy with the way that my display is looking. So thanks again for your reply.

@Head_on_a_Stick Thanks for your reply too.

I didn't have to try your method. Though trying it a different way (not using your path to Openbox) failed to work. I tried that before I posted here.

Anyway, all's great. Thank you all for your help. I love it when a plan comes together...

Last edited by handy; 29th August 2017 at 12:16 PM. Reason: improve clarity; 2nd edit - spelling
Reply With Quote
  #8   (View Single Post)  
Old 29th August 2017
acampbell acampbell is offline
Real Name: Anthony Campbell
Shell Scout
 
Join Date: Sep 2014
Location: London, UK
Posts: 138
Default

I set the size of the Firefox menu fonts using userChrome.css.
Reply With Quote
  #9   (View Single Post)  
Old 29th August 2017
handy handy is offline
Port Guard
 
Join Date: Aug 2017
Posts: 17
Default

@acampbell I'm running Firefox v52.0.2 & userChrome.css does not exist on my system?
Reply With Quote
Old 29th August 2017
scottro's Avatar
scottro scottro is offline
Real Name: Scott Robbins
ISO Quartermaster
 
Join Date: Apr 2008
Location: NYC
Posts: 653
Default

Thanks for following up and letting us know what worked. Glad the solution worked for you.
Reply With Quote
Old 29th August 2017
handy handy is offline
Port Guard
 
Join Date: Aug 2017
Posts: 17
Default

@scottro My pleasure.

@acampbell I looked up userChrome.css ... Now I know - thanks.

http://kb.mozillazine.org/index.php?...&printable=yes
Reply With Quote
Reply

Tags
dpi, openbox


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to start openbox philo_neo71 OpenBSD Packages and Ports 8 5th January 2016 03:34 AM
Is openbox still available ? sw2wolf OpenBSD Packages and Ports 5 1st April 2012 04:17 PM
value of machdep.allowaperture for openbox sepuku OpenBSD General 6 4th July 2011 12:04 AM
How to change terminal color (Openbox)? Daffy OpenBSD Packages and Ports 6 14th July 2010 07:47 AM
DE Forging (Openbox) greencross FreeBSD Ports and Packages 2 25th September 2008 07:02 AM


All times are GMT. The time now is 02:23 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick