Custom build script in COPR is a versatile. With a couple sed commands, you can modify Fedora SPEC files and port it to RHEL/CentOS Stream with a little effort. However, when I was porting the keepassxc-2.7.X a few days ago, COPR keeps complaining xcb.patch is missing. While I myself does not need the patch for […]
Show full content
Custom build script in COPR is a versatile. With a couple sed commands, you can modify Fedora SPEC files and port it to RHEL/CentOS Stream with a little effort.
However, when I was porting the keepassxc-2.7.X a few days ago, COPR keeps complaining xcb.patch is missing. While I myself does not need the patch for Wayland, I am curious why other packages are fine but not this one.
Eventually, it is because Patch0: xcb.patch was in conditional, like:
%if 0%{?el8} Patch0: xcb.patch %endif
The SRPM maker did not run under el8, thus Patch0 is not in SRPM.
Since my repo contains just EL8 and EL9 packages, I can simply make the conditional always say yes. So I put down following like in the script:
sed -i -e '/^%if 0%{[?]el8}/ s/0%{[?]el8}/1/' $PKG.spec
-While investigating the sources of RHEL and Fedora packages, firstly I switch to corresponding branch, then do either rhpkg prep or fedpkg prep to extract source. Recently, I am interested in CentOS Stream 9, and wish to investigate the source. However, I am too lazy to find the fedpkg or rhpkg equivalent for CentOS Stream, […]
Show full content
-While investigating the sources of RHEL and Fedora packages, firstly I switch to corresponding branch, then do either rhpkg prep or fedpkg prep to extract source.
Recently, I am interested in CentOS Stream 9, and wish to investigate the source. However, I am too lazy to find the fedpkg or rhpkg equivalent for CentOS Stream, and found the following command useful:
Barrier uses CMake to build. It called ar and ranlib during the build, however, wrong plugins was invoked and caused the above error.
While the above error can be avoided by adding option --plugin , however, CMake does not have an easy way to do that. Fortunately, gcc provides gcc-ar and gcc-ranlib wrappers that point to the correct plugins. So I inserted the commands that point to gcc-ar and gcc-ranlib in the section %prep with:
sed -i.use-gcc-ar -e '/include (CheckIncludeFiles)/ i set(CMAKE_AR "/usr/bin/gcc-ar")' CMakeLists.txt sed -i.use-gcc-ranlib -e '/include (CheckIncludeFiles)/ i set(CMAKE_RANLIB "/usr/bin/gcc-ranlib")' CMakeLists.txt
I have scripts that will utilise the SFDC case number, but why type it manually when the computer can do it? Firstly, you need to have xdotool installed, for RHEL or CentOS Stream, it is in EPEL. I have tried xprop and xwininfo, but they do not accept search with WM_Class Secondly, get the WM_Class […]
Show full content
I have scripts that will utilise the SFDC case number, but why type it manually when the computer can do it?
Firstly, you need to have xdotool installed, for RHEL or CentOS Stream, it is in EPEL. I have tried xprop and xwininfo, but they do not accept search with WM_Class
Secondly, get the WM_Class of the X program, usually it is just the program name. If you are unsure, open that X program, then run xprog and click at the X program, then search WM_CLASS amongst the output.
Thirdly, for X program that has multiple tabs, make sure you activate the tab you want.
Now, to get the active title of firefox:
for i in $(xdotool search --onlyvisible --class firefox); do xdotool getwindowname $i; done
Two titles will be shown like:
Firefox The actual title
For me, I am only interest in the number which are in the beginning of the title, so my command is:
for i in $(xdotool search --onlyvisible --class firefox); do xdotool getwindowname $i; done | sed -rne '/^[0-9]+/ s/^([0-9]+).*$/\1/p'
I have packaged barrier and synergy a while ago. A user stated that he cannot install it because it misses dependency: avahi-compat-libdns_sd For RHEL 8, it is in channel codeready-builder-for-rhel-8-x86_64-rpms To enable it, runssubscription-manager repos --enable codeready-builder-for-rhel-8-x86_64-rpms For CentOS Stream 8, it is in repository powertools To enable it, runssudo yum-config-manager --enablerepo powertools
Show full content
I have packaged barrier and synergy a while ago. A user stated that he cannot install it because it misses dependency: avahi-compat-libdns_sd
For RHEL 8, it is in channel codeready-builder-for-rhel-8-x86_64-rpms
To enable it, runs subscription-manager repos --enable codeready-builder-for-rhel-8-x86_64-rpms
For CentOS Stream 8, it is in repository powertools
To enable it, runs sudo yum-config-manager --enablerepo powertools
Fedora 33 Gnome seems to recognize it out of the box, and the gnome-control-center Wacom interface show it properly. With RHEL 8, it also works as a mouse, but for Gnome to see it, I needed to install the following:
yum -y install libwacom
I mainly use KDE, so I also install
yum -y install kcm_wacomtablet
Gnome did not have the UI to bind the tablet button to mouse button like Mouse button 4 (Scroll Up), nor does it handle key combo binding properly. For example, Ctrl-Win-Left is recognized as Primary-Super-Hyper-Left; KDE, however, does support Mouse button 4~7 so I bind inner left tablet button as button 5 and inner right tablet button as button 4.
I use barrier, a keyboard/mouse sharing utility intensively. So I would also like to see how barrier handles Wacom. Unfortunately, with absolute position mode (the default), the pointer insisted it needed to be in the left edge of the client, I need to use barrier switchInDirection keyboard short keyboard to get away.
I also tried related position mode which make the tablet work more like a giant touchpad. It kinda of work, as the pointer in client act normally. However, that mode is very unpleasant to use, as I need to fully away the distant between stylus and tablet. Basically:
State 1: Stylus touch tablet: Mouse Left button click State 2: Stylus hover tablet: Mouse move State 3: Stylus leave tablet: Mouse No action
Switching between State 2 and State 3 is required for related position to work, that is unpleasant.
I tried USB on server, and BT on client as well, but Intuos only support single connection, that is, you have to disconnect USB to use BT, so no single-button-toggle target computers.
Verdict: I would not a recommended Wacom over Barrier/Synergy setup, unless You are OK with relative position mode.
windowsPowerShellWindows server 2016Windows Server Core
I have a Windows Server 2016 in Core mode, i.e. most of the GUI programs are not available. Steps: 1. Set the SecurityProtocol. It is required for https: 2. The actual command, iwr, is an alias of Invoke-WebRequest : References: https://superuser.com/a/755581/328810 https://stackoverflow.com/a/48030563/350580
Show full content
I have a Windows Server 2016 in Core mode, i.e. most of the GUI programs are not available.
Steps:
1. Set the SecurityProtocol. It is required for https:
*nixwindowsactive directoryactive directory domain controlerNTPWindows server 2016
This is aimed to be complete steps for configuring the time service (NTP) for Windows Sever 2016. This is especially useful should you want to setup your own Active Directory Domain Controller (ADDC). 0. Networking Check Ensure you can reach the NTP server. Assuming you are using 0.pool.ntp.org : 1. Set the Time Zone By […]
Show full content
This is aimed to be complete steps for configuring the time service (NTP) for Windows Sever 2016. This is especially useful should you want to setup your own Active Directory Domain Controller (ADDC).
0. Networking Check
Ensure you can reach the NTP server. Assuming you are using 0.pool.ntp.org :
ping 0.pool.ntp.org
1. Set the Time Zone
By default, windows just assume a time zone and show you the system clock. However, the default time zone is not necessary correct.
1.1. Check the Current Timezone
tzutil /g
1.2 (Optional) Query Available Time Zone
tzutil /l
1.3 (Optional) Set Time Zone
tzutil /s "E. Australia Standard Time"
2. Set the w32time service
2.1 Configure NTP Service
This article assumes you have commit right to the package, but you don’t have the epel8 branch in https://src.fedoraproject.org/rpms/YourPackage PKG=<YourPackage> fedpkg clone $PKG # if you have not done this cd $PKG # if you have not done this git branch epel8 # Make the branch work with epel8 git commit git push –set-upstream origin […]