Symptom: – Your default File Manager is e.g. Thunar but Firefox uses Nautilus when saving files which is driving you bananas. Solution (for XFCE): 1. Firstly make sure that your default Applilcation for that particular mime type (in this case it is the ‘inode/directory’ mime type) is actually setup properly. Open the “Preferred Applications” applet […]
Tips and tricks
How to see my DNS server IP on Linux
Old way: Examine list of DNS servers in /etc/resolv.conf: $ cat /etc/resolv.conf – – – New way: May not work on newer Linuxes since resolving may be setup via (not only DNS, but also) various other services: DDNS, LDAP, Avahi, Bonjour, ZeroConf and God knows what else. So… To check up your DNS server, better […]
Responsive web-development tricks
To make your web-page fonts increase/decrease as the browser window dimensions change use viewport-based values instead of %, ems, pxs or pts. 1vw = 1% of viewport width 1vh = 1% of viewport height 1vmax = 1vw or 1vh, whichever is larger 1vmin = 1vw or 1vh, whichever is smaller Example: h1 { font-size: 4vw; […]
XWindow: How to find my window PID… (command line arguments/working directory)?
Summary: To find the PID of a running UNIX/XWindow process: $ xprop _NET_WM_PID If that fails: $ ps -ww -fp <PID> $ pwdx <PID> Detailed explanation: So How can you find the PID (not Window ID!) of a running UNIX/XWindow process? Method 1 (simple): $ xprop _NET_WM_PID … and then click on window of interest […]
The ‘ls’ command – how to show seconds?
Being able to see seconds in the UNIX ‘ls’ command is particularly useful for comparing/viewing recently created files, because by default ‘ls -l’ will simply show “Today” in the date/time field for such files. Here’s how you can make ‘ls’ show also the seconds (and not only seconds but also microseconds, for that matter… oh […]
How to check speed of USB port and/or external device on Linux
So you got this brand new (or hopelessly old.. does not really matter for the purposes of this exercise, hehe) computer… It’s got some USB ports, but who knows what they are (USB 3.0? 2.0? 1.0?) ? How can you check what kind of USB ports does your Linux box have? Alternatively – how can […]
How to kill a stuck linux mount
How can you remove a mounted USB stick or USB HDD from the list of mounted devices? PROBLEM We have all done it – in a hurry you unplug a USB drive which was mounted in your Linux system without properly unmounting it and then it sits there in your list of mounts and you […]
How to resize multiple images in Linux
Use imagemagick – this is exactly what it was designed for! 🙂 For example: – to resize all .jpeg files in the current directory to be 320 pixels wide, preserving the aspect ration, do this:  $ convert ‘*.jpeg[320x]’ resized%03d.jpeg – to shrink all .jpg files in the current directory to be 200 pixels wide, at […]
error: rpmdb: … DB_RUNRECOVERY Fatal error, run database recovery
Getting DB_RUNRECOVERY error from yum/rpm, what can you do to fix it? The error messages look something like this: $ sudo yum install google-chrome-stable error: rpmdb: Thread/process 9662/3077695168 failed: Thread died in Berkeley DB library error: db4 error(-30974) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery error: cannot open Packages index using db4 – (-30974) […]
OpenOffice: Using cell references in COUNTIF, SUMIF…
This is quite useful… putting it here coz I keep forgetting the syntax 🙂 To use another cell as part of your comparison criteria in Open Office Calc functions like COUNTIF or SUMIF: =COUNTIF(A1:A10; “<“&B1) THe above will count how many values in the range A1..A10 are less than the value contained in B1. So […]