Category Archives: Tips and tricks

Adding more sources to PostX Gnu/Linux

All of the below should be done as root / sudo su . Caution is advised when operating as root or sudo su. Accidental and careless usage might be dangerous to system stability. Proceed with your own responsibility.

On a latest release of PostX Gnu/Linux contrib and non-free sources entries were accidentally left out. This will be fixed on later upcoming releases. For now you can add the following entries to sources list files:

deb http://deb.debian.org/debian bullseye contrib non-free
deb-src http://deb.debian.org/debian bullseye contrib non-free

deb http://deb.debian.org/debian bullseye-updates contrib non-free
deb-src http://deb.debian.org/debian bullseye-updates contrib non-free

deb http://security.debian.org/debian-security/ bullseye-security contrib non-free
deb-src http://security.debian.org/debian-security/ bullseye-security contrib non-free

Adding entries can be done manually by adding them into /etc/apt/sources.list. Alternatively, they can be added to file of your choosing under /etc/apt/sources.list.d directory structure.

For example you can make a file called patch.sh with the sources list content, as seen above, and make it executable with chmod +x patch.sh .

Finally, you can execute the patch.sh as follows: cat patch.sh > /etc/apt/sources.list.d/extra.list .

This will create a new file called extra.list under /etc/apt/sources.list.d folder. To apply changes to system, you still need to execute apt-get update. After this you are all done and new sources should be ready for usage.

From Debian 10 to Debian 11: The not so smooth upgrade experience

I recently upgraded one of my Linux boxes from Debian 10 to 11.

Did the usual: Looked at the release notes and changed sources.list entries and finalized with apt-get update && apt-get dist-upgrade.

After this, everything once done and I rebooted my computer for a good measure.

When the new system was up, all C++ based programs worked but python programs had issues.

I noticed that some packages had gone missing (or more likely) were removed during the upgrade to solve conflicts. Pyqt5 was not there and this needed to be fixed. Here is how the situation was remedied:

sudo apt-get update && sudo apt-get reinstall python3-qt5* && apt-get install python-minimal

Lastly, I noticed that the linkage from python3 to python was gone. I fixed that with:

sudo ln -s /usr/bin/python3 /usr/local/bin/python

Now all was good and functional. Keep in mind that depending on your existing package configurations, your experience might be different.

Using nmap to scan network for devices

From time to time you might need to scan your network for router or device ip addresses. This can be easily done with nmap.

sudo apt-get install -nmap -y

Once you are done installing, you can run something like this:

nmap -sn 11.1.1.0/24

Replace 11.1.1 with the details of your actual ip. Keep the ending similar to 0/24 – you will want to scan the entire address range.

Nmap will now print something like this:

Starting Nmap 7.40 ( https://nmap.org ) at 2019-03-03 12:40 UTC
Nmap scan report for xxx (xxx.xxx.x.xxx)
Host is up (0.0035s latency).
Nmap scan report for something.localdomain (xxx.xxx.x.xxx)

Nmap done: xxx IP addresses (x hosts up) scanned in x.xx seconds

The output, similar to the above, should get you started on the road of discovering your devices. Note. Eventhough nmap is a poweful tool it will only tell you the address of your router/device where other devices on your network connect to. If you need more information you might use something like Wireshark. Currently, you would need to install Wireshark from source code – if you are using Linux.

Openbox and gnome-control-center

As I am trying new ideas for PostX GNU/Linux 0.6, I decided to see how is gnome-control-center working in Debian Buster. Being an Openbox user, I encountered some issues. Documenting them below in hopes that they can help others.

First time launching gnome-control-center from terminal:

gnome-control-center:24141): dbind-WARNING **: 16:23:03.199: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files
**
ERROR:../shell/cc-shell-model.c:458:cc_shell_model_set_panel_visibility: assertion failed: (valid)
Keskeytetty

Now, lets install one package that is needed:

sudo apt-get install at-spi2-core

If I run gnome-control-center again I get this:

ERROR:../shell/cc-shell-model.c:458:cc_shell_model_set_panel_visibility: assertion failed: (valid)
Keskeytetty

Previously this solution used to work – but it is no longer valid on its own. Doing it anyway just to make sure.

sudo rm -r .local .cache

And finally, exporting GNOME as environment variable. After this: gnome-control-center command should work as expected.

export XDG_CURRENT_DESKTOP=GNOME

I did not go further on my tests this time. I discovered that gnome-control-center integation to Openbox would require some more work. Still, I might integrate gnome-control-center more fully to PostX Gnu/Linux 0.6.