петък, 16 септември 2016 г.

How to make dropbox sync

From the Dropbox help:
1.Stop Dropbox on the PC
2. In a termina write: 
  1. sudo chown "$USER" "$HOME"
    sudo chown -R "$USER" ~/Dropbox ~/.dropbox
    sudo chattr -R -i ~/Dropbox
    sudo chmod -R u+rw ~/Dropbox ~/.dropbox

    where Dropbox is the name of your dropbox folder 
3. Restart Dropbox 

вторник, 6 септември 2016 г.

Odd virtual machine error

Just tried to start my virtual machine and got this odd error:
Error starting domain: Failed to connect socket to '/var/run/libvirt/virtlogd-sock': No such file or Directory
I have no idea where it came from, since I haven't used my virtual machine for a month. In any case, the solution was very simple:
$ systemctl start virtlogd.socket
And then restart the virtual machine manager. 
Now it works: 

сряда, 13 юли 2016 г.

Virtual manager freezing

This seems to be universal problem. During the use of the virtual machine (I use qemu), it periodically freezes. The problem is not observed with ssh, so obviously, the problem is not in the virtual machine itself, but as suggested in the video acceleration or something.
The suggestion was to do
$vblank_mode=0 /usr/bin/virt-manager
I tried it, it still freezes.
Second attempt is the solution given here.
IT tells you to do (rc.local should have $chmod a+rx rx.local):
 sudo nano /etc/rc.local

if test -f /sys/kernel/mm/transparent_hugepage/enabled; then
   echo never > /sys/kernel/mm/transparent_hugepage/enabled
fi
if test -f /sys/kernel/mm/transparent_hugepage/defrag; then
   echo never > /sys/kernel/mm/transparent_hugepage/defrag
fi
exit 0

The problem is that my system is using systemd so the rc.local is not even being read.
So to enable it I've found this:
Create a file /etc/systemd/system/rc-local.service with the following contents:
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 2 of the License, or
#  (at your option) any later version.

[Unit]
Description=/etc/rc.local Compatibility
ConditionPathExists=/etc/rc.local

[Service]
Type=forking
ExecStart=/etc/rc.local start
TimeoutSec=0
StandardOutput=tty
RemainAfterExit=yes
SysVStartPriority=99
 
[Install]
WantedBy=multi-user.target
  
Then, just run systemctl enable rc-local.service as root to enable it.
You can also test it/run it now by running systemctl start rc-local.service

I still don't know if it works, because I have to test the virtual machine and systemctl enable gives an error: "sudo systemctl enable rc-local.service
The unit files have no [Install] section. They are not meant to be enabled
using systemctl."
Ok, after revising rc-local.service to contain the [Install] section, everything works like a charm.
And guess what, my virtual machine is finally not freezing. I've been using it for hours now and it seems to work flawlessly. Yay!