Showing posts with label kde. Show all posts
Showing posts with label kde. 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.

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.

Saturday, September 21, 2013

Conky Config

(Update 25-Oct-2014: Slightly updated version posted.

Just installed conky and looked around for some cute configs. This one by asoliverez looked nice, so I grabbed it and started playing around.

It didn't quite work for all values, since I didn't have all the pre-requisite software installed. So I hacked it up a little bit, and came up with the following that works with sensors (I worked out how to do it using this guy's example as a template), nvidia-smi (since I've got an nVidia GPU installed) and my particular file systems setup:

File: .conkyrc

background no
font Sans:size=8
#xftfont Sans:size=10
use_xft yes
xftalpha 0.9
update_interval 5.0
total_run_times 0
own_window yes
own_window_type normal
own_window_argb_visual true
own_window_transparent yes
#own_windiw_class conky
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
# To make conky always on top, swap 'below' in above line to 'above':
#own_window_hints undecorated,above,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 220 5
maximum_width 220
draw_shades yes
draw_outline no
draw_borders no
draw_graph_borders yes
default_color CDE0E7
default_shade_color black
default_outline_color green
alignment top_right
gap_x 12
gap_y 35
no_buffers yes
uppercase no # set to yes if you want all text to be in uppercase
cpu_avg_samples 2
override_utf8_locale no

TEXT
${color white}SYSTEM ${hr 1}${color}

Hostname: $alignr$nodename
Kernel: $alignr$kernel
Uptime: $alignr$uptime
MB Temperature: ${alignr}${iconv_start UTF-8 ISO_8859-1}${exec sensors|grep 'Physical id 0'|awk '{print $4}'}${iconv_stop}
CPU Temperature 0: ${alignr}${iconv_start UTF-8 ISO_8859-1}${exec sensors|grep 'Core 0'|awk '{print $3}'}${iconv_stop}
CPU Temperature 1: ${alignr}${iconv_start UTF-8 ISO_8859-1}${exec sensors|grep 'Core 1'|awk '{print $3}'}${iconv_stop}
CPU Temperature 2: ${alignr}${iconv_start UTF-8 ISO_8859-1}${exec sensors|grep 'Core 2'|awk '{print $3}'}${iconv_stop}
CPU Temperature 3: ${alignr}${iconv_start UTF-8 ISO_8859-1}${exec sensors|grep 'Core 3'|awk '{print $3}'}${iconv_stop}
Fan 1: ${alignr}${hwmon 1 fan 1} RPM
Fan 2: ${alignr}${hwmon 1 fan 2} RPM
#Battery: ${alignr}${battery_percent BAT0}%
CPU: ${alignr}${freq} MHz
GPU Temp: ${alignr}${exec nvidia-smi | grep '. ..\% ..C'|awk '{print $3}'}${iconv_start UTF-8 ISO_8859-1}°${iconv_stop}C
Processes: ${alignr}$processes ($running_processes running)
Load: ${alignr}$loadavg

CPU1 ${alignr}${cpu cpu1}%
${cpubar cpu1}
CPU2 ${alignr}${cpu cpu2}%
${cpubar cpu2}
CPU3 ${alignr}${cpu cpu3}%
${cpubar cpu3}
CPU4 ${alignr}${cpu cpu4}%
${cpubar cpu4}

Ram ${alignr}$mem / $memmax ($memperc%)
${membar 4}
swap ${alignr}$swap / $swapmax ($swapperc%)
${swapbar 4}

${color gray}Highest CPU $alignr CPU% MEM%${color}
${top name 1}$alignr${top cpu 1}${top mem 1}
${top name 2}$alignr${top cpu 2}${top mem 2}
${top name 3}$alignr${top cpu 3}${top mem 3}

${color gray}Highest MEM $alignr CPU% MEM%${color}
${top_mem name 1}$alignr${top_mem cpu 1}${top_mem mem 1}
${top_mem name 2}$alignr${top_mem cpu 2}${top_mem mem 2}
${top_mem name 3}$alignr${top_mem cpu 3}${top_mem mem 3}

${color white}Filesystem ${hr 1}${color}

Root: ${alignr}${fs_used /} / ${fs_size /}
${fs_bar 4 /}
Files: ${alignr}${fs_used /files} / ${fs_size /files}
${fs_bar 4 /files}

${color white}NETWORK ${hr 1}${color}

Eth0: ${addr eth0}
Down ${downspeed eth0} k/s ${alignr}Up ${upspeed eth0} k/s
${downspeedgraph eth0 25,107} ${alignr}${upspeedgraph eth0 25,107}
Total ${totaldown eth0} ${alignr}Total ${totalup eth0}

Wlan0: ${addr wlan0}
Signal: ${alignr}${wireless_link_qual wlan0}%
Down ${downspeed wlan0} k/s ${alignr}Up ${upspeed wlan0} k/s
${downspeedgraph wlan0 25,107} ${alignr}${upspeedgraph wlan0 25,107}
Total ${totaldown wlan0} ${alignr}Total ${totalup wlan0}

(Text wrap doesn't work real well...sorry. It should cut and paste okay though if anyone is interested in it).

(Update 23-Dec-2013: Added option to keep conky "always on top").

(Update 27-Sep-2014: Fixed CPU bar always showing same % issue).

Looks pretty good sitting there over in the corner of the screen:

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.