Yearly Archives: 2023


Remove Disabled Snaps.

LANG=C snap list --all | awk '/disabled/{print $1" --revision "$3}' | xargs -rn3 sudo snap remove;

Let us break down the command for you:

  1. LANG=C sets the language to English (C locale), which can be helpful to ensure consistent behavior across different systems with different default languages. We used this to make sure that the word disabled will appear for disabled snaps and not some other translation.
  2. snap list --all lists all installed snaps (i.e., packages) along with their details. The output of this command is piped to the following command.
  3. awk '/disabled/{print $1" --revision "$3}' searches for lines in the output that contain the word “disabled” and prints the first field (i.e., the name of the snap) followed by the string “–revision” and the third field (i.e., the revision number). This output is piped to the next command.
  4. xargs -rn3 sudo snap remove takes groups of three arguments from the input and runs the command snap remove with those arguments. In this case, the first argument is the name of the disabled snap; the second argument is the string “–revision”, and the third argument is the revision number. This will remove all disabled snaps and their associated revisions.

So, in summary, the command searches for all disabled snaps on the system, extracts their name and revision number and then removes them using the snap remove command. This is a very useful command to free up some space without losing data or functionality.


Why does turning a device off and on again fixes most technical problems?

We’ve asked ChatGPT by OpenAI to describe “Why does turning a device off and on again fixes most technical problems?” in multiple ways. Here are the answers:

Explain the above question in a humorous way.

Well, you see, turning a device off and on again is like hitting the “reset” button on your brain after a wild night out. You wake up feeling fresh and ready to take on the day, and your device wakes up feeling fresh and ready to take on your technical problems! It’s like a magic spell, but instead of saying “abracadabra,” you just unplug the darn thing and plug it back in again. So the next time you’re feeling frustrated with technology, remember: sometimes all it takes is a good old-fashioned power nap.

Give another explanation.

Turning a device off and on again can fix many technical problems because it allows the device to start with a clean slate. Think of it like a desk cluttered with papers and objects. It can be hard to find what you need and get work done efficiently in that environment. But if you clear the desk and start fresh, you can approach tasks with a clearer mind and better focus. Similarly, by restarting a device, you clear out any processes or applications that may be causing issues or conflicts, and the device can start up fresh with all its resources available for the task at hand. It’s a simple and effective solution that has been saving people from technology-induced headaches for years.

Compare the device to an ancient city and explain it again.

Sure, let’s compare a device to an ancient city like Rome. Like a device, an ancient city had a complex system of infrastructure and architecture. Buildings, roads, and water systems all needed to work in harmony to keep the city functioning. However, just like a device, sometimes things would go wrong. A blockage in the aqueduct could lead to a shortage of water, or a fire could damage buildings and disrupt the flow of traffic.

When something went wrong in an ancient city, the solution was often to reset the system. For example, they might divert water to clear a blockage or rebuild a damaged building to restore the city to its former glory. Similarly, when a device encounters a problem, a simple reset can often fix it. By turning the device off and on again, you’re essentially giving it a fresh start and allowing it to re-establish the necessary connections and processes.

So, just as ancient Romans used resets to keep their city running smoothly, we use resets to keep our devices functioning properly. It’s a simple but effective solution that has stood the test of time (and technology!).

Compare the device to a post-apocalyptic city and explain it again.

If we compare a device to a post-apocalyptic city, it’s like a city that has been devastated by a disaster. In this scenario, the city’s infrastructure has been damaged or destroyed, and many systems no longer function as they should. For example, power lines may be down, water may be contaminated, and buildings may be in ruins.

When a device encounters a problem, it can feel like a post-apocalyptic city. The software or hardware may be damaged or malfunctioning, and it can be difficult to figure out what’s causing the issue. In this scenario, turning the device off and on again is like rebuilding the city from scratch. By rebooting the device, you’re essentially wiping the slate clean and starting over.

Just like a post-apocalyptic city needs to rebuild its infrastructure and systems, a device needs to re-establish its connections and processes. By restarting the device, you’re giving it a chance to start fresh and rebuild what has been damaged or lost. It’s a simple solution that can be surprisingly effective in bringing a device back to life after a technical disaster.

Explain it again in a technical tone

When a device encounters a problem, it can be due to a variety of factors such as software errors, hardware conflicts, or corrupted data. These issues can cause the device’s processes to become unstable, leading to reduced performance or even a complete system failure.

Turning a device off and on again, also known as a reboot or power cycle, can often fix these problems by resetting the device’s software and hardware components. When a device is turned off, it stops all its processes and clears its memory, including any temporary files or data that may be causing issues. When the device is turned back on, it loads its software and hardware components from scratch, re-establishing connections and resetting any problematic processes.

This simple technique is a common troubleshooting method for a wide range of devices, from smartphones and computers to routers and printers. It can often solve issues such as frozen screens, slow performance, network connectivity problems, and more. Overall, turning a device off and on again is a powerful and effective tool for resolving many technical problems that may arise in modern technology.

Explain it as a fairy tale addressed to children

Once upon a time, there was a magical device that helped people do all sorts of things. It could help you talk to your friends, watch your favorite shows, and even play games! But sometimes, the device would have a problem, and it wouldn’t work the way it should.

