Local network DNS on Linux
From within a local network, you have to use hostname.local
rather than hostname
for name resolution to work.
What’s on my computer, how it got there and how to use it
From within a local network, you have to use hostname.local
rather than hostname
for name resolution to work.
When running Meld on macOS Mojave, the Meld window will sometimes fail to appear. The menu is there, but not the window. Once this happens, it will stay broken until some saved state files are deleted:
rm -rf ~/Library/Saved\ Application\ State/org.gnome.meld.savedState/
The kludgey fix is to have the Meld start-up script do this for you. Add that line to /usr/local/Caskroom/meld/3.19.2-r6,osx-15/meld.wrapper.sh
right before
exec '/Applications/Meld.app/Contents/MacOS/Meld' "$@"
The proprietary NVidia drivers for the GeForce GTX 750 are acting up again. Here’s the fix:
First verify that the wrong driver is in use:
lspci -nnk | grep -iA2 vga
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GM107 [GeForce GTX 750] [10de:1381] (rev a2) Subsystem: Micro-Star International Co., Ltd. [MSI] GM107 [GeForce GTX 750] [1462:3101] Kernel driver in use: nvidia
You should see nvidia as the kernel driver. If you’re here, you probably see nouveau and maybe a few others. Nouveau doesn’t work right with the GTX 750 and never has (and probably never will).
Download the NVidia 64-bit Linux driver. At the time of this writing, it’s at https://www.geforce.com/drivers/results/145182
Install the driver. This is a two step process because the Nouveau driver is likely loaded by initramfs and needs to be removed. This requires a reboot.
sudo service lightdm stop sudo sh ./NVIDIA* # This is the driver you just downloaded sudo update-initramfs -u # purge nouveau driver from initramfs sudo reboot
If your graphics are running at the right resolution, you can stop here. If not, continue:
sudo service lightdm stop sudo sh ./NVIDIA* sudo service lightdm start
Source: https://askubuntu.com/questions/823304/ubuntu-16-04-nvidia-driver-works-until-reboot
I tried to pair headphones to my Ubuntu desktop and couldn’t do it because Bluetooth refused to turn on. My first instinct was to check if Bluetooth was disabled in BIOS, but this Lenovo K450 doesn’t have that option. Here’s how it was fixed:
System Settings > Bluetooth, showed Bluetooth off. Turning it on still showed “Bluetooth is disabled”.
Checking if it was software disabled checked out also:
rfkill list bluetooth
showed that it was not blocked.
Finally, I found it was disabled in the Bluetooth configuration file. To enable, edit /etc/bluetooth/main.conf
and add the line:
AutoEnable=true
Ask Ubuntu Reference
Then restart Bluetooth:
sudo service bluetooth restart
These instructions are from https://www.rootusers.com/lvm-resize-how-to-increase-an-lvm-partition/. Note: Some output to the commands below that’s not relevant to these instructions has been removed, so your output will be different.
See capacity of current root file system:
$ df -h / Filesystem Size Used Avail Use% Mounted on /dev/mapper/ubuntu--vg-root2 99G 82G 12G 88% /
Check size of volume group to make sure it has enough space:
$ sudo vgdisplay --- Volume group --- VG Name ubuntu-vg VG Size 931.27 GiB Alloc PE / Size 53231 / 207.93 GiB Free PE / Size 185174 / 723.34 GiB
Check size of logical volume:
$ sudo lvdisplay --- Logical volume --- LV Path /dev/ubuntu-vg/root2 LV Name root2 VG Name ubuntu-vg LV Size 100.00 GiB
It has 100GB, but needs 175GB.
To expand the volume group by 75GB:
$ sudo lvextend -L+75G /dev/ubuntu-vg/root2
Check that it’s now 175GB:
$ sudo lvdisplay --- Logical volume --- LV Path /dev/ubuntu-vg/root2 LV Name root2 VG Name ubuntu-vg LV Size 175.00 GiB
Now expand the file system:
$ sudo resize2fs /dev/ubuntu-vg/root2
Check that it’s done:
$ df -h / Filesystem Size Used Avail Use% Mounted on /dev/mapper/ubuntu--vg-root2 173G 93G 72G 57% /
I have a dual monitor set up running Ubuntu 16. The goofy thing was there were two application switchers. One would be displayed on the monitor with the active window and the other would be displayed on the monitor with the cursor. If the cursor was on the same monitor as the active window, one would be on top of the other and it was difficult to tell what application would become active.
To fix this, run CompizConfig Settings Manager and uncheck “Application Switcher” in the Window Management section.
In Ubuntu 14 and 16, there is not much to distinguish the active window visually. It can help to set a highly visible shadow around the active window, for instance, red.
This had nothing to do with Google Sheets itself, but rather an extension I use called Don’t Fuck with Paste. This extension disables copy and paste blocking. The extension had a major upgrade a couple months ago that enabled the extension only for sites added to a blacklist. The blacklist supports regular expressions to match URLs. Unfortunately, a blank expression matches everything and somehow a blank RegEx was in the blacklist–I don’t know if this is the default for the extension or if I did it by mistake and I haven’t tried to find out. You can tell if the extension is active for a site if the extension’s icon is blue rather than grey. You can tell if a blank RegEx is in the list by clicking on the icon and looking if there’s a cancel button next to a blank line:
instead of this (the URL displayed will be the one displayed in the current browser tab, but the important thing is that there’s no X next to it):
Clicking the X removed the blank RegEx and turned the extension off for all sites by default, thus fixing Google Sheets.
When something goofy is broken, the first thing to do is to browse to the site with an Incognito window, which turns off all extensions. If the site works in Incognito mode, the problem is due to an extension. The next step is to figure out which extension is breaking things. If you don’t have an idea of which extension might be the problem, a binary search is the fastest way: Disable the first half of all extensions, reload the page and see if it works. If not, re-enable the first half, then disable the second half. Keep splitting the groups in half until you find the extension at fault.
Dot files are unix configuration files that contain your personalized settings for programs like Vim, Emacs, or tmux. If you use more than one unix machine, keeping these file in sync is much easier if they’re stored in Git. These instructions are how I do that.
https://github.com/dotphiles/dotphiles
If the machine hasn’t been set up with GitHib, follow these instructions
https://help.github.com/articles/set-up-git/
to install Git, set your commit name and email, and install GitHub credentials.
git clone --recursive git@github.com:zymurgeek/dotphiles.git ~/.dotfiles
Do not leave off the recursive flag!
See the instructions in ~/.dotfiles/README.md
.