Installing Nody Greeter on Fedora Linux 40
Author: Rohan Barar
Date: 29/03/2024
I prefer to use podman containers to build and compile software to prevent cluttering the main system with superfluous packages.
-
Install
podman.sudo dnf install podman
-
Retrieve the latest image of Fedora Linux.
podman pull fedora:latest
-
Create a new container based on the Fedora Linux image. This command will initiate the container and directly place you at the command line.
podman run -it --name fedora --hostname fedora --network host fedora:latest /bin/bash
-
Compilation of
Nody Greeterrequires version 18 (LTS) ofnode.js. This necessitates the installation of a version management system, such asnvm. The installation command provided below was taken from the project's GitHub page. Please refer directly to the project page for up-to-date installation instructions.curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash source ~/.bash_profile nvm install 18 nvm use 18
-
Compilation of
Nody Greeterrequires an older version ofpythonsincedistutilswas removed inpythonversion 3.12. Installcondaand create an environment based onpythonversion 3.11.9.-
Install
conda.sudo dnf install conda
-
Create an environment using
pythonversion 3.11.9.conda create -n "pyNody" python=3.11.9 -
Restart the
podmancontainer.-
Exit the container.
exit -
Start the container.
podman start -ia fedora cd ~
-
-
Activate the
pythonenvironment.conda activate pyNody
-
-
Install other dependencies.
sudo dnf install git patch lightdm lightdm-gobject lightdm-gobject-devel gobject-introspection-devel cairo-devel gcc gcc-c++ glibc-devel libxcb-devel libX11-devel make nano
-
Clone the repository.
git clone --recursive https://github.com/JezerM/nody-greeter.git cd nody-greeter -
Compile the software.
npm install npm run rebuild npm run build
-
Install tools required for creating RPM packages.
sudo dnf install rpmdevtools rpmlint
-
Create a directory structure suitable for RPM package development. This will create a folder named
rpmbuild.cd ~ rpmdev-setuptree
-
Generate a
.tar.gzarchive comprising the compiled binaries and transfer it into~/rpmbuild/SOURCES.cp -r ~/nody-greeter/build/unpacked ~/nody-greeter-1.6.2 tar --create --file nody-greeter-1.6.2.tar.gz nody-greeter-1.6.2 mv nody-greeter-1.6.2.tar.gz ~/rpmbuild/SOURCES
-
Create a new file at
~/rpmbuild/SPECS/nody-greeter.speccontaining the following. Note:nano ~/rpmbuild/SPECS/nody-greeter.speccan be used to achieve this.%define name nody-greeter %define version 1.6.2 %define release 1 %define arch x86_64 Name: %{name} Version: %{version} Release: %{release} BuildArch: %{arch} License: GPL-3.0 Source: %{name}-%{version}.tar.gz Summary: A LightDM Greeter %description A LightDM greeter made with Electron.js and NodeGTK %prep # Unpack the source archive into the build directory %setup -q %install # Clean build directory rm -rf $RPM_BUILD_ROOT # Create build directory mkdir -p $RPM_BUILD_ROOT # Copy all folders from extracted archive into $RPM_BUILD_ROOT cp -r * $RPM_BUILD_ROOT/ %post # Create symbolic link ln -sf /opt/nody-greeter/nody-greeter /usr/bin/nody-greeter # Set executable permission chmod +x /opt/nody-greeter/nody-greeter # Update application shortcuts and menu entries update-desktop-database /usr/share/applications || true %preun # Remove symbolic link rm -f /usr/bin/nody-greeter %postun # Update application shortcuts and menu entries update-desktop-database /usr/share/applications || true %files # Set default file attributes %defattr(-,root,root) # Include all files and directories under 'etc', 'opt' and 'usr' /etc/* /opt/* /usr/* %changelog * Fri Aug 02 2024 JezerM <amyuki4@gmail.com> 1.6.2-1 - Initial RPM creation for version 1.6.2 -
Build the RPM package. It will be placed at
~/rpmbuild/RPMS/x86_64/nody-greeter-1.6.2-1.x86_64.rpm.rpmbuild -bb ~/rpmbuild/SPECS/nody-greeter.spec -
Exit the
podmancontainer.exit -
Copy the RPM file out of the
podmancontainer.cd ~ podman ps -a # Identify Container ID (e.g. 4330d4f27107) podman cp 4330d4f27107:/root/rpmbuild/RPMS/x86_64/nody-greeter-1.6.2-1.x86_64.rpm ~/
-
Install
Nody Greeter.sudo dnf install nody-greeter-1.6.2-1.x86_64.rpm
-
Inside
/etc/lightdm/lightdm.confbelow a 'Seat' configuration, add:greeter-session=nody-greeter -
Test
Nody Greeterusingnody-greeterornody-greeter --debug.
-
[OPTIONAL] You can delete the
podmancontainer. For example:podman rm 4330d4f27107
-
[OPTIONAL] You can delete the
fedoraimage. For example:podman images --all # Identify Image ID (e.g. dbd38aa67e87) podman rmi dbd38aa67e87