Other CDE Users Unite!

I use a terminal login and run startx from there.
Befote that, I configure .xinitrc for WM I'm going to use .
If I'm going to use Gnome. I run ~/2gnome.
If I'm going to use CDE, I run ~/2cde.
(Most often I work in CDE, so this is one-time action)

~/2gnome:
Code:
cp ~/.xinitrc_GNOME ~/.xinitrc
You can use xinit instead of startx, and the .xinitrc can be changed with the environment var XINITRC.

I never understood for what is startx there.
 
  • Thanks
Reactions: _al
You can use xinit instead of startx, and the .xinitrc can be changed with the environment var XINITRC.

I never understood for what is startx there.

I Think there is startx for passing parameters to X
look in /usr/local/bin/startx , in my file I put the extra parameters in
Code:
defaultserverargs
Code:
-dpms -xinerama -schedInterval 300
 

cy@

Developer
For those of you who have built cde-25 by hand, can you please open a terminal session and enter the following command, and report the output here?

xrdb -query | grep 'dtsession_res\*files'

I would like to compare your setting with what I see here. cde-24 sets it correctly. cde-25 does not. The script that sets this resource, dt/bin/dtsession_res, is virtually identical (except for whitespace changes), suggesting it is being called with different arguments.

I'm trying to establish whether it's the new uncommitted port that is at fault or if the base software is to blame.
 
For those of you who have built cde-25 by hand, can you please open a terminal session and enter the following command, and report the output here?

xrdb -query | grep 'dtsession_res\*files'
Code:
[lanin@freebsd ~]$ xrdb -query | grep 'dtsession_res\*files'
dtsession_res*files:    /usr/dt/config/C/sys.resources /home/lanin/.dt/sessions/current/dt.resources
 

cy@

Developer
Code:
[lanin@freebsd ~]$ xrdb -query | grep 'dtsession_res\*files'
dtsession_res*files:    /usr/dt/config/C/sys.resources /home/lanin/.dt/sessions/current/dt.resources
This is what it's supposed to look like. Could be one of the FreeBSD patches in the to-be-committed FreeBSD port.
 
This is what it's supposed to look like. Could be one of the FreeBSD patches in the to-be-committed FreeBSD port.
That is, on my machine (where CDE 2.5.0 is manually built) everything looks as it should ?
 

cy@

Developer
That is, on my machine (where CDE 2.5.0 is manually built) everything looks as it should ?
Yes, the cde-24 port produces the same output.

The problem might be related to locale. $LANG=C.UTF8 is not a proper locale. This is in the environment that dtsession_res is passed to it by programs/dtsession/SmRestore.c. The script looks for resource files with that name and finds none, leaving the dtsession*res resource lacking the proper resources.

echo $LANG prints out C in a terminal session but the script sees C.UTF8. What does echo $LANG display for you?

I don't think the C locale is unsupported since the code assumes C if no locale is defined, though I have a hunch that this may not have been tested because most people use a country specific locale.

Setting the resource based on the locale using xrdb to erase and replace this specific resource setting works around the issue.
 
  • Thanks
Reactions: _al
The problem might be related to locale.
I did nothing in CDE 2.5.0, but corrected /usr/dt/etc/cde/fontaliases/file.alias (assigned iso8859-5 aliases to iso8859-1 fonts)
and set
Code:
LANG=ru_RU.UTF-8
export LANG
in .dtprofile

The following was set by FreeBSD installer:

/etc/login.conf
Code:
...

default:\
        ...
       :charset=UTF-8:\
       :lang=C.UTF-8:

...

russian|Russian Users Accounts:\
        :charset=UTF-8:\
        :lang=ru_RU.UTF-8:\
        :tc=default:

As result:

Code:
[lanin@freebsd ~]$ locale
LANG=ru_RU.UTF-8
LC_CTYPE="ru_RU.UTF-8"
LC_COLLATE="ru_RU.UTF-8"
LC_TIME="ru_RU.UTF-8"
LC_NUMERIC="ru_RU.UTF-8"
LC_MONETARY="ru_RU.UTF-8"
LC_MESSAGES="ru_RU.UTF-8"
LC_ALL=

But in CDE 2.4.0 (which was installed by pkg install cde) I did the following:

1) created /usr/local/etc/dt/config/ru_RU.UTF-8/ and put my fonts.list in it.
That file contains path to fonts
Code:
/usr/local/share/fonts/dejavu:
, which I use as aliases to '-dt-*' fonts.

2) created /usr/local/etc/dt/config/xfonts/ru_RU.UTF-8/ and put my fonts.alias in it.

I know that iso8859 character set can not display all characters of UTF-8, but iso10646-1 can.
None of iso10646-1 fonts work in CDE 2.4.0 and 2.5.0 with ru_RU.UTF-8 locale, so I used iso8859-5 instead.

I suspect that what I have done here is absolutely incorrect. But I didn't find another solution.

What does echo $LANG display for you?

Code:
[lanin@freebsd ~]$ echo $LANG
ru_RU.UTF-8

I attach simple perl script which I use to correct fonts.alias in CDE 2.5.0.
And attach two my fonts.alias files
 

Attachments

  • CDE_24_fonts.alias.zip
    1.9 KB · Views: 21
  • CDE_25_fonts.alias.zip
    18.2 KB · Views: 21
  • mk_alias.pl.zip
    942 bytes · Views: 23
