Archive

Archive for the ‘ubuntu’ Category

a new range of shortcuts with the Hyper key

February 9, 2017 Leave a comment

On the YouTube channel of gotbletu I found a very nice trick (video). It explains how to replace the Caps Lock with the so-called Hyper key. And why? Because Caps Lock is pretty useless and you cannot use it for shortcuts. But if you tell the system that at the place of Caps Lock there is another key, namely the Hyper key, then you can use a new range of shortcuts.

You can find my .Xmodmap file here. Just put it in your HOME folder and upon the next reboot it’ll be activated automatically. To activate it without a reboot, use the command “xmodmap ~/.Xmodmap“.

Then, under Manjaro (XFCE), go to the Start menu, start typing “keyboard”, and open the Keyboard application. Go to the “Application Shortcuts” tab and add some new shortcuts. This time, when you press Caps Lock, it’ll be recognized as the Hyper key. I added these:

Hyper + g    gedit
Hyper + k    konsole
Hyper + f    file browser (thunar)

Update (20170416)
Under Manjaro I had to create the .Xmodmap file and it is read automatically at each boot. However, under Ubuntu it’s not the case. I tried several methods and here is what worked for me: add “xmodmap ~/.Xmodmap” to the end of your ~/.bashrc file. Now, when you open a terminal, it’ll be activated for sure.

Music video

And if Hyper Hyper, then Scooter, of course:

Advertisements

Ubuntu: assign a better screenshot tool to the Print button

September 5, 2016 Leave a comment

Problem
The Ubuntu default screenshot tool (gnome-screenshot) is lame. In Manjaro there is a better tool called xfce4-screenshooter, which allows you to select a region, open it with Gimp, upload to Imgur, etc.

How to assign xfce4-screenshooter to the Print button?

Solution
First, install the software (sudo apt install xfce4-screenshooter). Then, open System Settings, select Keyboard, and go to the Shortcuts tab. Here ignore the “Screenshots” entry and select Custom Shortcuts. Click on the “+” sign and add the command xfce4-screenshooter. As a result, a new entry will appear. Click on its right side and assign the Print button to it. It’ll complain a bit but click on Re-assign. Done.

I found this nice solution here: http://askubuntu.com/a/609060/53599 . Click on this link for screenshots.

Categories: manjaro, ubuntu Tags: ,

how to configure a Digital Ocean Ubuntu 16.04 box

August 4, 2016 Leave a comment

I’ve updated my Digital Ocean Notes on GitHub. Now it includes information about configuring an Ubuntu 16.04 box.

Categories: ubuntu Tags: , ,

systemd notes

August 3, 2016 Leave a comment
Categories: ubuntu Tags: ,

Upgrade from Ubuntu 14.04 to 16.04

On my laptop I upgraded my Ubuntu to 16.04 but after the restart I didn’t get the graphical interface. The booting stopped and I found myself in a maintenance shell. I also got messages about some hard disk errors.

Well, I also have Windows 8.1 on this laptop and the Windows didn’t do a complete shutdown. Windows 8 does some tricky shutdown to boost the booting process, so it does some kind of half-hibernation. When I used Ubuntu 14.04, I got a message that one partition couldn’t be mounted, “press S to skip”. And I upgraded to 16.04 like this. And this unmountable partition caused this trouble.

So the solution was the following: start Windows 8.1, disable that shitty “fast startup” (see this post for more info), and restart Ubuntu. This time Ubuntu 16.04 booted normally.

Update (20160526)
I upgraded two more machines, there were no real problems. Libreoffice didn’t want to start on one of them, it dropped a “General I/O” error. Here is the cure:

$ sudo apt-get remove --purge libreoffice*
$ sudo apt install libreoffice

It’s a good idea to use “apt” instead of “apt-get”. It does the same thing but in addition you get a nice progress bar.

MongoDB stopped too. Here is how to start it with systemctl:

$ sudo systemctl enable mongodb
$ sudo systemctl start mongodb
# verification:
$ systemctl status mongodb
$ mongo

how to install Neovim under Ubuntu

Problem
Under Manjaro I installed neovim with yaourt. It installed version 0.1.4 and it works fine. For Ubuntu, the home page of Neovim suggests a PPA but it installed for me the version 0.1.5-dev, which is a development version.

How to install a specific version under Ubuntu (namely 0.1.4 in this case)?

Solution
Visit https://github.com/neovim/neovim and find the tagged version 0.1.4. Download the zip, uncompress it, and enter the project folder.

Install the dependencies:

$ sudo apt-get install libtool autoconf automake cmake libncurses5-dev g++

Build and install the project:

$ make cmake
$ make test
$ sudo make install

It’s a good idea to install the “neovim” Python package too:

$ sudo pip2 install neovim
$ sudo pip3 install neovim

Tips taken from here.

Update (20170402)
There is a PPA now for neovim stable. Use that: https://github.com/neovim/neovim/wiki/Installing-Neovim#ubuntu .

How to use powerline fonts under Ubuntu? Install the patched fonts: https://github.com/powerline/fonts . Then, if you use konsole, go to its settings and select one of the patched fonts. Currently I use the Hack font.

Categories: ubuntu, vim Tags: , , ,

how to configure a Digital Ocean (or Linode, etc.) Ubuntu box

March 21, 2016 Leave a comment

I wrote a doc about it on GitHub: https://github.com/jabbalaci/DigitalOceanNotes . Following this guide I can set up a virtual private server (VPS) in 30-40 minutes.