VLC on Fedora with Wayland: Big Icons, small text problem

I’ve always used VLC as my favorite video player on Linux. Recently they changed releases to 3.0 from Git in Fedora 25 (RPMFusion repository). This also included changes to work with Wayland instead of Xorg. Unfortunately the user interface was broken then – big icons, small text. Just looked like 800×600 on a full HD resolution, 27″ here.

Options described on the net where to create a custom skin, or clear the configuration cache. None of these worked unfortunately.

While looking for a possible bug I’ve found this issue which lead me to a new repository called “United RPMs”.

Thought I’d give it a try, since this issue proposes updated packages which fix the issue entirely.

sudo -rpm --import https://raw.githubusercontent.com/UnitedRPMs/unitedrpms/master/URPMS-GPG-PUBLICKEY-Fedora-24
sudo dnf -y install https://github.com/UnitedRPMs/unitedrpms/releases/download/6/unitedrpms-$(rpm -E %fedora)-6.fc$(rpm -E %fedora).noarch.rpm

sudo dnf makecache

In order to prefer UnitedRPMs over RPMFusion, I’m explicitly setting the repositories on install (I don’t want to fiddle with yum priorities here).

sudo dnf remove vlc

sudo dnf install --repo=unitedrpms --repo=fedora vlc

Voilá, VLC works again.

lldb NameError: name ‘run_one_line’ is not defined

I’m a heavy lldb user during Icinga 2 development. Most recently I got many of those error messages when starting lldb for debugging Icinga 2.

mbmif /usr/local/icinga2/etc/icinga2/tests (master) # lldb -- /usr/local/icinga2/lib/icinga2/sbin/icinga2 console
(lldb) target create "/usr/local/icinga2/lib/icinga2/sbin/icinga2"
Traceback (most recent call last):
  File "", line 1, in 
  File "/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py", line 98, in 
    import six
ImportError: No module named six
Traceback (most recent call last):
  File "", line 1, in 
NameError: name 'run_one_line' is not defined

Turns out that I have Python2 installed from a dependency in Homebrew. The lldb scripts just use the system path for determining the preferred Python binary.

A sensible workaround is discussed here:

$ /usr/local/bin/pip install six

Works again.

mbmif /usr/local/icinga2/etc/icinga2/tests (master) # lldb -- /usr/local/icinga2/lib/icinga2/sbin/icinga2 console
(lldb) target create "/usr/local/icinga2/lib/icinga2/sbin/icinga2"
Current executable set to '/usr/local/icinga2/lib/icinga2/sbin/icinga2' (x86_64).
(lldb) settings set -- target.run-args  "console"
(lldb) q

Since I wanted to check which package requires python in /usr/local/bin/python I found this command

$ brew list | while read cask; do echo -n "$cask ->"; brew deps $cask | awk '{printf(" %s ", $0)}'; echo ""; done

I can’t get rid of pygtk and macvim, so each new install/update will pull Python again. The reason why they build their own Python is somewhat unsafe C++ functions. Guess I don’t want to dig any deeper here.

Homebrew Caskroom migration

I’m using Homebrew on my Macbook. It is a great addition to installing software when you are used to package managers from the Linux world.

There’s also an extension called Homebrew Cask which allows you to manage MacOS applications, such as Adium or Gimp. This saves you the hassle of manually downloading the package/dmg files and automates the installation/updates.

Lately when doing an update again, there was a notice about a changed Caskroom location.

michi@mbmif ~ $ brew cask list
Warning: The default Caskroom location has moved to /usr/local/Caskroom.
Please migrate your Casks to the new location and delete /opt/homebrew-cask/Caskroom,
or if you would like to keep your Caskroom at /opt/homebrew-cask/Caskroom, add the
following to your HOMEBREW_CASK_OPTS:
  --caskroom=/opt/homebrew-cask/Caskroom
For more details on each of those options, see https://github.com/caskroom/homebrew-cask/issues/21913.
apache-directory-studio  filezilla                gimp                     macvim                   vlc                      xquartz
bitbar                   firefox                  java7                    mysqlworkbench           wireshark

