Libreoffice is not using my gtk theme

LibreOffice was not using my gtk theme (on my devuan netinst, fluxbox, with xfce4-settings-manager, chtheme, and manually written .config/gtk-3.0/settings.ini).

basic interface for libreoffice writer
No theming for Writer

Turns out you simply need to install an additional package:

sudo apt-get install libreoffice-gtk3
libreoffice writer with gtk3 theming
Writer with gtk3 theme applied

Devuan also has a libreoffice-gtk2 package, which I didn’t try.
I haven’t tried a Fedora minimal/net install with Fluxbox and LibreOffice, so I don’t know if the libreoffice-gtk3 rpm is necessary there, but it’s in the repos.

sudo dnf install libreoffice-gtk3

I was impressed by this behavior. Just install an extra .so file, and boom, LibreOffice integrates with your desktop theme. LibreOffice is some great stuff!

References

Ripped off from How to change themes [closed] – Ask LibreOffice

Advertisements

Roll back aborted dnf update, 2019 edition

I had to fix an aborted dnf update. My previous post on this topic

sudo dnf remove $( sudo dnf list installed --showduplicates $( sudo dnf list installed --showduplicates | sort | uniq -w35 -D | awk '/^[a-zA-Z]/{print $1}' | sort | uniq | grep -vE 'kernel|saned' ) | awk '$0 !~ /Packages/{split($1,b,".");if($2 > a[b[1]]){a[b[1]]=$2"."b[2]}} END {for (key in a) {print key"-"a[key]} }' )

Walkthrough of the commands

sudo dnf list installed --showduplicates | sort | uniq -w35 -D | awk '/^[a-zA-Z]/{print $1}' | sort | uniq | grep -vE 'kernel|saned'

Show all installed packages, and then show only the duplicates (up to the first 35 characters; having to take a guess here), and remove any saned and kernel packages. I don’t know why I had to exclude saned: Perhaps I wanted both x86_64 and i386 packages for saned.

sudo dnf list installed --showduplicates $ABOVEVALUES | awk '$0 !~ /Packages/{split($1,b,".");if($2 > a[b[1]]){a[b[1]]=$2"."b[2]}} END {for (key in a) {print key"-"a[key]} }'

So, list the output from the previous statement including duplicates, and then use awk to find the highest version number of each named package and store it to a buffer. Then display that whole buffer at the end. So this now shows only the exact name and version (NEVRA, partially) of what to remove.
So this whole process is here to roll back the partially-updated changes.

sudo dnf remove $ABOVEVALUES

And now remove those packages. This should reset, so that we can then perform a regular upgrade at some later point.

references

  1. awk array in END https://unix.stackexchange.com/questions/183279/how-to-view-all-the-content-in-an-awk-array/183280#183280
  2. Prior use of associative arrays in awk https://bgstack15.wordpress.com/2017/04/11/remove-only-certain-duplicate-lines-with-awk/
  3. prior use of dnf –showduplicates but that didn’t work this time https://bgstack15.wordpress.com/2018/04/03/fedora-remove-duplicate-packages-from-partially-completed-dnf-update/
  4. discussion on NEVRA https://slashterix.wordpress.com/2016/08/06/rpm-version-comparison/

Notes for Powershell credentials

Here are some dirty ways to store user credentials in powershell.

Get-Credential | Export-Clixml C:\path\to\output\file.xml

The same user, on the same machine, that generates that file can retrieve the contents with

$credential = Import-Clixml C:\path\to\output\file.xml

References

https://blogs.technet.microsoft.com/robcost/2008/05/01/powershell-tip-storing-and-using-password-credentials/
https://bgstack15.wordpress.com/2019/04/15/install-powershell-and-powercli-on-centos-7-linux/

Assigning permissions for Linux service account to add machines to AD

Create service account.

On the domain where the machines will be joined:
Open Active Directory Users and Computers. Enable Advanced Features on the “View” menu.

View the properties of the entire domain.

Select the Security tab, and select Advanced.

  • For this object and all descendant objects: Grant Create/Delete Computer objects
  • For descendant computer objects: Grant Reset password
  • For descendant computer objects: Read/write account restrictions
  • For descendant computer objects: Write all properties, Write all validated writes

Nfs export works but showmount -e does not

Symptom

An nfs client runs this command with no output.

showmount -e 10.10.15.55

But the mount itself actually works. What gives?

Resolution

You have to make sure all the ports are open on the server.

firewall-cmd --permanent --add-service=rpc-bind
firewall-cmd --permanent --add-service=mountd
firewall-cmd --permanent --add-port=2049/tcp
firewall-cmd --permanent --add-port=2049/udp
firewall-cmd --reload

That’s ports 111, 2049, and 20048 on both tcp and udp.

Ripped off from RPC: Port mapper failure – Unable to receive: errno 113 (No route to host) [unix.stackexchange.com]

Notes for Yum repositories for CentOS and Fedora

This is my scratch page for third-party centos and fedora repositories that are useful. I’ve used these at least once in my personal experience. There’s obviously a lot more, and they’re only an internet search away.

EPEL
SCL
city-fan
remi
rpmfusion
negativo17
ius
nuxref

Lists of additional ones:
https://rpmfusion.org/FedoraThirdPartyRepos

Sites for “rpm find”:
https://www.rpmfind.net/
http://rpm.pbone.net/

Thoughts about yum repo server and defined repositories

The internal server used as a yum repository runs EL6, and it servers EL6 and EL7 (read: CentOS) yum repos. An admin tried installing mkisofs, which wanted to come by default from the c7-base repository. It also wanted to upgrade bash and glibc. Well, installing a post-usrmerge bash (CentOS 7+) on CentOS6 caused all sorts of havoc. I had to load a rescue iso, boot, and copy /usr/bin/bash and /usr/bin/sh to the correct locations. Then my system would actually boot again.

I was getting an interesting error:

init: Failed to spawn rcS pre-start process: unable to execute: No such file or directory
init: Failed to spawn rcS post-stop process: unable to execute: No such file or directory

Also, kernel options rghb and quiet are really annoying and I always disable them.

So, the moral of the story is: always be very careful running yum on a yum repo server. Double-check what repos your package will pull in.

List yum repos that have packages installed and are still defined

yum repolist all $( yum list installed | awk '$NF ~ /@/ && $NF !~ /anaconda/ {split($NF,a,"@");print a[2];}' | sort | uniq ) | awk 'NR > 2 && $1 !~ /repolist/ {split($1,a,"/");print a[1]}'

The idea is to list each installed package which also lists the repo it was installed from, and then organize those repos. Then list them and show the ones that are still defined in yum’s repository files.

Gedit then and now

This is a rant post, and not a how-to.

Gedit is a simple text editor for the GNOME stack. I remember reading somewhere about the old and new gedit interfaces. The GNOME team has this plan to reduce and hide functionality, and gedit shows some of the changes.
Gedit used to have a toolbar, and the regular titlebar and menus.
Gedit 2
But Gedit after GNOME has changed their thinking has hidden its functions.
Gedit 3
I don’t really use gedit, because my text editing is more console driven, or else I use scite.

Backtracking my activities for the references

Web search gedit then and now which led to
Slashdot comment #54946443 on article GNOME’s Text Editor gedit ‘No Longer Maintained’, Needs New Developers which quotes
Slashdot comment #48503821 on article Ask Slashdot: Non-Coders, Why Aren’t You Contributing To Open Source? which includes links to two images
Gedit_3.11.92.png [wikipedia.org]
Gedit2261.png [wikipedia.org]