LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Bodhi
User Name
Password
Bodhi This forum is for the discussion of Bodhi Linux.

Notices


Reply
  Search this Thread
Old 04-01-2019, 07:42 AM   #1
crajor
Member
 
Registered: Mar 2019
Location: Akron, Ohio
Distribution: PCLinuxOS 2020
Posts: 88
Blog Entries: 4

Rep: Reputation: Disabled
trying to use photo gadget on moksha desktop


bodhi 5.0.0 64bit
I am trying use the photo gadget to change wallpapers quickly and often. Tried to install several desktop slideshow utils, all to no avail. Photo gagdet seemed to be a solution, but I am not able to change background with it. Gives an error of "Photo needs e17setroot". It also list an e-utils package where this supposed utility can be found, but I cannot find that package, let alone install it.
I realize that moksha actually creates another type of file to display as a wallpaper.
I believe this e17setroot will create the .edj file so the image will then display as a background. Is it possible that e17setroot exists and I am just not able to find it?
Any help will be greatly appreciated.
 
Old 04-01-2019, 08:05 AM   #2
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
e17setroot I bet is a program that comes with e17, like
Code:
/usr/bin/Esetroot  /usr/bin/fbsetroot  /usr/bin/xsetroot
/usr/bin/bsetroot  /usr/bin/kEsetroot
 /usr/bin/mh5000 #something I wrote
and a few others that set images on the root desktop, that come with the window manger.

mh5000 is a stand lone, like xsetroot, and hsetroot, and has a multitude of options that go beyond all of the others others shown here(shameless plug), and they are for a window manager, not desktop environment.

Last edited by BW-userx; 04-01-2019 at 08:19 AM.
 
Old 04-01-2019, 10:17 AM   #3
the_waiter
Bodhi Developer
 
Registered: Jun 2018
Location: Banská Bystrica, Slovakia
Distribution: Bodhi Linux
Posts: 864

Rep: Reputation: 665Reputation: 665Reputation: 665Reputation: 665Reputation: 665Reputation: 665
No, photo module is not for changing the wallpapers. It is a gadget for changing photos in the smaller rectangle on the screen. The module you are looking for is moksha-module-slideshow. Unfortunately I can not see it in our repository. Let me have some time to prepare deb file. Maybe Robert will make it sooner than me if read this post. I am gonna out with kids now...

Enjoy

Stefan

Last edited by the_waiter; 04-01-2019 at 10:21 AM.
 
1 members found this post helpful.
Old 04-01-2019, 11:04 AM   #4
rbtylee
Bodhi Developer
 
Registered: Jun 2018
Location: Ladson, SC US
Distribution: Bodhi
Posts: 454

Rep: Reputation: 437Reputation: 437Reputation: 437Reputation: 437Reputation: 437
Quote:
Originally Posted by the_waiter View Post
...Maybe Robert will make it sooner than me if read this post. I am gonna out with kids now...

Enjoy

Stefan
OK in BL5.0 repo now. Wonder why we missed that one?
 
1 members found this post helpful.
Old 04-01-2019, 11:30 AM   #5
rbtylee
Bodhi Developer
 
Registered: Jun 2018
Location: Ladson, SC US
Distribution: Bodhi
Posts: 454

Rep: Reputation: 437Reputation: 437Reputation: 437Reputation: 437Reputation: 437
Quote:
Originally Posted by crajor View Post
...
I believe this e17setroot will create the .edj file so the image will then display as a background. Is it possible that e17setroot exists and I am just not able to find it?
Any help will be greatly appreciated.
Interesting, ok the photo module is fairly old and I suppose no one tried to use the set as background option it provides and reported this error to us. I never tested that functionality myself.

Regardless tho at some point in the history of e17 this worked. The program e17setroot is found in the legacy/subversion-history.git on the e-git website. Hid deep at OLD/e_utils/src/bin/e17setroot. The OLD part means it is probably broken and may not even compile much less work. I will check that out when I have some free time.

