Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
1
votes
0
answers
227
views
X ignores xrdb merges
Installing snapd on fedora seems to have had a weird effect on the X installation and I need advice on how to debug it. System is Fedora 36 and I have FVWM on X. Until today on login ``/etc/X11/xinit/xinitrc-common`` would find my ``~/.Xresources`` file and load (technically -merge) it. After the in...
Installing snapd on fedora seems to have had a weird effect on the X installation and I need advice on how to debug it. System is Fedora 36 and I have FVWM on X. Until today on login `
/etc/X11/xinit/xinitrc-common
would find my
~/.Xresources
file and load (technically -merge) it. After the install this file is ignored. The system-wide
/etc/X11/Xresources
` *is* getting loaded on login, but the local one isn't. For example, putting my personal settings in the global file has the desired effect.
Manually calling `$ xrdb -merge ~/.Xresources
from a terminal does nothing, while
$ xrdb -load ~/.Xresources
clears the database but doesn't load anything (
$ xrdb -q
now has no output).
$ xrdb -load /etc/X11/Xresources
` has the same effect (even though at login the file is loaded). Running the commands as root has no effect either. I am at a loss: how does one debug the interaction between xrdb and the X server?
Lior Silberman
(171 rep)
Oct 29, 2022, 04:41 AM
0
votes
1
answers
154
views
condition in .xinitrc not satisfied, don't know why
I have a condition in `.xinitrc` that is not met, and I don't understand why: I have the `.Xresources` file in my `~` (with read permissions), and my `~/.xinitrc` contains a line with [[ -f ~/.Xresources ]] && xrdb -load ~/.Xresources & However the condition between double brackets is not met. Why i...
I have a condition in
.xinitrc
that is not met, and I don't understand why:
I have the .Xresources
file in my ~
(with read permissions), and my ~/.xinitrc
contains a line with
[[ -f ~/.Xresources ]] && xrdb -load ~/.Xresources &
However the condition between double brackets is not met. Why is that? The file exists and is located in my home!
If I change the line to this,
xrdb -load ~/.Xresources &
Then it works, and also works if I run [[ -f ~/.Xresources ]] && xrdb -load ~/.Xresources
from bash.
Why is not working in .xinitrc
?
My solution for the moment was to put directly the second line, however I don't understand why the condition is not met.
ElTitoFranki
(133 rep)
May 2, 2022, 11:26 AM
• Last activity: May 2, 2022, 05:03 PM
5
votes
0
answers
1696
views
How to connect to a second monitor without restarting X?
Every time I have to connect to an external monitor, it remains "disconnected" according to ```xrandr``` and the second screen remains black. To solve this problem, I always have to close all my GUI apps and the X server, login again and restart everything. Tests I did : if I go to ```tty2``` before...
Every time I have to connect to an external monitor, it remains "disconnected" according to
and the second screen remains black.
To solve this problem, I always have to close all my GUI apps and the X server, login again and restart everything.
Tests I did : if I go to
before doing this, the screen is duplicated as expected but when I go back to
(which I use to
) it disappears.
My config is Arch Linux + bspwm, my .xinitrc
is simply bspwm
I'd really like to keep my programs open whenever I need to do a presentation.
Benjamin
(51 rep)
Feb 22, 2022, 04:23 AM
0
votes
1
answers
550
views
How to make Gnome reload settings changed by xrdb programmatically
I've got a setup where I'm always logging in to the same account (Centrify managed on the same network), but some of the systems have 24" 1080p (1920x1080) monitor(s) and others have 27" 4K (3840x2160) monitors. The default Gnome scaling factor is roughly correct for the 1080p monitors, but leaves t...
I've got a setup where I'm always logging in to the same account (Centrify managed on the same network), but some of the systems have 24" 1080p (1920x1080) monitor(s) and others have 27" 4K (3840x2160) monitors. The default Gnome scaling factor is roughly correct for the 1080p monitors, but leaves things unreadably tiny on the 4K monitors.
I can manually fix it each time I switch machines by launching the
Tweaks
tool, going to the Font
tab, and setting the Scaling Factor
to 1.38 (for 4K) or 0.98 (for 1080p) to make it readable, and Gnome updates to use the new scaling factor immediately.
I'm trying to script this to occur automatically in my .bashrc
(we have a weird setup where .bashrc
is always run, even for the login shell; I just test for being in a non-ssh, non-interactive login shell so it doesn't run except in the login shell) so I don't need to do anything manual when I switch machines, so I wrote two .Xresources
files, one with:
-none
Xft.dpi: 132
and the other with:
-none
Xft.dpi: 94
and based on which machine I'm logging into, I run:
-sh
xrdb -merge ~/path/to/appropriate/.Xresources
to apply the correct dpi setting for that machine. But while some other settings in the .Xresources
file (omitted) take effect immediately (the applications are closed on login, so they load the correct settings when I launch them) it doesn't change the setting for my existing login's Gnome shell UII; it only applies when I log out and back in again, and I'd rather not have to log in, out and back in again each time I switch machines (that's worse than the manual update in Tweaks
).
So my question is:
#### Is there any programmatic way to do one of:
#### 1. Tell Gnome to reload config from the xrdb
settings (xrdb -query -all
clearly shows the change was made, it just isn't being applied)?
#### 2. Directly tell Gnome to use a new scaling factor in the same way the Tweaks
tool does it?
#### 3. (If I have an XY problem) A cleaner way to apply a custom DPI in some other way?
ShadowRanger
(163 rep)
Dec 3, 2021, 04:04 PM
• Last activity: Dec 3, 2021, 09:03 PM
1
votes
0
answers
96
views
How do I inform Firefox about a change in the X server resource database?
When docking/undocking my laptop, I change `Xft.dpi` in the X server resource database using `xrdb`. After that happened, I would like to inform as many applications as possible that they should re-read and apply the changed settings. According to [this answer](https://unix.stackexchange.com/a/26138...
When docking/undocking my laptop, I change
Xft.dpi
in the X server resource database using xrdb
. After that happened, I would like to inform as many applications as possible that they should re-read and apply the changed settings.
According to [this answer](https://unix.stackexchange.com/a/261389/347377) :
> Reloading the configuration is a feature that not all programs support. X resources in particular are usually read when a program starts up; there's no protocol to notify an application that it should use new resources¹. Rxvt tends towards being small, so it's no surprise that it doesn't support reloading its configuration after startup.
Firefox is a bit bigger than Rxvt therefore my question:
*Q*: How do I inform Firefox about a change in the X server resource database?
Related:
* https://unix.stackexchange.com/q/261044/347377
Ente
(171 rep)
Oct 25, 2019, 01:17 PM
1
votes
1
answers
1190
views
URxvt.font ignoring font size
I have tried any and all combinations of the `URxvt.font` but it just isn't working. This is how my `.Xresources` file looks like: ! URxvt URxvt.foreground: white URxvt.font: xft:monospace:size=10.5 URxvt.letterSpace: -1 URxvt.depth: 32 URxvt.background: [90]#000000 URxvt.scrollBar: false ! Xft Xft....
I have tried any and all combinations of the
URxvt.font
but it just isn't working. This is how my .Xresources
file looks like:
! URxvt
URxvt.foreground: white
URxvt.font: xft:monospace:size=10.5
URxvt.letterSpace: -1
URxvt.depth: 32
URxvt.background: #000000
URxvt.scrollBar: false
! Xft
Xft.autohint: 0
Xft.lcdfilter: lcddefault
Xft.hintstyle: hintslight
Xft.hinting: 1
Xft.antialias: 1
Xft.rgba: rgb
Xft.dpi: 120
However it doesn't care if I set size
to 10.5
or 100.5
, the size won't change. Even xrdb -query
shows it's set to size=100.5
but all the text would be very small. It only happens with the monospace
font (which is mapped to Inconsolata). Any other font gets resized just fine. pixelsize
works, too, but I need to use size
because it lets the font scale according to Xft.dpi
.
arielnmz
(559 rep)
Nov 17, 2018, 02:21 AM
• Last activity: Nov 17, 2018, 06:40 AM
0
votes
1
answers
1163
views
How to get background and foreground color values from xrdb in shell script?
As in how can I get the `*.foreground` color value obtained with `xrdb -query` assigned to a variable in the script. I'm trying to get both background and foreground colors into two variables that will be passed to another program as parameters.
As in how can I get the
*.foreground
color value obtained with xrdb -query
assigned to a variable in the script.
I'm trying to get both background and foreground colors into two variables that will be passed to another program as parameters.
Renato Oliveira
(601 rep)
May 16, 2018, 01:15 PM
• Last activity: May 17, 2018, 01:21 PM
2
votes
1
answers
2345
views
Query specific ~/.Xresources value
I would like to query a single value from ~/.Xresources. `xrdb -query` gives me the whole configuration, but I would specifically like to echo the *value* of an *individual* property (e.g., `URxvt.internalBorder` or `*color14`). How can I do this?
I would like to query a single value from ~/.Xresources.
xrdb -query
gives me the whole configuration, but I would specifically like to echo the *value* of an *individual* property (e.g., URxvt.internalBorder
or *color14
). How can I do this?
gmarmstrong
(1283 rep)
May 4, 2018, 02:59 PM
• Last activity: May 7, 2018, 04:08 AM
0
votes
1
answers
839
views
How to print xrdb/urxvt defaults?
`xrdb` prints anything that you have configured, but **how do you print the values for the settings which you have not touched?** Either generally for X resources or specifically for urxvt. The colour scheme, that is, `color0` onwards, can be found in an obscure [manual][1]. Trawling around to find...
xrdb
prints anything that you have configured, but **how do you print the values for the settings which you have not touched?** Either generally for X resources or specifically for urxvt. The colour scheme, that is, color0
onwards, can be found in an obscure manual . Trawling around to find all the defaults is going to be tedious and error prone, since documentation could always be out of date.
l0b0
(53368 rep)
Nov 13, 2017, 09:21 AM
• Last activity: Nov 16, 2017, 04:04 AM
Showing page 1 of 9 total questions