Tag Archives: Linux

GSConnect doesn’t mount my phone on Manjaro Gnome, this is the solution

Hi there! I am using the Gnome shell extension GSConnect on Manjaro Gnome to share files from my phone to my laptop. There is an option called “Mount” that initially didn’t work on Manjaro but I found a solution and it now works like a charm!

All you need to do is to edit the file /etc/ssh/ssh_config

sudo vim /etc/ssh/ssh_config

and add to the end of the file the following:


Host 192.168.*.*
HostKeyAlgorithms +ssh-rsa

Accessing Samba on Manjaro: failed to retrieve share list from server

A few days ago I got my shiny new StarBook Mk V and installed Manjaro on it for the very first time. I have no prior experience neither with Arch-based distros not rolling releases. Anyway, soon after I installed it I realized that I can’t access my homemade NAS server over Samba. I have a samba network at home with a mix of Linux (Linux Mint, Manjaro) and Windows 10 (don’t judge me) computers. Samba has always worked well to connect to each other. But now, when opening smb://192.168.1.6 in Gnome file manager I get this error: Failed to retrieve share list from server: Invalid argument

After quick duckling I found the solution: everything you need to do is to add these two lines in the global section of /etc/samba/smb.conf file on the server

client min protocol = CORE
server min protocol = CORE

and then restart it:

sudo service smbd restart

Voila!

P.S. The solution is based on the original post on the Manjaro forums here.

Install the latest versions of Vagrant and VirtualBox on Linux Mint 19.2

I use Linux Mint 19.2 as daily driver on my ThinkPad L480. This step by step tutorial will guide you through the process of getting the latest versions of VirtualBox and Vagrant instead of the outdated versions available in the official Ubuntu repositories.

VirtualBox and Vagrant receive updates on Linux much often than the repositories update. If you want to consistently get these updates when they become available, you’ll want to add VirtualBox and Vagrant repository to your system. This will allow you to get notified for new versions and update trough Linux Mint Update Manager and apt.

Continue reading

Batch rename files with Cyrillic filenames to Latin ones (transliterate file names)

If you have a bunch of files with Cyrillic file names, there is a chance that some old devices such as TV embedded players, car audio systems, mp3 players may not recognize them or fail to read. The quick and dirty solution is to rename these files to Latin only characters. In order to save some time I use this handy bash script. It works flawlessly on both Windows (Git Bash) and native Linux systems. Continue reading

This machine ID is already enabled with a different key or is non-unique

I have purchased new VPS and I wanted to enable Ubuntu live patch service for it. Unfortunately, the command canonical-livepatch enable [TOKEN] failed with this ugly error message:

This machine ID is already enabled with a different key or is non-unique.
Either “sudo canonical-livepatch disable” on the other machine, or regenerate a
unique /etc/machine-id on this machine with
“sudo rm /etc/machine-id /var/lib/dbus/machine-id && sudo systemd-machine-id-setup” :
{“error”: “Conflicting machine-id”}

I thought to myself “Ok, let’s try the suggested solution”. What I did was to backup the file /etc/machine-id, than delete it and run suggested systemd command. I was surprised to see the newly generated UUID was the same! Consulting with man page of systemd-machine-id-setup command revealed that “If run inside a KVM virtual machine and a UUID is configured (via the -uuid option), this UUID is used to initialize the machine ID. The caller must ensure that the UUID passed is sufficiently unique and is different for every booted instance of the VM.”. Obviously, my new VPS provider did not ensure that and somebody else has the same machine ID on his/her VPS and enabled Ubuntu live patch for it.

Continue reading

Vagrant: Authentication failure. Retrying…

I recently bought a newer laptop. It had Windows 8 preinstalled which I wiped immediately in order to install Linux Mint 19.1 and started to migrate data from my old machine. I packaged my vagrant box and transferred it to the new machine. Once imported the box back and issued vagrant up command I was surprised by the following errors:

Continue reading

Add GIT branch information to Bash prompt

I’ve seen such as fancy Bash prompts on various tutorials and Linux examples over the Internet and I’ve always wondered how is achieved. I never really had a enough free time to learn more about it and explore the options. But being jobless for a month gave me opportunity to play with the thinks I like 🙂

My solution is pretty simple: when you navigate to git controlled folder, the bash prompt will show “@ branch” after the directory name. Nothing fancy.

Just open your ~/.bashrc configuration file with your favorite editor and add the following:

get_git_branch () {
git name-rev HEAD 2> /dev/null | sed "s/[a-zA-Z0-9]\+\ \(.*\)/ @ \1/"
}

than put this into your PS1 string:

$(get_git_branch)

so it become something like that

PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w$(parse_git_branch) \n\$\[\033[00m\] '

Restart your terminal or type bash to start new bash session. Navigate to git controlled folder to test. It should look like this:

bash-git

How To Get The Log Instead of Just Revision Numbers by svn merge info

svn merge command is really great – it can be used to determine which revisions are already merged and which are eligible to merge from particular branch. But has one big drawback – it can output just the revision numbers, but not the corresponding log messages. So, it’s really hard to determine what has been commited actually with these revisions. Of course, you can run svn log command for the revisions in question, but what if there are, lets say, 50 commits?

You could build a list of commit messages by piping mergeinfo into the svn log command using xargs. It looks like this:

svn mergeinfo --show-revs=eligible ^/branches/version | tr "\\n" "," | xargs -i svn log -c {} ^/branches/version

To make the command little bit easier and shorter, you may consider to add an alias in your ~/.bash_aliases file as follow:

alias svnlog='tr "\\n" "," | xargs -i svn log -c {}'

Now, you can shorten the command like that:

svn mergeinfo --show-revs=eligible ^/branches/version | svnlog ^/branches/version

How to setup the perfect LAMP stack on Ubuntu 14.04 LTS

Ok, ladies and gentlemen!

I needed local development server closer as possible to the production one. I downloaded and Installed Ubuntu, but didn’t know how to get Apache, MySQL and PHP installed. After a few hours of reading random blogs found on Google and head banging I succeed.

My requirements was:

  1. Set up multiple subdomains automatically (i.e. Virtual Document Root)
  2. Password protect all my subdomains when they are accessed outside my home network but access them directly, without need to provide password, when I am connected to my local network and develop.
  3. To separate the error logs by virtual host (subdomain).

Below is a laundry list of commands to help you configure your own perfect Ubuntu server, too.

Continue reading