But to the point regardless whether or not e17setroot works as expect and is safe to use on Moksha this module needs fixed to not use that. Moksha/e17 has its own code to set and unset backgrounds that the module should be using. One of us needs to fix this.

Sounds like a good project for Štefan
 
1 members found this post helpful.
Old 04-01-2019, 12:31 PM   #6
the_waiter
Bodhi Developer
 
Registered: Jun 2018
Location: Banská Bystrica, Slovakia
Distribution: Bodhi Linux
Posts: 864

Rep: Reputation: 665Reputation: 665Reputation: 665Reputation: 665Reputation: 665Reputation: 665
Thanx for making deb Robert

I tried photo module under BL 3 and maybe BL 4 and it worked fine after some time of playing with setup. Need to look again under BL 5. You mentioned some errors. OK the challenge accepted

Š
 
1 members found this post helpful.
Old 04-01-2019, 12:54 PM   #7
the_waiter
Bodhi Developer
 
Registered: Jun 2018
Location: Banská Bystrica, Slovakia
Distribution: Bodhi Linux
Posts: 864

Rep: Reputation: 665Reputation: 665Reputation: 665Reputation: 665Reputation: 665Reputation: 665
Hmm, I realized I have never tried the photo module feature for setting a picture as a wallpaper. But yes, I can see "Photo needs e17setroot" popup as well. Beside this, I can see the photo gadget working flawlessly on my screen.

https://i.imgur.com/5KnUI7l.jpg

EDIT: I can see also "exhibit" as default picture viewer. We should change it to ephoto or xdg-open.

Last edited by the_waiter; 04-01-2019 at 01:02 PM.
 
1 members found this post helpful.
Old 04-01-2019, 04:03 PM   #8
rbtylee
Bodhi Developer
 
Registered: Jun 2018
Location: Ladson, SC US
Distribution: Bodhi
Posts: 454

Rep: Reputation: 437Reputation: 437Reputation: 437Reputation: 437Reputation: 437
Quote:
Originally Posted by crajor View Post
Gives an error of "Photo needs e17setroot". It also list an e-utils package where this supposed utility can be found, but I cannot find that package, let alone install it.
I realize that moksha actually creates another type of file to display as a wallpaper.
I believe this e17setroot will create the .edj file so the image will then display as a background. Is it possible that e17setroot exists and I am just not able to find it?
Any help will be greatly appreciated.
OK until we properly fix this module here is a hackish fix. You create a file called e17setroot make it executable and place it in your PATH. The file has to be able to create the edj file and set it as your background. Really not hard to do but even easier to do as it has already been done. The variety wallpaper changer app has such a script. I modified it for this purpose to make it work with the photo module:

Code:
#!/bin/bash
#
# This script is run by Variety when a new wallpaper is set. You can use Bash, Python or whatever suits you best.
# Here you can put custom commands for setting the wallpaper on your specific desktop environment,
# or run commands like notify-send that notify you of the change. You can also add commands to theme your browser,
# login screen or whatever you desire.
#

WP=$2