The problem might be related to locale. $LANG=C.UTF8 is not a proper locale. This is in the environment that dtsession_res is passed to it by programs/dtsession/SmRestore.c. The script looks for resource files with that name and finds none, leaving the dtsession*res resource lacking the proper resources.
If I don't create /usr/dt/config/$LANG/sys.resources, then control is passed to L:92 (/usr/dt/bin/dtsession_res) that set 'C' locale as default. But that's the way it should be.
And yes, $LANG in my case is 'ru_RU.UTF-8', and I have no /usr/dt/config/$LANG/ (I don't create it)...

Edit: All I would like is that the names of files (and their content) that contain Russian letters from the 'ru_RU.UTF-8' would be displayed correctly - in this encoding. Correctly displayed Russian letters are needed not only during input/output to the terminal, but also in the File Manager (where other '-dt' fonts are (or may be) used). And I don’t need localization as such (let the entire system interface be in English). Now I got it. Perhaps this is the wrong approach. What is the correct solution?

Setting the resource based on the locale using xrdb to erase and replace this specific resource setting works around the issue.
Do I understand correctly ? Should I create /usr/dt/config/ru_RU.UTF-8/ and configure everything manually there ?
 

cy@

Developer
Do I understand correctly ? Should I create /usr/dt/config/ru_RU.UTF-8/ and configure everything manually there ?
Yes.

I discovered my problem as well. Running xfontsel(1), I discovered that CDE includes the font registry gb2312.1980 causing some apps to display nothing. The workaround, for me , is to append some font overrides to iso8859. I already hacked my .dt/sessions/home/dt.resources with a #include -- because I never did like, even 25 years ago when I used CDE on DEC Alpha and Sun Sparc, the fact that CDE forced the colours for all apps to some default (granted we only had 16-bit colour maps then but we have many more now).

To show you what I've been using with CDE to "fix" colours, I added this to the bottom of my ~/.dt/sessions/home/dt.resources file:

#include "/home/cy/.Xresources"

These are resources I've hacked over the last couple of decades to give my Motif and non-Motif apps the look I want, like the following xpostit(1) resource:

XPostit.Plaid.translations: #override\n\
Ctrl<Btn1Down>,<Leave>: tearoff(2x3)\n\
Shift<Btn1Down>,<Leave>: tearoff(3x3)\n\
Meta<Btn1Down>,<Leave>: tearoff(3x4)\n\
Ctrl<Btn1Down>,<Btn1Up>: hide()\n\
Ctrl<Btn2Down>,<Btn2Up>: show()\n\
<Btn1Down>,<Btn1Up>: raise()\n\
<Btn2Down>,<Btn2Up>: lower()\n\
<Btn1Down>,<Leave>: tearoff(1.5x2)

I've now added,

#include "/home/cy/.Xresources.cde-fonts"

... because I don't want to load those resources when using another environment like mwm, fvwm or anything else.

I'm satisfied enough to commit cde-25. Though I still think I should rename cde to cde-24 and use a meta port to select the default. And allow the user the option to install both concurrently by defining something like (CDE_CONCURRENT) in /etc/make.conf. Part of this is that I've had a cde-devel port in the works and it that breaks terribly one can easily switch desktops.
 
For those of you who have built cde-25 by hand, can you please open a terminal session and enter the following command, and report the output here?

xrdb -query | grep 'dtsession_res\*files'

I would like to compare your setting with what I see here. cde-24 sets it correctly. cde-25 does not. The script that sets this resource, dt/bin/dtsession_res, is virtually identical (except for whitespace changes), suggesting it is being called with different arguments.

I'm trying to establish whether it's the new uncommitted port that is at fault or if the base software is to blame.
user@freebsd:~ % xrdb -query | grep 'dtsession_res\*files'
dtsession_res*files: /home/user/.dt/sessions/current/dt.resources
user@freebsd:~ %
 

cy@

Developer
user@freebsd:~ % xrdb -query | grep 'dtsession_res\*files'
dtsession_res*files: /home/user/.dt/sessions/current/dt.resources
user@freebsd:~ %
This is wrong.

Do you have any font issues?

To fix this I have modified my dtsession_res, adding the following after rCustom=... (Sorry I don't have a real patch. I updated the file in /usr/local. It will make it into the tree.)

Add the following after rCustom=

Code:
if [ ! -f "$rFactory" ]; then
        rFactory=/usr/local/dt/config/C/sys.resources
fi
if [ ! -f "$rCustom" ]; then
        rCustom=/usr/local/dt/etc/config/C/sys.resources
fi

This assumes you installed your hand-built CDE into /usr/local/dt. Adjust the pathnames accordingly if you put it in /usr/dt.
 

cy@

Developer
x11/cde-25 is now in ports, as is x11/cde-devel (tracking the master development branch). x11/cde is now x11/cde-24, with x11/cde as a meta port that currently points to x11/cde-24 (meaning it's the same as before, for now). If you build the ports by hand or use your own poudriere to build ports, put CDE_CONCURRENT=yes into make.conf or poudriere.d/make.conf and the ports will install to unique ${LOCALBASE}/dt${ID} directories allowing people to kick the tires (so to speak) before committing to a version and "ruining your day."

I intend to use the cde-devel port on-and-off, using either the cde-24 (and later cde-25) as my goto should the -devel port become seriously messed up by the upstream -- it's rare but this can on occasion happen with -devel.

If you have issues with any, including the -devel port, please open a PR or send me an email. If using the -devel port you can also always send email to the cdesktopenv-devel mailing list. Keep me in the loop if you opt to do that.

Fill your boots and enjoy.
 
Top