Variety not changing desktop wallpaper in Enlightenment

Bug #1085388 reported by Geoffrey De Belie
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Variety
Fix Released
High
Unassigned

Bug Description

It seems that Variety isn't supporting the Enlightenment way to change the wallpaper. As a result, Variety has no purpose under Bodhi Linux.
Please add support for Enlightenment window manager (E17).

Revision history for this message
Peter Levi (peterlevi) wrote :

What is the command-line way of setting the wallpaper under E17?
Please add the command to ~/.config/variety/scripts/set_wallpaper and Variety will work (use the existing commands there as an example).

Changed in variety:
status: New → Incomplete
Revision history for this message
Geoffrey De Belie (computergeoffrey) wrote :

There is no such (easy) command to set the background. You could use:
enlightenment_remote -desktop-bg-add -1 -1 -1 -1 /home/user/file.edj

But for that, you need edj files that can be created with edje_cc:
edje_cc cake.jpg cake.edj
cake.jpg:6:13: unterminated character constant
cake.jpg:8:991: unterminated character constant
cake.jpg:10:46: unterminated character constant
cake.jpg:19:283: unterminated character constant
cake.jpg:22:240: unterminated character constant
cake.jpg:23:347: unterminated character constant
cake.jpg:25:4: unterminated character constant
cake.jpg:30:929: unterminated character constant
cake.jpg:39:506: unterminated character constant
cake.jpg:41:120: unterminated character constant
cake.jpg:47:197: unterminated character constant
cake.jpg:48:24: unterminated character constant
cake.jpg:49:133: unterminated character constant
cake.jpg:63:746: unterminated character constant
cake.jpg:65:186: unterminated character constant
cake.jpg:66:592: unterminated character constant
cake.jpg:70:108: unterminated character constant
cake.jpg:83:748: unterminated character constant
cake.jpg:105:148: unterminated character constant
cake.jpg:108:43: unterminated character constant
cake.jpg:109:140: unterminated character constant
cake.jpg:110:657: unterminated string or character constant
cake.jpg:4: possible real start of unterminated constant
edje_cc: Error. Exit code of epp not clean: 256

However, some errors are thrown. This also is the case with png files.

There is a built-in slide show module, but this is graphical and doesn't seem to have a command line-way to communicate with.
I'm awaiting your reply.

Revision history for this message
Peter Levi (peterlevi) wrote :

If you set some specific file as a wallpaper, and then overwrite it regularly with another image (keeping the same file path), will Enlightenment automatically refresh the desktop? This is what Variety does for KDE, which also does not provide scriptable ways to change the wallpaper. If this works, please edit the KDE section in set_wallpaper and use the same approach.

Otherwise: Variety cannot depend on Enlightenment-specific programs or tools. You would have to write your own command or script to set the wallpaper, or find an existing Enlightenment-specific program to do it and call it from set_wallpaper. If there is no way to set the wallpaper programatically, you are out of luck - and you will be right to blame the desktop environment in such case, as one expects such functionality to be easily scriptable.

Revision history for this message
Geoffrey De Belie (computergeoffrey) wrote :

No it doesn't work, I tested it. The problem is that it uses edj files and not just png or jpeg.
The only solution to this problem is, I think, to draw the wallpaper itself on a layer above the normal wallpaper.

Maybe you can look at PCManFM - it supports desktop wallpaper drawing. Maybe you can "borrow" some code from there?

P.S. Sorry for the late reply.

Revision history for this message
Peter Levi (peterlevi) wrote :

Variety does not deal with wallpaper drawing itself. It instructs the DE to set some wallpaper, from there on it is up to the DE how it will draw it. If PCManFM supports E17, you can probably install it and call it from set_wallpaper with the appropriate parameters?

Revision history for this message
Peter Levi (peterlevi) wrote :
Download full text (4.6 KiB)

Hi,

First off let me say thanks for writing such a great program! I've been using variety for some time now and think it's brilliant, the only wallpaper changer worth having IMHO! :)

I am currently running Arch Linux (64bit) with XFCE, but recently I decided to try out a few different DEs such as Razor-QT, LXQT and Enlightenment (which I built from the new E18 source available on their website).

I liked E18 and decided to try it our as my main DE for a while, but I noticed that Variety wasn't working so I started investigating to see if I could figure out why and if / how it would be possible to make it function for E.

After a bit of 'Googling' I found several forum posts and 'bug tracking' items relating to Variety not functioning for E17/E18, but I also found a project on GitHub called Krawall -- https://github.com/X4/krawall

This had some code for Enlightenment's `edje_cc` function which can convert images to the format necessary to work as a wallpaper for E.
-- the code itself had a note above it saying:
# forked from: https://gist.github.com/rumia/4565562#file-imgtoedj-sh-L8

As far as I can tell the `edje_cc` function is built as part of E18 and should (in theory) be available to anyone running the E-DE. I had to customise the code I borrowed from Krawall to some extent and I've added it to a new section in Variety's `set_desktop` script file (see attached).

Note: I have Variety configured to only use local images (no web services/downloads or quotes) but I do have the clock enabled, so Variety updates the wallpaper image every minute -- I can't remember if there's a "show seconds" option but I'm guessing if so then the wallpaper would be updated every second?! ...anyway...

So every time the clock changes Variety updates the current WP image, which also applies a new file-name. This meant that I ended up with a new '.edj' file (i.e. with a new name) being generated every minute. To solve this problem I decided to use the same method Variety uses for KDE, to have a fixed output file-name so it just overwrites the same image file over and over again.

However...I also discovered that the code I borrowed from Krawall actually unsets / deletes the old wallpaper before adding the new one, which (for me at least) created an annoying 'blink' effect while the wallpapers were changed. -- I guess because there was briefly no wallpaper at all. Although I also found that if other images had already been added via E's wallpaper manager (or other '.edj' files existed in the folder) then one of these 'blinked' instead.

In the end (and after much testing) I decided to use a 'tick-tock' method and have two output files and just alternate between them. The transition now appears smooth and everything seems to work fine.

==> Please note that although I used to be a Web Developer I'm not really up on my BASH scripting or other programming and/or Linux based code 'hacking' <==

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Now, of the two attached files the `set_wallpaper.1st` represents my first attempt, which suffered from the blinking effect, whilst the other is the updated and (hopefully) fully functioning one.

---- I'm really sorry for...

Read more...

Revision history for this message
Peter Levi (peterlevi) wrote :
Changed in variety:
status: Incomplete → Confirmed
importance: Undecided → Medium
importance: Medium → High
Peter Levi (peterlevi)
Changed in variety:
status: Confirmed → Fix Committed
Revision history for this message
Peter Levi (peterlevi) wrote :

Committed the updated set_wallpaper incorporating the changes suggested above.
User needs DBus Extension and Systray modules loaded.

There are still issues with the systray icon though - maybe Enlightment's systray does not support SVG?

Peter Levi (peterlevi)
Changed in variety:
status: Fix Committed → Fix Released
milestone: none → 0.4.19
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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