if [[ "$DESKTOP" == *"Enlightenment"* ]] || [[ "$DESKTOP" == *"Moksha"* ]]; then

    OUTPUT_DIR="$HOME/.e/e/backgrounds"

    TEMPLATE='
    images { image: "@IMAGE@" USER; }
    collections {
      group {
      name: "e/desktop/background";
      data { item: "style" "4"; item: "noanimation" "1"; }
      max: @WIDTH@ @HEIGHT@;
      parts {
        part {
        name: "bg";
        mouse_events: 0;
        description {
          state: "default" 0.0;
          aspect: @ASPECT@ @ASPECT@;
          aspect_preference: NONE;
          image { normal: "@IMAGE@"; scale_hint: STATIC; }
        }
        }
      }
      }
    }
    '

    OFILE="$OUTPUT_DIR/variety_wallpaper_$RANDOM"

    DIMENSION="$(identify -format "%w/%h" "$WP")"

    if [ ! -z "$DIMENSION" ]; then
        WIDTH="$(echo "$DIMENSION" | cut -d/ -f1)"
        HEIGHT="$(echo "$DIMENSION" | cut -d/ -f2)"
        IMAGE="$(echo "$WP" | sed 's/[^[:alnum:]_-]/\\&/g')"

        if [ -z "$HEIGHT" ] || [ "$HEIGHT" = "0" ]; then
            ASPECT="0.0"
        else
            ASPECT="$(echo "scale=9; $DIMENSION" | bc)"
        fi
    fi

    printf "%s" "$TEMPLATE" | \
    sed "s/@ASPECT@/$ASPECT/g; s/@WIDTH@/$WIDTH/g; s/@HEIGHT@/$HEIGHT/g; s|@IMAGE@|$IMAGE|g" > "$OFILE.edc"
    edje_cc "$OFILE.edc" "$OFILE.edj" 2>/dev/null
    rm "$OFILE.edc"

    ## Get the current number of virtual desktops
    desk_x_count=$(enlightenment_remote -desktops-get | awk '{print $1}')
    desk_y_count=$(enlightenment_remote -desktops-get | awk '{print $2}')

    ## Get the current number of screens
    screen_count=1
    # If xrandr is available use it to get screen desk_x_count
    if command -v xrandr >/dev/null 2>&1; then
        screen_count=$(xrandr -q | grep -c ' connected')
    fi

    ## Set the wallpaper for each virtual desktop
    for ((x=0; x<desk_x_count; x++)); do
        for ((y=0; y<desk_y_count; y++)); do
            for ((z=0; z<screen_count; z++)); do
                # -desktop-bg-add OPT1 OPT2 OPT3 OPT4 OPT5 Add a desktop bg definition.
                # OPT1 = ContainerNo OPT2 = ZoneNo OPT3 = Desk_x. OPT4 = Desk_y. OPT5 = bg file path
                enlightenment_remote -desktop-bg-add 0 "$z" "$x" "$y" "$OFILE.edj"&
            done
        done
    done
fi
For the record variety is a really nice app and supports moksha. Someone ask about it on our old forum and i fixed it to support moksha and then latter contacted one the devs working on it and the moksha patch got added.

EDIT: Forgot to mention probably imagemagick needs to be installed:

Code:
sudo apt-get update
sudo apt-get install imagemagick

Last edited by rbtylee; 04-01-2019 at 04:51 PM.
 
2 members found this post helpful.
Old 04-01-2019, 04:18 PM   #9
the_waiter
Bodhi Developer
 
Registered: Jun 2018
Location: Banská Bystrica, Slovakia
Distribution: Bodhi Linux
Posts: 864

Rep: Reputation: 665Reputation: 665Reputation: 665Reputation: 665Reputation: 665Reputation: 665
Unbelievable scope of knowledge
 
2 members found this post helpful.
Old 04-02-2019, 11:10 AM   #10
the_waiter
Bodhi Developer
 
Registered: Jun 2018
Location: Banská Bystrica, Slovakia
Distribution: Bodhi Linux
Posts: 864

Rep: Reputation: 665Reputation: 665Reputation: 665Reputation: 665Reputation: 665Reputation: 665
I tried Ylee's hack successfully but maybe need to tell where to place the script

Type $PATH in your terminal emulator to see the right dirs
I placed it to ~/.local/bin

Stefan
 
1 members found this post helpful.
Old 04-02-2019, 05:47 PM   #11
rbtylee
Bodhi Developer
 
Registered: Jun 2018
Location: Ladson, SC US
Distribution: Bodhi
Posts: 454

