Archive for the ‘Ubuntu’ Category

Ubuntu 17 uses resolved for DNS resolution. This does not always work very well with OpenVPN. When your DNS is not resolved correctly (always externally instead of internal addresses), try to use this fix here.

Update the line in /etc/nsswitch.conf:

`hosts: files mdns4_minimal [NOTFOUND=return] resolve [!UNAVAIL=return] dns myhostname`

into

`hosts: files mdns4_minimal [NOTFOUND=return] dns resolve [!UNAVAIL=return] myhostname`

This changes the order in which the calls are resolved.

Advertisements

When Ubuntu refuses to mount an encrypted harddisk, try the following on the command-line:  (just in case: modprobe dm-mod)

sudo vgchange -ay
sudo lvscan

Then mount the disk to somewhere:

sudo mount /dev/computer-name-vg/root x

Ubuntu 16.04 ships an OpenSSH version which does no longer support DSA keys out of the box. If you want to use DSA keys, you can add the following line to the SSH config file:

echo "PubkeyAcceptedKeyTypes +ssh-dss" >> /etc/ssh/ssh_config

Since a couple of days, I was plagued by some DNS problems when using Docker 1.10+. Seems that the dnsmasq process is writing the address 127.0.1.1 into the resolv.conf. The purpose of the dnsmasq is to cache DNS queries. Unfortunately, it was no longer available in my Docker containers. The only solution for now (maybe it is a workaround) is to throw dnsmasq out. You can do this by editing the file:

/etc/NetworkManager/NetworkManager.conf

Open the file with an editor and comment out the line

dns=dnsmasq   ---> #dns=dnsmasq

After that, kill dnsmasq and restart the network-manager. You should see the changes in the resolv.conf after that:

sudo killall dnsmasq
sudo service network-manager
restart cat /etc/resolv.conf

When you checked out multiple git-repositories and you want to update them all at once, you can execute the following line:

$ ls -d */ | xargs -I{} git -C {} pull

When you’re running Ubuntu 15.04 with Docker, you must use systemctl to enable/disable your Docker service. Unfortunately, the old /etc/default/docker configuration file is not read. You must change the docker.service file and add these lines:

....

[Service]
EnvironmentFile=-/etc/default/docker
ExecStart=/usr/bin/docker -d -H fd:// $DOCKER_OPTS
MountFlags=slave
LimitNOFILE=1048576
LimitNPROC=1048576
LimitCORE=infinity

....

(On my Ubuntu 15.04 system, the file resides at /etc/systemd/system/multi-user.target.wants/)

Restart Docker with:

$ sudo systemctl restart docker 

Ubuntu 15.04 and Handbrake

Posted: May 2, 2015 in Ubuntu
Tags: , , ,

And again, when watching DVDs does not work on Ubuntu 15.04, you must install the restricted codecs (ubuntu-restricted-extras). After that you must install libdvdcss2 which is not in the repositories (for some strange reason). Even though I installed it in 14.10, after the upgrade it was not installed anymore. You have to run the following command on a terminal:

$ sudo /usr/share/doc/libdvdread4/install-css.sh

This fixed Handbrake for me once again.