Bug 157882 - Set background image in konsole 2.0 (kde4)
Summary: Set background image in konsole 2.0 (kde4)
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Packages Linux
: NOR wishlist with 296 votes (vote)
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
: 165466 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-02-15 17:52 UTC by Kazuo Teramoto
Modified: 2011-08-07 23:07 UTC (History)
11 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.8


Attachments
add tiled wallpaper feature to konsole (13.08 KB, patch)
2011-06-28 18:53 UTC, Alexandre Becoulet
Details
add tiled wallpaper feature to konsole (12.09 KB, patch)
2011-07-09 12:48 UTC, Alexandre Becoulet
Details
Qt::Gray removed (12.13 KB, patch)
2011-08-05 22:19 UTC, Alexandre Becoulet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kazuo Teramoto 2008-02-15 17:52:15 UTC
Version:            (using KDE 4.0.1)
Installed from:    Ubuntu Packages

Hi,
I'm missing a feature from kde3 konsole: Set a background image.

I use a LCD screen (laptop) and I don't know why but a solid black background don't look good, but if I set a background image with a little transparency on konsole, like 5% the readability improves. But now in kde4 I need to make all other wins minimized so konsole have the desktop as background...

I like to ask if is possible to set a background image like kde3? And I like to use real transparency too (for e.g. when I'm copying a text I can set make konsole real trans and see through it.)

Thanks!

PS. Konsole have a official (or a good) mailing-list/forum for users? So I can ask things like this before reporting then as a wish?
Comment 1 Robert Knight 2008-02-15 19:46:00 UTC
> PS. Konsole have a official (or a good) mailing-list/forum for users? 

konsole-devel@kde.org is the best place to ask.  

https://mail.kde.org/mailman/listinfo/konsole-devel
Comment 2 Peter Jakobi 2008-03-13 15:55:23 UTC
This is for me also a kind of disability feature, as a slightly
textured surface also helps in reading by 'gripping' your eye and
keep it in a single line (instead of having your
eye jump all over the last few lines).

Think e.g. green characters on slightly textured basalt.
Comment 3 Pino Toscano 2008-07-01 08:59:02 UTC
*** Bug 165466 has been marked as a duplicate of this bug. ***
Comment 4 Orion Poplawski 2009-01-28 00:27:24 UTC
I desperately miss the old "paper" background from the old KDE 3 konsole.
Comment 5 Orion Poplawski 2009-09-14 19:26:53 UTC
Any hope to get this feature?  Still not present in 4.3.1.  Thanks.
Comment 6 David Rosenstrauch 2009-09-14 19:41:33 UTC
+1!  This is a big piece of missing functionality, IMO.  I hope it gets added back soon!
Comment 7 Dhaval Patel 2010-02-18 14:29:06 UTC
This would be a great feature to have again. Hope it gets implemented soon.
Comment 8 pan shi zhu 2010-04-08 03:45:56 UTC
Add a vote for this feature.

Just checked for reference: gnome-terminal and xfce4-terminal and kde3-konsole and most framebuffer-based-terminal all have the background-image feature.

It is a shame that kde4-konsole is the only modern terminal emulator without the background-image feature.
Comment 9 David Rosenstrauch 2010-04-08 16:15:32 UTC
... especially since KDE *had* this feature in KDE3, but removed it for some reason in KDE4.  WTF?!?!?!?
Comment 10 Stephan Sokolow 2010-04-08 19:57:20 UTC
@9: My best guess, based on what I remember from the early days of KDE 4.0 is that they had to re-implement things for Qt4 and, having implemented true transparency, the guys doing the work felt it was "good enough for me" and ran out of motivation.
Comment 11 pan shi zhu 2010-04-09 02:30:15 UTC
@10: but seeing another window content as the background of konsole isn't anything pleasant IMO. 

I doubt if anyone really want the true transparency instead of a background image for konsole.

But anyway, gnome-terminal and xfce4-terminal have both background image mode and true transparency mode.
Comment 12 Stephan Sokolow 2010-04-09 03:48:26 UTC
@11: No argument.

I was perfectly happy with tinted pseudo-transparency to avoid the hassle of manually keeping the image synced up but still avoid an eye-straining solid-color background.
Comment 13 pan shi zhu 2010-04-09 04:22:13 UTC
@12: then this is what konsole in kde4 being now.

try open firefox, maximize it, open a blank page, then open your konsole, maximize it, your konsole will be still a solid background, since it transparently sees a blank page below.

try open kate, maximize it, open some text file, then open your konsole, maximize it, your konsole will transparently see a text file below, if you now want to see text in your konsole, then it may be difficult to read those text, since there are two layers of different text.

Transparent only looks good when you have a big screen and do never let any window overlaps. If you don't have a huge resolution screen and want to maximize every application then you end with seeing some irritating content in konsole background. ---- does kde4 designed only for those who have a big screen?

Anyway, konsole 4 does not support transparency when kwin compositing is not enabled. konsole 3 support background image even if your video card has no compositing support. So the fact is: konsole in kde4 does not support background at all, if you turned of desktop effects.
Comment 14 J. Becker 2010-07-09 20:52:32 UTC
The ability in KDE 3 to optionally turn on a background image, set 
transparency and level (tinting) to a particular color, etc as noted above.

However, a real regression for me is the use of real transparency for Konsole. The "fake" or "pseudo" transparency in KDE 3 was much better for me, since it didn't have the artifacts from underlying windows. (I've seen OS X users read text "through" their windows, but it just makes things harder for me to read.)

One HUGE improvement (wishlist) over KDE 3 would be the ability to turn on text outlining or shadows in a particular color (especially black and white) like desktop icons sitting on a background in KDE 3 could do. If that was possible, you could have fully transparent konsole windows sitting on a complex photograph wallpaper and still be able to read all the text without trouble.

