Showing posts with label kubuntu. Show all posts
Showing posts with label kubuntu. Show all posts

Wednesday, June 8, 2016

Reverting Shutdown Shortcut in Kubuntu 16.04

The updated version of KDE/Plasma in Kubuntu 16.04 changes a number of the default shortcuts compard to those in 14.04. One of the main one I'd muscle-memoried is Ctrl-Alt-Del to initiate a shutdown. There is a way to get this back in 16.04, just requires a couple of steps.

  1. Open the Global Keyboard Shortcuts dialog. Select "ksmserver" from the KDE component dropdown. Click the "Log Out" entry. Define a custom shortcut to whatever is preferred. Press Apply.
  2. Open the Desktop Session Login and Logout dialog. In the Default Leave Option section, check "Turn off computer".

Now the option to shutdown will be the default option.

Wednesday, June 1, 2016

Fix KDE Unreadable Tooltip Text/Background Colours in Firefox

In a recent update to Firefox (v46), when running under KDE on Kubuntu 14.04, the choice of text colour when hovering over images or other items in the browser that pop up a tooltip was essentially unreadable. Here's an example:

This is due to Firefox (for whatever reason) using the "WindowText" system colour rather than the "TooltipText" colour.

There are a couple of ways to fix it. The first is to go into the "Colors — KDE Control Module" and select a new colour scheme that has a better contrast in those two colours. Out of the defaults in KDE, I found Honeycomb, Norway, Obsidian Coast, Oxygen Cold and Zion all looked okay.

The other way is to override the tooltip colours.

On the same dialog, click the "Colors" tab, and find the Tooltip Background colour. If it's a dark colour, change it to something light, or light if it starts dark. You might also want to change the Tooltip Text colour to complement it.

Another option is to change the Window Text colour, but this colour is used in many more places, so will affect the look of all other applications.

This thread on the Arch Linux forum has a lengthy discussion on the issue.

Addendum: for Tree Style Tab users, changing the colour settings doesn't help. The selected tab highlights itself using the Window Text colour, the same colour as the text. To get around that one I changed to the Oxygen theme, rather than the default theme. That fixes most things up, but some sites override the colour of the text in dropdown boxes, but don't override the background...so it becomes close to unreadable. Annoying.

Saturday, April 2, 2016

Setting up a Flash Drive to UEFI Boot Linux (from an ISO)

Update 27/1/2017: A slightly simpler variant for flashing an ISO when targeting legacy BIOS PCs