Ok, what would I do now? “Migration” could just mean moving the directories. But wait, the installed applications could be symlinked into ~/Applications instead of being moved (#13966).

Looking into the mentioned github issue #21913 shed some light on how to fix it. Moving the directories will make “brew cask list” shut up about the changed location, but later uninstalls will fail due to dangling symlinks. The solution is simple – force an installation again after moving the installed casks.

michi@mbmif ~ $ mv /opt/homebrew-cask/Caskroom /usr/local
michi@mbmif ~ $ brew cask list
apache-directory-studio  filezilla                gimp                     macvim                   vlc                      xquartz
bitbar                   firefox                  java7                    mysqlworkbench           wireshark

michi@mbmif ~ $ for cask in $(brew cask list); do brew cask install $cask --force; done

Done 🙂

Windows 10 update changes partition table and breaks GRUB

It’s holiday season and so I got a hold of playing some games longly missed on Windows. Booting Windows 10 certainly unveiled several pending updates (Antivirus, Geforce, Windows updates). Since Windows 10 does not explicitly tell about big updates anymore I just did let it reboot several times, waiting for manual grub selection then.

Though this time the update essentially broke GRUB. “error: unknown filesystem. Entering rescue mode…” is certainly not what I expect from a Windows 10 update. After googling a bit I found this thread including an explanation as well as a solution for the problem: The Windows 10 update adds yet another hidden partition, but essentially rewrites the partition table which then breaks GRUB finding the correct /boot partition containing grub2/. Congrats Microsoft!

So, Windows 10 “Upgrade to Windows 10 Home, version 1511, 10586” breaks grub2 because boot block grub2 still thinks it should boot grub2 from (hd0,msdos2) when it now needs to boot from (hd0,msdos3).

The solution is simple but nasty without bash-completion and English keyboard layout on a German keyboard.

First find the boot partition containing the grub2/ directory.windows10_upgrade_dec2015_breaks_grub

grub rescue> ls (hd0,msdos1)/grub2
error: unknown filesystem.
grub rescue> ls (hd0,msdos2)/grub2
error: unknown filesystem.
grub rescue> ls (hd0,msdos3)/grub2
./ ../ themes/ device.map i386-pc/ locale/ fonts/ grubenv grub.cfg

Next set the changed boot prefix and root attributes:

grub rescue> set prefix=(hd0,msdos3)/grub2
grub rescue> set root=(hd0,msdos3)
grub rescue> set
prefix=(hd0,msdos3)/grub2
root=hd0,msdos3
grub rescue> insmod normal
grub rescue> normal

Change from “rescue” to “normal” GRUB mode, and quickly select Fedora from the boot menu. In order to fix GRUB log into Fedora, open a terminal and become root. Now generate a new grub configuration.

sudo -i
grub2-mkconfig -o /boot/grub2/grub.cfg
grub2-install /dev/sda
reboot

Reboot and the GRUB menu should be fixed. Now safely choose to continue the Windows 10 upgrade.

Upgrade to Windows 10 on dual-boot systems

Upgrading Windows 10 on a dual-boot system is not that easy. After fetching KB3035583 and KB2952664 and reserving my upgrade copy on Windows 7 Professional x64 the setup still said “Something happened. We can’t tell if your PC is ready to continue installing Windows 10. Try restarting setup.”

The reason for this seems to be dual-boot installations only. First off, change the default boot entry to Windows.

windows7_mark_partition_as_activeAfterwards I did not want to override Grub with my Fedora 22 installation, but was looking into alternative solutions for error 800703ed. This tip about marking the C: partition as active partition did the trick – the Windows Update is now downloading Windows 10.

  windows_update_download_win10

windows7_windows_update_win10

windows10

 

Getting ready for installing my Icinga 2 development environment 🙂

Change default boot entry in Grub2 on Fedora 22

Upgrading Windows 7 to 10 does not like dual-boot systems where Windows is not the default (likely due to automated reboots during upgrade). In order to fix this problem, we’ll need to change the boot order (or, the default entry).

 

# grep "submenu\|^\menuentry" /boot/grub2/grub.cfg | cut -d "'" -f2
Fedora (4.1.6-200.fc22.x86_64) 22 (Twenty Two)
Fedora (4.1.3-201.fc22.x86_64) 22 (Twenty Two)
Fedora (4.1.3-200.fc22.x86_64) 22 (Twenty Two)
Fedora, with Linux 0-rescue-46724b4128e8471db41e1e7efe9c8aeb
Windows 7 (loader) (on /dev/sda1)
Windows 7 (loader) (on /dev/sde1)

# grub2-editenv list
saved_entry=Fedora (4.1.6-200.fc22.x86_64) 22 (Twenty Two)

# grub2-set-default "Windows 7 (loader) (on /dev/sda1)"
# grub2-editenv list
saved_entry=Windows 7 (loader) (on /dev/sda1)