That would make my day! Thanks for a great KDE!
Comment 15 strycat 2010-08-17 16:00:45 UTC
This is still not working in 4.5.

I have to agree with comment #9, this was working in 3.x.  It shouldn't be considered "wishlist" but a bug.  

Without the visual cue of the background image it is impossible to quickly tell which server I'm on.
Comment 16 Alex Smith 2011-03-20 13:29:30 UTC
Any chance of this happening for 4.7?
Comment 17 Kurt Hindenburg 2011-03-20 16:49:56 UTC
Someone has to code it.  I don't have any plans to work on this as I have other priorities.
Comment 18 Alexandre Becoulet 2011-06-28 18:53:22 UTC
Created attachment 61421 [details]
add tiled wallpaper feature to konsole
Comment 19 Kurt Hindenburg 2011-06-29 03:34:52 UTC
Thanks for the patch.  I'm getting crashes when selecting/removing the wallpaper as well as some debug print statements.

I'll look at it in more depth later.
Comment 20 Alexandre Becoulet 2011-06-29 10:19:56 UTC
valgrind doesn't complain with kde 4.6.3 / Qt 4.7.3.
What are the debug print statements?
Comment 21 Jekyll Wu 2011-07-01 18:36:50 UTC
(In reply to comment #18)
> Created an attachment (id=61421) [details] add tiled wallpaper feature to konsole

This patch works well for me with qt-4.7.3 and kde-4.6.90
Comment 22 Robert Knight 2011-07-03 13:27:00 UTC
Hi Alexandre,

A few comments on the patch:

 * I suggest ColorSchemeWallpaper::_picture should be a QPixmap instead of a QPixmap*
 * Instead of allocating a special large pixmap to hold the tiled image, you could just draw it directly when rendering the image.  This will save a noticeable amount of memory when the terminal window is large.  Pre-rendering to a pixmap mainly makes sense if you need to apply additional effects or the initial rendering is especially expensive relative to the cost of drawing a single pixmap.
 * The coding standard in Konsole is for & and * to bind to the type rather than the name ('QString&' instead of 'QString &foo')
 * ColorSchemeWallpaper::path() should return a plain QString rather than a const ref, in keeping with most of the Qt APIs
Comment 23 Alexandre Becoulet 2011-07-03 15:34:22 UTC
(In reply to comment #22)

Hi,

>  * I suggest ColorSchemeWallpaper::_picture should be a QPixmap instead of a
> QPixmap*

This is what I did at first but ColorSchemeWallpaper is created before QApplication and the QPixmap can not be constructed then, that's why I choose to delay the QPixmap creation.

>  * Instead of allocating a special large pixmap to hold the tiled image, you
> could just draw it directly when rendering the image.  This will save a
> noticeable amount of memory when the terminal window is large.  Pre-rendering
> to a pixmap mainly makes sense if you need to apply additional effects or the
> initial rendering is especially expensive relative to the cost of drawing a
> single pixmap.

Drawing a tiled pixmap gave complicated rectangle intersection code in the draw function and I finally decided to prepare a large pixmap instead, but I just noticed the QPainter class contains some drawTiledPixmap functions which seem to do just what we need.

>  * The coding standard in Konsole is for & and * to bind to the type rather
> than the name ('QString&' instead of 'QString &foo')

Ok

>  * ColorSchemeWallpaper::path() should return a plain QString rather than a
> const ref, in keeping with most of the Qt APIs

Ok

I'll submit a new patch soon.
Comment 24 Alexandre Becoulet 2011-07-09 12:48:48 UTC
Created attachment 61721 [details]
add tiled wallpaper feature to konsole

This new patch uses QPainter::drawTiledPixmap and fixes coding standard.
Comment 25 Kurt Hindenburg 2011-07-16 16:29:14 UTC

The Qt::Gray needs changed.  If the image is not available, it should act just like no wallpaper was chosen.

As soon as this goes in people are going to ask for: Scaled/center/drag-n-drop/color/dbus/GN/etc.... basically everything the desktop wallpaper can do.

Very minor: try to stick to a consistent use of spaces in parameters (before/after).
Comment 26 Alexandre Becoulet 2011-08-05 22:19:41 UTC
Created attachment 62596 [details]
Qt::Gray removed
Comment 27 Alexandre Becoulet 2011-08-05 22:37:16 UTC
From above comments, what peoples seem to expect is readability improvement by use of a tiled soft texture. Do we really need centered and other desktop wallpaper transforms? Use of real pictures as terminal background will impact readability.

Other features like texture dimming would nice to have but I don't have time to work on more wallpaper stuff yet.
Comment 28 Kurt Hindenburg 2011-08-07 23:07:57 UTC
Git commit 087f67e4fca15761809d24949c4367ec92b75a9b by Kurt Hindenburg.
Committed on 08/08/2011 at 00:44.
Pushed by hindenburg into branch 'master'.

Allow an image to be set as the background in the terminal.

Restore the KDE3 option to have a background image in each session.

Patch by Alexandre Becoulet <diaxen@free.fr>
BUG: 157882
FIXED-IN: 4.8

M  +36   -0    src/ColorSchemeEditor.cpp
M  +2    -0    src/ColorSchemeEditor.h
M  +37   -1    src/ColorScheme.h
M  +60   -0    src/ColorScheme.cpp
M  +18   -4    src/TerminalDisplay.cpp
M  +32   -1    src/ColorSchemeEditor.ui
M  +1    -0    src/ViewManager.cpp
M  +6    -0    src/TerminalDisplay.h

http://commits.kde.org/konsole/087f67e4fca15761809d24949c4367ec92b75a9b