Rep: Reputation: 437Reputation: 437Reputation: 437Reputation: 437Reputation: 437
Quote:
Originally Posted by the_waiter View Post
I tried Ylee's hack successfully but maybe need to tell where to place the script...
I said place it in your PATH. Yeah I left some details out. But anyways ... One important detail I left out is you need to have the dbus module loaded.

Despite this hack working it is after all a hack and the module should work on its own without users applying some hack they found online. lol. This has lead to me taking a closer look at it. I fixed some minor issues I found and then spent way too long adding support for changing the background from an image without relying upon the above hack or any other exterior program. Along the way I had to learn alot of detail about how Moksha and enlightenment actually set and change the background. As usual for such projects this involved looking at alot of Moksha source code closely, adding debug statements to print the values of various variables in Moksha functions and whatnot. Meanwhile Štefan added a few minor improvements including a border around the image in the module gadget.

While I hinted at above making implementing this background change Štefan's project, I released that would be rather difficult for him and take alot of time. And in the process I would end up having to answer quite a few questions from him. So may as well do it myself. And I confess it was a little harder than I expected and as usual took longer than I hoped.

Regardless, I am uncertain whether to package this as it is now or to wait until we finish modernizing the module and fixing whatever issues I know about or find in the process. This round of changes was focused entirely on the background change functionality from image files displayed in the gadget. Focused entirely on one file in the modules source code.I really didn't look over any of the other files or functions.

Any opinions on packaging now or waiting some undetermined amount of time?
 
2 members found this post helpful.
Old 04-02-2019, 08:02 PM   #12
crajor
Member
 
Registered: Mar 2019
Location: Akron, Ohio
Distribution: PCLinuxOS 2020
Posts: 88

Original Poster
Blog Entries: 4

Rep: Reputation: Disabled
repo did work for me

Just to let you all know, I downloaded the Moksha-module-slideshow from the repo and used gdebi to install.
Had to load the module and THEN had to activate the gadget. Working fine with the default backgrounds folder
where .edj files are stored - /home/bodhi/.e/e/backgrounds.

HOORAY! My background is changing as I wish. Thanks to all who helped with this.

Is the slideshow module a replacement for the photos gadget? Seems the case, but that is a guess.
It seems from the discussion in this thread that I opened a can of worms that may cause some work. If this is any help,
moksha-module-slideshow gives me what I was looking for - a wallpaper changer. I find myself wondering if photos gadget
is now needed at all?

Again, thanks to all Craig
 
1 members found this post helpful.
Old 04-03-2019, 03:18 PM   #13
the_waiter
Bodhi Developer
 
Registered: Jun 2018
Location: Banská Bystrica, Slovakia
Distribution: Bodhi Linux
Posts: 864

Rep: Reputation: 665Reputation: 665Reputation: 665Reputation: 665Reputation: 665Reputation: 665
As you can see, Robert's work is awesome and instant. Sometimes I really wonder where this old man takes energy, time and knowledge for this project. Without him the Bodhi Linux would not be at the level it is now. I am so proud to be his student. My full respect...

If you share my respect, you may consider some donations for him

https://www.paypal.me/rbtylee

Stefan

Last edited by the_waiter; 04-03-2019 at 03:20 PM.
 
2 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
USB device connection overrides Moksha DE's lock screen (Bodhi 4.5.0, Moksha 0.2.1) Kazuhira_x3 Bodhi 1 11-08-2018 02:54 AM
LXer: HOWTO: Install the Moksha Desktop on Ubuntu 14.04 LXer Syndicated Linux News 0 07-07-2015 08:31 AM
LXer: Bodhi Linux 3.1.0 Will Drop Enlightenment E19 for Moksha Desktop, Arrives in August 2015 LXer Syndicated Linux News 0 04-30-2015 01:24 AM
[gadget driver] HOST turns unresponsive to gadget driver niroop Linux - Embedded & Single-board computer 4 04-22-2015 08:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Bodhi

All times are GMT -5. The time now is 08:18 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration