[PCManFM] Unable to find or create trash directory

This error happened when I tried to trash files located on a secondary drive, which is automatically mounted at startup in my /etc/fstab.

To fix this, I manually created a hidden .Trash-1000 folder at the root of the mounted folder, and made it belong to my user:

sudo mkdir /path-to-mounted-drive/.Trash-1000
sudo chown your-username .Trash-1000

1000 is the uid of my user. This is the default value but you can find yours with the id command:

$ id                                               
uid=1000(didier) gid=100(users) groups=100(users)[...]

Alt+Insert shortcut not working with Fn key in Android Studio (and maybe elsewhere)

I have a TypeMatrix keyboard with quite a few keys requiring pressing the Fn key first.

A TypeMatrix keyboard

Insert is one of them. So if I want to use a shortcut like Alt+Insert, I usually just need to type Fn+Alt+Insert. But it does not work in Android Studio1 2, where I had to add a custom mapping. It appears that Fn+Alt is recognized as Alt Gr, which explains why the default shortcut was not triggered.

To add a custom mapping in Android Studio, go to File > Settings. In the popup window, click Keymap on the left and type generate in the search field. This will display the current mapping associated with the Generate... command. Double click on it to display the Edit Shortcuts menu and then choose Add Keyboard Shortcut to finally enter your custom shortcut.

Add a custom mapping in Android Studio

1 It happens I have noticed this while using Android Studio, but it probably happens in other software too.
2 I am currently using version 3.1.2.

[Bluetooth] Failed to connect: org.bluez.Error.Failed

Error after removing then reconnecting my Bluetooth dongle. The culprit was PulseAudio, which needed to be restarted:

$ pulseaudio -k
# re-do bluetoothctl stuff (may not be needed)
$ pulseaudio --start

Unreadable tiny names in LibreOffice Calc sheet tabs

Tiny sheet tabs

This issue happens in LibreOffice 4.3 and older with some desktop themes. To solve this, either change your desktop theme or increase the value of GtkScrollbar::slider_width in the file /usr/share/themes//gtk-2.0/gtkrc. In my case, the line was commented out. Activating it with the default value did the trick.

gtkrc edit

Restart LibreOffice Calc to see the result:

Readable sheet tabs


Pacman: use regex to install multiple packages

Say I want to install all the packages starting with 'festival'. Using a wildcard throws an error, as well as using a regex, quoted or not:

$ sudo pacman -S festival*
error: target not found: festival*
$ sudo pacman -S 'festival.*'
error: target not found: festival.*
$ sudo pacman -S '^festival'
error: target not found: ^festival

And it is perfectly normal... since this is not implemented!

One solution is to pipe the result of a search query, which does support regex:

$ pacman -Ssq '^festival' | sudo pacman -S -
resolving dependencies...
looking for conflicting packages...

Packages (3) festival-2.1-5  festival-english-2.4-1  festival-us-2.4-1