> For the complete documentation index, see [llms.txt](https://book.bsdcn.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://book.bsdcn.org/ask/flat/chapter-10-desktop-environments/di-10.9-jie-cde-ni-shan-chu.md).

# 10.9 CDE (To Be Removed)

## CDE Desktop Environment Overview

CDE (Common Desktop Environment) was the standard desktop environment for commercial UNIX systems in the 1990s, widely used in commercial distributions such as Solaris, HP-UX, and AIX.

## Installing the CDE Desktop Environment

* Install using pkg:

```sh
# pkg install xorg cde wqy-fonts xdg-user-dirs
```

* Or install using Ports:

```sh
# cd /usr/ports/x11/xorg/ && make install clean
# cd /usr/ports/x11/cde/ && make install clean
# cd /usr/ports/x11-fonts/wqy/ && make install clean
# cd /usr/ports/devel/xdg-user-dirs/ && make install clean
```

### Package Description

| Package         | Description                                                   |
| --------------- | ------------------------------------------------------------- |
| `xorg`          | X Window System                                               |
| `cde`           | Provides the traditional CDE desktop environment              |
| `wqy-fonts`     | WenQuanYi Chinese Fonts                                       |
| `xdg-user-dirs` | Manages user directories such as "Desktop", "Downloads", etc. |

* View post-installation information

```sh
# pkg info -D cde
```

## Configuring Services and Files

* Configure services

```sh
# service rpcbind enable  # Set RPC bind service to start on boot
# service dtcms enable  # Set DTCMS service to start on boot
# service inetd enable  # Set inetd daemon to start on boot
# service dtlogin enable  # Set DTLogin display manager to start on boot
```

* Configure the X server to allow any user to start:

```sh
# echo "allowed_users=anybody" > /usr/local/etc/X11/Xwrapper.config
```

* Create a symbolic link to Xsession for the current user, used to start the desktop session:

```sh
$ ln -s /usr/local/dt/bin/Xsession ~/.xinitrc
```

* Configure the dtspcd service to start via TCP, add the following content to the **/etc/inetd.conf** file:

```ini
dtspc	stream	tcp	nowait	root	 /usr/local/dt/bin/dtspcd	/usr/local/dt/bin/dtspcd
```

* Specify TCP port 6112 for the dtspc service, add the following content to the **/etc/services** file:

```ini
dtspc		6112/tcp
```

### Chinese Configuration

Edit the **/etc/login.conf** file: find the `default:\` section and change `:lang=C.UTF-8` to `:lang=zh_CN.UTF-8`.

Rebuild the capability database based on the **/etc/login.conf** file for the configuration to take effect:

```sh
# cap_mkdb /etc/login.conf
```

## Desktop Gallery

![dtlogin](/files/zeNJer2MQtP4bYemql3t)

![FreeBSD Install CDE](/files/0Qo7MwhMNOUYAh091KNA)

It pauses at this stage for several minutes each time it starts.

![FreeBSD Install CDE](/files/46t6fUol5Rrr7EOa2T6v)

![Terminal](/files/x7KXfE07fVHJimTWJ4OT)

## Troubleshooting and Outstanding Issues

### Unable to Set Chinese Environment

The overall CDE interface cannot be switched to Chinese; only the calendar component can display Chinese.

According to the source code at <https://sourceforge.net/p/cdesktopenv/code/ci/master/tree/cde/imports/motif/localized/>, CDE does not have Simplified Chinese support. However, according to the [Simplified Chinese Solaris User Guide](https://docs.oracle.com/cd/E19683-01/816-0668/6m7500nqp/index.html), the Solaris version does include Simplified Chinese support. This localization support may have been lost during the open-sourcing process, or the Solaris version may be an unmerged branch. This has been reported at [Missing Simplified Chinese locale support under cde/imports/motif/localized](https://sourceforge.net/p/cdesktopenv/discussion/general/thread/c51abcd846/).

## References

* FreshPorts. cde Common Desktop Environment\[EB/OL]. \[2026-03-25]. <https://www.freshports.org/x11/cde>. CDE desktop environment Port details and installation guide provided by FreshPorts.
* FreeBSD Project. Setting up Common Desktop Environment for modern use\[EB/OL]. \[2026-03-25]. <https://forums.freebsd.org/threads/setting-up-common-desktop-environment-for-modern-use.69475/>. For detailed configuration, refer to the relevant FreeBSD forum discussion.
* CDE Project. CDE - Common Desktop Environment Wiki\[EB/OL]. \[2026-03-25]. <https://sourceforge.net/p/cdesktopenv/wiki/FreeBSDBuild/>. FreeBSD platform build and configuration guide provided by the official CDE project Wiki.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://book.bsdcn.org/ask/flat/chapter-10-desktop-environments/di-10.9-jie-cde-ni-shan-chu.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
