You have a file and you want to figure out which package it belongs to.
pacman -Qo FILE
Where FILE can be just the name of a file or its full path.
More info here.
During the boot process you want to execute a command as root. For instance, I needed a symbolic link in
/run is a virtual file system and its content is lost when you switch the machine off.
Edit the file
/etc/rc.local . Example:
#!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error. # # In order to enable or disable this script just change the execution # bits. # # By default this script does nothing. # this link is required by a project of mine ln -s /media /run/media exit 0
This tip is from here.
From a script I want to launch a terminal that opens in a specified folder.
Thanks to #linux, I got two solutions:
A1) I use konsole, which has an option for this:
konsole --workdir /tmp
It will open a terminal in the /tmp directory.
A2) Change directory to the specified folder and launch the terminal:
cd /tmp; konsole
If you want to do it from a script, the idea remains the same.
B) If you want to execute a command automatically in the opening terminal, use this:
konsole -e mc
C) Set the title of Konsole to a specified text:
konsole -p tabtitle='NVIM server'
Find more info here.
You want to resize an image to a given width but you want to keep the width/height ratio of the image.
convert -resize 200 big.jpg small.jpg
Here the new width will be 200 pixels.
If you type in Google Maps your name, it will show where you are located most of the time. It worked for me. Scary…
I use several machines and I would like to create a unified list that contains my favourite Firefox add-ons. This list could be kept in Dropbox, thus I could access it on all my machines. How to generate a list of installed add-ons?
The add-on Addon List Dumper can do exactly this. Here is a screenshot about this add-on: