.Xdefaults vs .Xresources
Many X programs have user-level configuration options that can be set in the X server’s resource database.
The two most common ways to achive persistent configuration for your X programs are to store them in either ~/.Xdefaults
or ~/.Xresources
files.
I will not go into detail of the syntax of these files. However, there are some things to take into consideration between the choice of the two files.
Consider the X program xterm
. You want to make the background black and the foreground white. This can be achived by passing some command line arguments to xterm
:
$ xterm -bg black -fg white
This is fine if you want this for only one time, but if you want it to be the default you put it in a configuration file.
XTerm*background: black
XTerm*foreground: white
If you put this in the ~/.Xdefaults
file you will notice that the next time you start an xterm
it has the new colors. Great! Or, is it?
It is easy to change configuration options and it will be in effect next time you start the program, but it comes at the cost that basically all X programs needs to parse this file everytime you run one.
A better way is to put the configuration options in the ~/.Xresources
file and store the configuration in the X server’s resource database by using the xrdb
command:
$ xrdb -merge ~/.Xresources
Doing this, (in simple terms) xterm
will “ask” the X server for its resource options rather than reading a file. This is much quicker and avoids unnecessary reads on disk.
Another great thing about this is that remote X programs (e.g., tunneled through SSH) will be able to catch these options.
Once configurations are read into the X server’s resource databse (using xrdb
), X programs should not look for configuration options in ~/.Xdefaults
file.
As many desktop environments (like Gnome or KDE) will store the configurtion from both files into the resource database upon the start of X, the drawbacks stated above may not be a problem.
However, if you don’t run a desktop environment (like me) you need to manually run xrdb
when starting X (e.g., by adding xrdb
command line above to the ~/.xinitrc
file).
If you run xrdb
manually, you can of course name the ~/.Xresources
file whatever you want, but it’s the defacto standard.
March 27th, 2014 at 23:25
[…] better way to fix this problem would be the xrdb -merge. But I won’t go into this too […]
May 9th, 2015 at 21:58
Thanks you very much for your explaination.
Have been struggling a long time with xterm to get a bigger font. Now i undertand how it should work and why. Installed xrdb and everything is running just fine now.
March 29th, 2019 at 10:49
???????,??????????! .
June 26th, 2019 at 00:46
Купить права в Санкт-Петербурге – Купить права тракориста, права водителя
November 21st, 2019 at 12:25
Invest $ 2427 and get $ 7449 every month: https://make-5-btc-per-day.blogspot.de?z=59
November 25th, 2019 at 13:01
Заработок в интернете от 8695 rub. в день: http://milehearan.tk/uhyal
December 4th, 2019 at 12:23
This web site really has all of the information I wanted about this subject and didn’t know
who to ask.
January 21st, 2020 at 00:08
Регистрация
March 10th, 2020 at 18:48
Нow to invеst in Вitcоin $ 7874 – gеt а rеturn of uр to 5143%: http://qfxrj.daylibrush.com/19d683
July 31st, 2020 at 01:29
магазин продажи аккаунтов – Купить канал Телеграмм, Гарант сервис онлайн
August 24th, 2020 at 10:07
Upoltvp
iason.002@gmail.com
:
July 27th, 2024 at 15:15
Angioblastic meningioma An angioblastic meningioma consists of 2 617 patterns: haemangioblastic pattern resembling haemangioblastoma of the cerebellum, and haemangiopericytic sample which is indistinguishable from haemangiopericytoma elsewhere in the body. Abnormal psychological or behavioral symptoms that develop in response to a medical condition are extra properly coded as an adjustment dysfunction (a clinпїЅ ically significant psychological response to an identifiable stressor). The presence of the posterior fats pad sign on radiographs has been advised as a sign of an intracapsular elbow fracture in pediatric patients even when no fracture is seen on the radiograph medications for bipolar purchase requip 0.5 mg.
July 27th, 2024 at 16:13
Were they not in potential form they would not attain the important power as promptly and instantly, and it is a query whether or not they wouldn’t be in a poisonous kind which would destroy or subvert the vital power without displaying the correct symptomatology. In extreme instances, this winging is obvious as quickly because the affected person makes an attempt to flex the involved shoulder forward. Transcranial Doppler ultrasound examined for the presence of blood or xanthochromia could also be used to display noninvasively for vasospasm, but before the potential of subarachnoid hemorrhage is typical arteriography is required to doc and deal with vasospasm when the medical suspicion is excessive allergy jefferson city mo discount deltasone 40 mg fast delivery.