The following process may be a bit cumbersome (I'm sure it could be cleaned up to use a minimal set of tools and/or have the interactive parts automated), but it works to allow a current Linux distro (I was using Kubuntu) to boot from a USB flash drive on a Dell laptop with a recent (Skylake) CPU via UEFI with SecureBoot turned on.

  1. Plug in the flash drive and find the device number (using lsblk or fdisk -l). In the following example I'm using /dev/sdc as that was the device allocated to my flash drive. If you get the device wrong, you could trash your system using the steps below!
  2. Delete everything on the flash drive to freshen it up, and create a new msdos partition:

    sudo parted /dev/sdc mklabel msdos

  3. Use fdisk to interactively add a new partition. The commands look something like this, where most of the values are defaults:

    $ sudo fdisk /dev/sdc

    Command (m for help): n
    Partition type:
    p primary (0 primary, 0 extended, 4 free)
    e extended
    Select (default p): p
    Partition number (1-4, default 1): 1
    First sector (2048-15633407, default 2048):
    Using default value 2048
    Last sector, +sectors or +size{K,M,G} (2048-15633407, default 15633407):
    Using default value 15633407

    Command (m for help): w
    The partition table has been altered!

    Calling ioctl() to re-read partition table.
    Syncing disks.
    $

  4. Create a FAT32 partition on the drive:

    sudo mkfs.vfat /dev/sdc1

  5. Create a mount point for the drive:

    sudo mkdir /mnt/flash
    sudo mount -t vfat /dev/sdc1 /mnt/flash -o rw,umask=000

  6. Extract the ISO to the flash drive (this will take a while):

    7z x kubuntu-16.04-beta2-desktop-amd64.iso -o/mnt/flash

  7. Set the boot flag on the flash drive:

    sudo parted /dev/sdc set 1 boot on

  8. Unmount the flash drive so it's ready to be removed and used:

    sudo umount /mnt/flash

Further reading on the various steps used above:

Sunday, May 3, 2015

Canon MG-6250 Scanning in Kubuntu 14.04

Had to scan something today (first time in a long while), and wondered if I'd have to go through the process I needed to last time on Xubuntu 12.10.

Turns out the MG-6250 works out of the box with Skanlite on Kubuntu 14.04. No configuration required, it searched the network and found the printer, click Scan -- go.

Saturday, January 10, 2015

Yet Another Canon Printer Linux Driver Install

After going round the loop with my Canon MF-4140 time or two before, I had to print something today and found I needed a slightly different process this time on Kubuntu 14.04.

There now appears to be a 64-bit driver for the MF-4100 series on Linux, which I downloaded from here.

After installing the two .deb files (cups-common and the cndrvcups-ufr2), the printer driver was available in the Add Printer dialog. It still didn't work though, despite appearing to install, accept and complete jobs. The trick was revealed by the answer in this askubuntu question, to search for missing dependencies for the .so libraries in the driver source tree. I installed lib32stdc++6, but as Dan Menes also discovered, it was the 32-bit version of libxml2 (sudo apt-get install libxml2:i386) that finally gets the thing to work.

Monday, October 20, 2014

nVidia Tearing Fix in Kubuntu 14.04

Finally got around to revisiting this issue. Last time I tried I black screened the system, but with the TTY consoles successfully in operation that isn't so much of a risk.

Seems the following fix from AskUbuntu (thanks Barafu!) solves the problem. The solution is almost identical to the fix I used for 13.04, but adds an extra line to /etc/profile:

export __GL_YIELD="USLEEP" export __GL_THREADED_OPTIMIZATIONS=1

Not sure why I got the black screen, it may have been something unrelated, as this worked perfectly on two differed Kubuntu+nVidia systems.

Wednesday, June 11, 2014

Getting rid of mscorefonts

While installing the kubuntu-restricted-extras package, I accidentally allowed the installation of ttf-mscorefonts-installer. This kind of uglified up all my browser fonts, so to remove them I ran:

sudo apt-get purge ttf-mscorefonts-installer

Solution was based on this answer at askubuntu.

Friday, March 14, 2014

Compiling Godot from Source on Kubuntu

Hearing about the release of cross-platform, open-source gaming engine Godot, I thought I'd give it a go. After getting the source from github, I hit a "what do I do now" moment? There didn't seem to be anything to run, and I couldn't find any docs that explained what to do.

Perhaps obviously in hindsight, I could have gone to the "compiling from source" page and followed that, but for whatever reason I didn't find it, so here's the process I took to get up and running (using Kubuntu 13.04):

  • There is a makefile in the root of the source code. I tried "make all", but it fell over with the error: /bin/sh: 1: scons: not found.
  • Tried installing scons (sudo apt-get install scons).
  • Make then failed with: scons: *** Do not know how to make File target `bin/godot'
  • Web search led to a Godot forum post that defined the other dependencies that are needed:
  • apt-get install scons pkg-config libx11-dev libxcursor-dev \ build-essential libasound2-dev libfreetype6-dev \ libgl1-mesa-dev libglu-dev

  • Now: $ make all
  • Should get "scons: done building targets".
  • run "bin/godot", this should open the Project Manager.
  • Continue to follow the Godot tutorials.

Monday, February 17, 2014

Kubuntu Ugly Font Fix

I installed Kubuntu 13.10 on a machine at work today, and found the fonts in GTK applications looked pretty awful. I started stuffing around with the font settings, but in the end found that the steps detailed in this askubuntu answer were what fixed it (thanks Rael!).

Specifically, this step:

KDE Settings > Application Appearence > Fonts.
Mark Anti-aliasing as "enabled", click on "Configure",
uncheck "Exclude range", check "Use subpixel",
and select "Slight" for "Hinting".

It's strange because I've never had these issues with Kubuntu on other machines, and may have been due to the high-resolution monitor I was using.

Update 9/3/2015: Only just discovered but it seems this change breaks text in Gimp when using KDE. Turning it off fixes Gimp, but it's kind of annoying since the fonts go back to looking poor...

Thursday, October 17, 2013

Fixing KDE Games Menu Crash

After installing the game "A Virus Named Tom" from the Humble Bundle 9, trying to view the "Games" menu in KDE started crashing.

The problem is due to the file avirusnamedtom_com-avirusnamedtom_1.desktop in ~/.local/share/applications. It contains a reference to an image where either a) the reference is invalid because it contains spaces, or b) the image is unreadable.

To fix the problem, I edited the Icon line from:

Icon=/home/ash/Software/games/installed/
  VirusNamedTom/A Virus Named TOM.bmp

to:

Icon="/home/ash/Software/games/installed/
  VirusNamedTom/A Virus Named TOM.bmp"

(Line break above is for clarity -- there is no line break in the file).

After logging out and logging back in, the Games menu should work again (although the icon for AVNT still doesn't appear properly, and I can't open the file in the default image viewer, which makes me think it's broken in some way. GIMP can open it without any problem, so I'm not sure what the issue is).

An alternative solution is to rename or delete the .desktop file, but then you lose the AVNT menu entry.

Also note this should fix a crash when clicking on the menu and selecting "Edit Applications..." -- which also occurred until I made this fix.

Hat tip to abelthorne, who posted the clue that led me to track this down.

Update 17/10/2013:
After a bit more experimentation, I found that the image can be made to work in the Games menu by saving as it as .PNG in GIMP, removing the spaces in the filename, and removing the quotes in the Icon entry in the .desktop file. There are some weirdnesses or limitations in the .desktop format it seems, and also something strange with the .BMP that comes with AVNT.

Sunday, September 15, 2013

Fixing Tearing with Kubuntu 13.04 and nVidia 304.88

UPDATE 26th May 2014: I tried this same fix on Kubuntu 14.04, and it black-screened the system. I'd also been tinkering with some other stuff at the same time, so haven't tracked it down exactly (or what the new fix might be), but I suspect it is the GL_YIELD change to /etc/profile below. I don't recommend doing it unless you're ready to rollback/recover the original.. UPDATE 20th Oct 2014: Tried a very similar fix on 14.04 and this time it worked, so not sure what was going on here.

After finding a workaround to fix tearing on Mint 15 Cinnamon, I jumped to Kubuntu 13.04 because there were some strange issues with screen recording in Mint, I assume because of the tearing workaround affected some of the internals in the graphics stack that screen capture uses.

Unfortunately, Kubuntu had the same tearing issue that Xubuntu exhibited. The solution again was a workaround, but different:

  • Install KDE 4.11 as per the instructions at this noobslab article:

    sudo add-apt-repository ppa:kubuntu-ppa/backports
    sudo apt-get update
    sudo apt-get dist-upgrade

    (Not sure if this was actually necessary, but it was one of the other things I tried first).
  • In "Desktop Effects -- KDE Control Module" => Advanced tab, set Compositing type to "OpenGL 3.1" and Tearing Prevention (VSync) to "Re-use screen content".
  • Add:

    export __GL_YIELD="USLEEP"

    To /etc/profile as per this KDE forum post. NOTE: But see above regarding this possibly having problems in more recent versions.

That should fix the tearing.

Note on Fullscreen Games

For some reason, the above worked in the general desktop environment, but fullscreen games were still tearing. The fix that worked in that case was to uncheck "Suspend desktop effects for fullscreen windows". Not sure why that made things better, since I would have thought the other way around would work, but that's the change that fixed it.

Things That Didn't Work

For reference, here are the things I tried that didn't work:

  • Turn off compositing with Alt+Shift+F12 (no effect).
  • Install KDE 4.11 (as noted above, this by itself didn't help, but may be necessary for the workaround).
  • Install compiz. The tearing was perhaps a little better, but still not great, and compiz just doesn't look as good as kwin.

And one last resort I would have tried eventually: Re-compiling KDE with this patch.