Fedora-OSTree-Setup-dev / Fedora-OSTree-Setup

Glorified scipt that automates the setup of Fedora Silverblue/Kinoite based on given config file.
GNU General Public License v3.0
7 stars 3 forks source link

Gnome: install Kate, both: uninstall default Editor [Optional] #50

Open boredsquirrel opened 1 year ago

boredsquirrel commented 1 year ago

Kate is an awesome KDE text editor. Features:

the Flatpak has missing features, document preview doesnt work and obviously things like writing system files too.

I tested it, Kate can fully replace the preinstalled Kwrite on KDE. I have no idea how styling is on GNOME, I guess horrible, so this may need some extra steps.

Also when installing it, it needs a small appstarter, because it doesnt create its own.

printf """[Desktop Entry]
Exec=kate
GenericName=Editor
Icon=kate
Name=Kate
Type=Application""" > ~/.local/share/applications/kate.desktop

Either we set an indicator value for GNOME vs. KDE, this could be extended for more Desktops / WMs with further OSTree distros. Then depending on this flag, we could decide what to remove. The unelegant solution, that I would prefer is:

rpm-ostree override remove kwrite --install kate;rpm-ostree override remove gedit --install kate

rpm-ostree will abort if the override package is not installed, in that case the next command will be executed anyways.

we could use this technique for all other packages too, if there is a GNOME package to remove and a KDE package to remove. Instead of differentiating between desktops and having dependend command trees, just print all, and the command for the wrong Distro will just abort.

iaacornus commented 1 year ago

Also when installing it, it needs a small appstarter, because it doesnt create its own.

even when installing with rpm-ostree?

boredsquirrel commented 1 year ago

I dont know, seems I have uninstalled Kate before, or it was not included? There was no appstarter but on a fresh install Kate is already preinstalled.

boredsquirrel commented 1 year ago

QUESTION: Does Kate work for everything on GNOME? Like opening system text files and saving with sudo?

iaacornus commented 1 year ago

QUESTION: Does Kate work for everything on GNOME? Like opening system text files and saving with sudo?

it can open, although not sure if it can save without executing it as sudo. although probably that it should be able to handle the permissions using pam

boredsquirrel commented 1 year ago

kate uses polkit, which should be exactly the same on fedora. But have to try it first.