This solution applies to CentOS 4, 5, and 6. By default, a VNC server listens for connections for a VNC client on TCP ports 5800+x, 5900+x, and 6000+x where x is the display which starts at zero. A VNC server on display 0 will listen on the following TCP ports 5800, 5900 and 6000; display …
Category: Linux
Disable clipboard copy-paste in VNC Sessions on Alma Linux, CentOS 8 & 9
Rent Linux Dedicated Server Affordable prices and 100% Uptime! Click Here Note that VNC connections are configured to perform copy+paste from clipboard by design and by default. if you are still using "vncserver" command to start the VNC Server than configure the VNC on the system in the recommended way for multi-user access, by adding …
VNC service is not working, status of the service shows a Selinux error
This solution applies to CentOS/AlmaLinux, Rocky Linux 7, 8, 9. Getting below error output while seeing the VNC service status of the command. systemd[1]: Starting Remote desktop service (VNC)... systemd[15253]: vncserver@:3.service: Failed to change SELinux context to system_u:system_r:vnc_session_t:s0: Operation not permitted [15253]: vncserver@:3.service: Failed at step SELINUX_CONTEXT spawning /usr/libexec/vncsession-start: Operation not permitted [1]: vncserver@:3.service: Control …
How to run the gcc preprocessor
In some cases it is required to have source code preprocessed by gcc without undergoing the full compilation process. e.g, this might be necessary when embedded SQL is included in C or C++ programs and the preprocesssed file will be passed on to another tool which will convert the SQL in native source code. To …
Configure rsync as a daemon
Typically, the rsync tool operates through the secure shell (SSH) protocol when synchronizing files between a client on a local system and a host situated remotely. Nevertheless, there is an alternative to execute it as a daemon if the user prefers not to utilize the ssh protocol. Due to the absence of encryption in the …
SELinux context is not preserved during rsync
The preservation of SELinux context is not maintained during a rsync operation due to the absence of the xattr feature on the target NFS file system. Running rsync with the options -X does not preserve SELinux context and observes apparent errors such as ** security.selinux failed: Operation not supported. Method 1 - Utilize the tar …
How to create a modified CentOS / AlmaLinux ISO with kickstart file or modified installation media?
These steps will only work for the x86_64 system. For other systems, the steps may be different. The mkksiso tool, which is part of the lorax package and comes with CentOS 8 and CentOS 9, lets you add a kickstart file to an ISO file. All systems can use it. Purchase Dedicated Servers Select, configure, …
Why are scripts under /etc/sysconfig/network-scripts directory are gone on AlmaLinux 8/AlmaLinux 9?
Some of the issues faced by system engineers are; Why are files in /etc/sysconfig/network-scripts ignored? Where are interface configs now? I changed a config in an ifcfg-file in directory /etc/sysconfig/network-scripts. Why does the system ignore these changes? A configuration file for each interface should be placed in either the /etc/NetworkManager/system-connections or the /etc/sysconfig/network-scripts directory for …
How to backup old files before override them in rsync?
How to back up the old files on the target server before rsync replaces them with new ones? Use --backup option in rsync. For instance, # rsync -a --backup --backup-dir="/version2" /var/log/ root@192.168.122.246:/var-log-bk/ This command will copy files from local /var/log to root@192.168.1.100:/var-log-bk/ if rsync overrides some files in 192.168.1.100:/var-log-bk/. It will back up those files …
How to avoid password prompt input with rsync?
You are given a password input prompt when transferring files to a different server with rsync. $ rsync -avz /data root@srv::files Password: There are two ways to use the RSYNC_PASSWORD environment variable and the --password-file option. Using the environment variable $ export RSYNC_PASSWORD=secret $ rsync -avz /data root@srv::files or $ RSYNC_PASSWORD=secret rsync -avz /data root@srv::files …
How to avc_cache_threshold persistently in CentOS?
The current runtime is set by the following command. # echo 8192 > /sys/fs/selinux/avc/cache_threshold If you want to keep this change, you can run the two commands below to add them to startup. # echo "echo 8192 > /sys/fs/selinux/avc/cache_thresshold" >> /etc/rc.d/rc.local # chmod +x /etc/rc.d/rc.local Purchase Dedicated Servers Select, configure, and buy! Click Here
Why CentOS ignore packets when the route for outbound traffic differs from the route of incoming traffic?
To resolve this issue, set the net.ipv4.conf.all.rp_filter kernel tunable parameter value to 2. sysctl -w net.ipv4.conf.all.rp_filter=2 To make this change persistent across reboots, add the tunable to the /etc/sysctl.conf file. Strict filtering means that when a packet comes into the system, the kernel looks up the source IP in its routing table to see if …
How to exclude more than one directory with rsync?
To exclude a directory with rsync, use -av and -e. # rsync -av -e --exclude='/path/' ip:/path/to/destination To exclude multiple directories with rsync, use -av and -e again. # rsync -av -e --exclude='/path/to/file' --exclude='/path2/*' ip:/path/to/destination Purchase Dedicated Servers Select, configure, and buy! Click Here
How to view the progress of an rsync job?
If you are running an rsync job that is backing up large amounts of data, you may want to make sure everything is proceeding normally by being able to view the progress of the rsync job. You need to add the progress option using either method. (--progress or -P) ~]# rsync -a --progress /tmp/ backup/ …
How to install an RPM package into a different directory?
A relocatable RPM package can change its installation path during the setup process. Not all RPM packages can be installed into a custom directory. Use the following command to see if a specific package can be relocated. # rpm -qpi <rpm package> | grep Relocations To check rpm packages, centos-lsb-1.3-3.1.EL3.i386.rpm and rsync-2.5.7-5.3E.i386.rpm: # rpm -qpi …