RHEL adds a few complexities on top of the “plain” Debian-based Linux distros.
SELinux in particular is another layer to consider.
Here are common considerations for settings up SSH and/or VNC on RHEL, CentOS or similar RHEL-derived Linux distro.
For SSH connection problems, consider adding to /etc/ssh/sshd_config:
LogLevel DEBUG
then:
systemctl restart sshd.service
then:
journalctl -f
and try to login. This will print a good amount of information streaming and helps reveal .ssh/authorized_keys permissions issues and more.
To determine if SELinux is causing an issue, as a last resort one may temporarily and carefully edit /etc/selinux/config to have
SELINUX=permissive
and reboot.
Be sure to put that back to enforcing and reboot when done.
In general current VNC servers are not compatible with the Wayland desktop (that replaces X11).
Waypipe is a new remote desktop tool that works with Wayland.
However, Waypipe requires another Linux machine with Wayland, so it doesn’t work with Windows or macOS natively.
If permissible for your system, you may wish to switch the desktop to X11 instead of Wayland so that traditional VNC servers work.
Then reboot.
Ensure you can locally logon to the X11 desktop as usual.
Install TigerVNC server:
dnf install tigervnc-server
Ensure username is specified with a display number in file: “/etc/tigervnc/vncserver.users”.
You do not need or want a file ~/.vnc/xstartup or ~/.vnc/config.
Logoff the local server, otherwise when you try to view VNC, it will just show a black screen.
If you are logged on remotely and try to login locally, the local login gets a black screen.
If this happens, you can logout the unwanted black-screen sessions by:
Linux package managers like Apt and DNF can be set to not install
recommended packages
by default, which can be useful for headless embedded systems or WSL.
This can save 100s of MB or more, which can be important for embedded systems or WSL to save time and disk space.
Saving of download/install time is often relevant to CI/CD systems.
A caveat is that some expected features may be missing.
Git submodules don’t put their individual Git config file under .git/config.
This Git command issued from the Git submodule directory tells the file path to the Git submodule config file:
git rev-parse --git-path config
Say a repository “alpha” has submodule “beta”.
Find the Git config file location of “beta” from “alpha” like:
NEXRAD preview PNGs are 12200 x 5400 pixels:
example
This takes over 650 MB of RAM to load each frame.
ImageMagick
-limit
option can be used to limit the amount of RAM and/or disk used by ImageMagick operations.
For example, if processing images on an embedded systems like a Raspberry Pi, the limited RAM may lead to disk swapping, taking 1000x longer or failing anyway.
Use combinations of -limit options to control RAM and disk usage.
By design, CTest
WILL_FAIL
test property
does not handle
segmentation faults and other unexpected terminations.
That is, a failing test will also show as failed in CTest, when the desire may have been to show an intended failure as success via WILL_FAIL.
A simple workaround for this is to make a wrapper call for the intentionally segfaulting executable and catch that result, as in
example project.
Git
submodules
can switch remotes.
This is useful when making a pull request for a project that relies on another pull request submodule.
Verify the change in the top project’s “.gitmodules” file.
Example: suppose the directory “subdir” is a Git submodule.
In this command, do not put “./subdir” or “subdir/”, just “subdir” by itself.
Suppose you also wish to change the branch to “feat1” in the submodule.
Whether using Clang / LLVM or Homebrew GNU GCC compiler, GNU ld is not supported on macOS.
Only the Apple macOS
Xcode ld is supported.
The
ld linker
in Xcode 15 breaks numerous projects, including OpenMPI < 4.1.6.
The workaround is to use the classic linker, which is still supported in Xcode 15.
Set in ~/.zshrc
exportLDFLAGS="$LDFLAGS -Wl,-ld_classic"
or specify on the program command line like:
LDFLAGS="$LDFLAGS -Wl,-ld_classic" make
Note that for CMake, LDFLAGS environment variable is read only on the first CMake configure and cached.