One day, a wise fairy appeared to help. She said, “My dear child, when your device is having a problem, just turn it off and on again!” The child was surprised and asked the fairy why that would help. The fairy smiled and said, “When you turn off the device, it’s like sending it to sleep. And when you turn it back on, it wakes up refreshed and ready to work again!”

The child was amazed by this simple solution and quickly tried it out. They turned the device off and then back on again. To their delight, the device worked perfectly! The child was so happy that they danced around with joy, thanking the wise fairy for her help.

From that day on, whenever the child’s device had a problem, they would remember the wise fairy’s advice and turn it off and on again. And each time, the device would wake up refreshed and ready to work its magic once again. The child learned that sometimes, the simplest solutions can be the most powerful, and they lived happily ever after with their trusty device by their side. The end.


Linux mouse jiggler

Keep-Presence is an innovative program that automatically detects when you’re away from your computer and moves the mouse or presses a key to keep it active. This is especially helpful when you need to keep your computer running but don’t want it to lock or sleep due to inactivity.

What’s excellent about Keep-Presence is that it won’t interfere with your work while using your computer. Instead, it only activates when it detects that you’re away, so you can rest assured that your computer will remain active even if you step away from your desk for a few minutes.

This program is beneficial if you’re working remotely and need to step away from your computer frequently. With Keep-Presence, you can trick your machine into thinking you’re still working on it, which can be helpful if you need to step away for a short period and don’t want to constantly re-login or restart your work.

In summary, Keep-Presence is a helpful program that keeps your computer active even when you’re away. It’s an excellent tool for those who work remotely or need to step away from their desk frequently, and it won’t interfere with your work while using your computer.

This software is available in GitHub and the snap package manager.

https://github.com/carrot69/keep-presence/

To install using snap, execute the following command:

sudo snap install keep-presence;
#Just execute the following to start the application with default settings
keep-presence;
#Use Ctrl+C to stop it.

We used it in Ubuntu 22.04LTS with success.

Optional arguments

-h, --help                        show this help message and exit
            
-s SECONDS, --seconds SECONDS     Define in seconds how long to wait after a user is
                                  considered idle. Default 300.

-p PIXELS, --pixels PIXELS        Set how many pixels the mouse should move. Default 1.

-c, --circular                    Move mouse in a circle. Default move diagonally.

-m MODE, --mode MODE              Available options: keyboard, mouse, both; default is mouse. 
                                  This is the action that will be executed when the user is idle. 
                                  If keyboard is selected, the program will press the shift key. 
                                  If mouse is selected, the program will move the mouse. 
                                  If both is selected, the program will do both actions.

-r RANDOM RANDOM, --random RANDOM RANDOM
                                  Usage: two numbers (ex. -r 3 10). Execute actions based on a 
                                  random interval between start and stop seconds. 
                                  Note: Overwrites the seconds argument.

Two Signal accounts on Ubuntu 22.04LTS

Signal is a widely used messaging app that prioritizes user privacy and security. However, there may be times when one needs to use multiple Signal accounts on the same device. In this blog post, we will discuss the problem of needing two Signal accounts on Ubuntu 22.04LTS and how to solve it by installing the beta version.

The Problem:

Let’s say you have two Signal accounts, one for personal use and the other for work. Unfortunately, Signal does not provide a built-in feature for running multiple accounts on the same device. This can be a frustrating problem for Ubuntu 22.04LTS users who want to use multiple Signal accounts. Fortunately, there is a solution, and that is to install the beta version of Signal on your device.

Installation Steps:

  1. Open the Terminal.
    The first step is to open the Terminal by clicking the Terminal icon or pressing the “Ctrl+Alt+T” keys.
  2. Add the Signal repository.
    To install the beta version of Signal on Ubuntu 22.04LTS, you need to add the Signal repository to your system. Run the following command to add the repository:

echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/signal-desktop-keyring.gpg] https://updates.signal.org/desktop/apt xenial main' | sudo tee -a /etc/apt/sources.list.d/signal-xenial.list;

  1. Add Signal’s public key.
    Next, you need to add Signal’s public key to your system. This key is used to verify the authenticity of the packages in the repository. Run the following command to add the public key:

wget -O- https://updates.signal.org/desktop/apt/keys.asc | gpg --dearmor > signal-desktop-keyring.gpg;
cat signal-desktop-keyring.gpg | sudo tee -a /usr/share/keyrings/signal-desktop-keyring.gpg > /dev/null;

  1. Update the package list.
    After adding the repository and public key, you must update the package list. Run the following command to update the package list:

sudo apt update;

  1. Install the beta version of Signal.
    Finally, you can install the beta version of Signal by running the following command:

sudo apt install signal-desktop-beta;

This will install the beta version of Signal on your system, which you can use to run multiple Signal accounts.

Conclusion:

In conclusion, running multiple Signal accounts on Ubuntu 22.04LTS can be a problem. However, installing the beta version of Signal can solve this problem. Following the above installation steps, you can easily install the beta version of Signal on your device and use multiple Signal accounts without hassle.