Terminator's icon is very blurry in alt-tab for gnome shell

Bug #1067287 reported by Daniel Bonniot
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Terminator
Fix Released
Low
Stephen Boddy
terminator (Ubuntu)
Fix Committed
Undecided
Unassigned

Bug Description

See the attached screenshot: terminator's icon is very blurry. On the other hand it looks just fine in the activities screen.

Revision history for this message
Daniel Bonniot (bonniot) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in terminator (Ubuntu):
status: New → Confirmed
Revision history for this message
Sander van Melsen (sandervanmelsen) wrote :

Got the same issue, using HiDPI (3200x1800)

Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

The name under the icon in the grab makes me think you have set the default terminal to Terminator and are . What does the icon look like if you launch Terminator with it's own name/icon/shortcut? My initial suspicion is that the name is confusing the icon picker of the GNOME Shell, and it is grabbing the one assigned to the window. I know for a fact we ship 128x128 icons, and a scalable svg one. But I'm not sure how GNOME Shell retrieves the icon for use in the picker.

Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

Ah, now I see that this is a very old issue originally, and the screenshot too.

@Sander: can you prehaps attach a screenshot of the issue under HiDPI? I'm not sure if it is the same, or we just need to start providing 512x512 icons for people with excessive pixel counts.

Revision history for this message
Sander van Melsen (sandervanmelsen) wrote :

@Stephen, sorry for the delay and kicking up a old issue, didn't notice that...

I've attached a screenshot of the situation, only do discover a little nuance. They way you launch terminator affects which icon gets used. The blurry version I get by using the shortcut ctrl+alt+t and when I start it from the search or launcher it gets the proper SVG version.

Think this is confirming the suspicion you already had.

Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

Hey Sander, no problem about the age of the issue. Terminator has quite a bug collection, and with a lot of them I'm not easily able to reproduce, and the original raiser has moved on. Having someone pop up and confirm it is still an issue and helping narrow it down helps immensely.

Unfortunately, I now have the puzzle of how (if possible) to fix this. Possibly it is something we were/are doing wrong like forcing the window icons size. However I have changed that code in the latest trunk. Are you using trunk or 0.97?

If you could try the trunk you may find that the changes have fixed the issue. Which would BTW be awesome, cos I can close another ancient bug :-)

Let me know if you need help on getting and temporarily running trunk.

Changed in terminator:
assignee: nobody → Stephen Boddy (stephen-j-boddy)
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Sander van Melsen (sandervanmelsen) wrote :

Hey Stephen, I am using version 0.97, if you could give me some pointers on how to switch too the trunk version, that would be very welcome as a simple search didn't result in much.

And I can relate too the puzzle, being a humble web developer myself ;) So if you can help you resolve some ancient ticket, I'll do what I can.

Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

OK, so for the test of the x-terminal-emulator, you will need to properly install the trunk. I can only give you instructions for Ubuntu, so I really hope you're running that.

    $ cp ~/.config/terminator/config ~/.config/terminator/config_bak
    $ sudo add-apt-repository ppa:gnome-terminator/nightly
    $ sudo apt-get update
    $ sudo apt-get install terminator

(Do not type the $, it's just to clarify it's a command)

Make sure to exit any running instances of Terminator at this point. If you don't there is a good chance that the shortcut may just launch a new window attached to the old process/version.

Now try launching it with the keyboard shortcut, and check to see if the icon is now sharp.

Once done, if you're feeling brave, you can continue to run nightly. I think I'm fairly good at not breaking things in trunk. (Crosses fingers)

If not, disable the PPA in your software manager, remove the new version and install the old version afterwards. You should also copy the backed up config back to the normal filename.

Revision history for this message
Sander van Melsen (sandervanmelsen) wrote :

Great explanation Stephen, got it all working!

$ apt-cache policy terminator
terminator:
  Installed: 0.97+1626~ubuntu15.04.1
  Candidate: 0.97+1626~ubuntu15.04.1
  Version table:
 *** 0.97+1626~ubuntu15.04.1 0
        500 http://ppa.launchpad.net/gnome-terminator/nightly/ubuntu/ vivid/main amd64 Packages
        100 /var/lib/dpkg/status
     0.97-4 0
        500 http://nl.archive.ubuntu.com/ubuntu/ vivid/universe amd64 Packages

