Problema com a libosmesa6 no Linux Mint 18.3 “Sylvia”

Recentemente, formatei minha máquina de trabalho e aproveitei para fazer duas coisas: 1) fazer um RAID 0 entre dois HDs de 1TB disponíveis e 2) instalar o Linux Mint 18.3 “Sylvia”.

O RAID 0 foi uma solução melhor para o aproveitamento dos HDs da máquina e o Linux Mint, para sanar algumas coisas que já estavam me incomodando no Ubuntu. Obviamente, estas mesmas coisas continuam a me incomodar no Linux Mint, visto que ele é uma distribuição baseada no Ubuntu. Entre estas coisas, estão alguns problemas de instabilidade com o Terminator (emulador de terminal) que de vez em quanto fecha (com todas as minhas abas e seções). Mas uma coisa que estou gostando bastante no Linux Mint, é a forma com a qual trata as atualizações do sistema. O sistema de notificações é funcional e descomplicado.

Mas eis que precisei instalar o Octave e tive um problema com a “libosmesa6“:

Problema com a instalação do Octave no Linux Mint 18.3 “Sylvia”

Uma pequena busca no Google me levou a esta página do askubuntu com uma solução para um outro problema, e que resolveu o meu também. Neste caso, o repositório estava acusando uma versão diferente da “libosmesa6” enquanto a instalação do Octave requeria uma outra versão. Pelo visto, isto é um bug e aparentemente já deveria ter sido disponibilizada para as distribuições baseadas no Ubuntu. A solução foi instalar o pacote do “mesa-utils” com a versão requerida, disponibilizada através de um repositório “ppa”.

sudo add-apt-repository ppa:paulo-miguel-dias/pkppa
sudo apt update
sudo apt upgrade

E depois disso, a instalação do Octave correu bem com um simples

sudo apt install octave

É isso!

Referências:

Anúncios

Open any kind of file from the terminal with an “open” command (Linux)

Mac OS X has a handy script called “open” that lets you open basically any kind of file from command line inside it’s default application. For example, if you are navigantig through the terminal and there is a file called “document.pdf” and you need to open it, you can simply do: “open document.pdf” and it will open the document inside the Preview app. Another example is: “open picture.png” and the open command will do the same thing. As simple as that.

But as a Linux user, I was wondering if there is such a command to use from the terminal emulator under my Linux box. If you try the “open” command, it will probably not work, unless the word “open” is an alias pointing to whathever program/script you have. But it happens that we do have the command “xdg-open” built-in the Linux shell that will get the job done. You can invoke, from the command line, the very same commands (but using the “xdg-open” command instead). For example: “xdg-open document.pdf” and it will open the document inside eg., Evince (it will depend on your desktop environment). You can do “xdg-open picture.png” and it will open the picture inside the Eye of Gnome or whaterever picture viewer you have as a default.

If you want to keep things common between the two systems, specially if you are a command line user in both, just make an alias called “open” pointing to “xdg-open”:

$ alias open="/usr/bin/xdg-open"

In fact, almost every desktop environment has its built-in “open” command, but “xdg-open” is more generic.

That’s it!

Reference:

http://https://budts.be/weblog/2011/07/xdf-open-vs-exo-open

Quick fix for dropbox icons appearance (Linux)

If you tried to use the hardcode-tray script to fix the appearance of the tray icons under Linux desktops, you may have noticed that dropbox icons still look the same. This might happen if you install dropbox from here, instead from your linux official repository. If this is your case, you can use this easy fix to get the correct icons:

  1. First you need to locate the correct dropbox icons within your icon theme installation. In my case, I am using the Papirus icon theme. On my Linux, they are located at “/usr/share/icons/Papirus/”;
  2. Under the Papirus directory, you will find a folder named “22×22/panel”, where are the target dropbox icons. Note that I’m using the “22×22” size. Copy the following icons to “~$USER/.dropbox-dist/dropbox-lnx.x86_64-20.3.15/images/hicolor/16×16/status”. Note that your dropbox version might be different!
  3. Convert the SVG icons to PNG (it got to be PNG, otherwise dropbox will show no icons in the system tray). Use the following command to convert the icons properly:
inkscape -z -e output.png -w 22 -h 22 input.svg

This command will get the job done. But as dropbox use several icons to indicate each state, then you have to use the same command to convert each icon. To get all icons converted at once, use a modified version of this command:

for i in $(ls *svg); do j=$(echo $i | sed "s,.svg,,g"); inkscape -z -e $j.png -w 22 -h 22 $i; done

This command list all SVG files, strip the “.svg” extension; run the inkscape command and done! Note that the icons will be converted to 22px x 22px. If this is not your case, just change the output size accordingly.

Images:

Before

img-alternative-text

After

img-alternative-text

Thats all!