But unfortunately I must tell that it hasn't been resolved yet, still getting the lowres version when using the shortcut. :(

So I thought what does Ubuntu use when I hit the shortcut, found out it uses gsettings, so checked that out:
$ gsettings get org.gnome.desktop.default-applications.terminal exec
'x-terminal-emulator'

I noticed when I execute 'x-terminal-emulator', I get the blurry version and when executing 'terminator' it gives me the proper icon.

So checked what the launcher icons are using:
$ cat /usr/share/applications/terminator.desktop | grep Exec
TryExec=terminator
Exec=terminator
Exec=terminator

They use the correct 'terminator' command instead of 'x-terminal-emulator'

Hope this is somewhat useful for your puzzle ;)

Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

Up for another experiment?

$ sudo su - (enter password to switch to root user)
# cd /usr/bin
# mv terminator terminator_link
# vi terminator
Type the following in (between the ---8<--- marks):
---8<---
#!/bin/bash

terminator $@
---8<---
# chmod a+x terminator
Now try the Ctrl+Alt+t shortcut. Hopefully this time you get a Terminator named icon and proper sharp Terminator icon.

(I tested this on my 14.04 system, and it works for me, and is based on what I see being done with gnome-terminal that has a seperate gnome-terminal.wrapper script that is used for the alternate-update command.)

Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

Ah. If it wasn't clear, press return after "sudo su -" *then* enter password. Don't type the password on the end of the sudo line.

Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

Or wait till tomorrow, and install the nightlies again (or let it update if you left the nightly PPA active).

I've pushed a provisional fix that *should* cure this issue:

http://bazaar.launchpad.net/~gnome-terminator/terminator/trunk/revision/1628

Changed in terminator:
status: Confirmed → Fix Committed
Changed in terminator (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
Sander van Melsen (sandervanmelsen) wrote :

Sorry for the delay, but I gave your experiment a try. But or I am missing something, or it isn't working?

Let me show what I got:

$ ls -l /usr/bin/terminator*
-rwxr-xr-x 1 root root 27 aug 23 22:02 /usr/bin/terminator
lrwxrwxrwx 1 root root 30 aug 23 02:18 /usr/bin/terminator_link -> ../share/terminator/terminator

Renamed the old file and created a new one called 'terminator', with the following content:

$ cat /usr/bin/terminator
#!/bin/bash

terminator $@

After this clicking the launcher or using the shortcut resulted in a frozen Unity, recovered by switching tty (alt+f6). When I return after that to the desktop, and using the launcher/shortcut it just freezes a second to result in nothing after. Am I missing something I don't spot?

Using 15.04.

Revision history for this message
Sander van Melsen (sandervanmelsen) wrote :

Got the nightly PPA still active, will revert the changes and wait what the update does. Or you must spot something wrong with my attempt!

Also looked at the diff, seems a lot like what I did, except the filename 'terminator.wrapper', that shouldn't matter right?

Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

Hmmm. Now I look back at them I think I messed up the instructions to you. Sorry about that :-(

The script is trying to search the normal $PATH variable for terminator, and finding... itself! That will be what causes the deadlock and inactivity. I think I did my first test slightly differently, and then cocked up the instructions to you.

I checked the committed fix in a local debian package and it all worked for me.

To expedite this I have forced an immediate build of the nightlies, which have already completed. Just do your normal update and upgrade cycle, and you should have the new (working for me) fix. Note that you might have to reset the alternative once installed:

$ sudo update-alternative --set x-terminal-emulator /usr/bin/terminator.wrapper

If there's a problem with the fix too, then I'll revert the change and kick off another build.

Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

That's "terminator.wrapper" all one word in the command. Launchpad split it at just the most confusing point!

Revision history for this message
Sander van Melsen (sandervanmelsen) wrote :

Yes, finally I can bring you some good news! Update the package and your fix did the job, no more blurriness insight :)

Great work man, squashed an ancient bug and made all HiDPI users happy at the same time! A big thanks for the support, was all very clear!

So cheers, keep up the great work and make this awesome tool even better!

Revision history for this message
Sander van Melsen (sandervanmelsen) wrote :

Btw, updating the alternative was not needed

Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

Excellent!

Changed in terminator:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.