Choose style:

Author Topic: Question about Variety wallpaper changer (SOLVED not Once but Twice)  (Read 5668 times)

0 Members and 1 Guest are viewing this topic.

Offline rjm65

  • Veteran
  • ****
  • Posts: 1004
  • Karma: 300
  • I have Peppermint Fresh Breath. :P
    • View Profile
  • Peppermint version(s): Win-98 /Win-7/ Peppermint 9
I'm stuck trying to configure variety wallpaper changer...
I wrote to the creator of the program and he replied what I need to do to get the effect i desire, but I am at a loss as to what to do in the . desktop file to get what I want.... any help would be appreciated....  thanks in advance....  :)

here is what he said for me to do....   
You can achieve this by adding "sleep 30; variety --quit" to whatever you use to run Variety.
what runs variety is a .desktop file in my .config/autostart folder...
this is the contents of that file....
[Desktop Entry]
Name=Variety
Comment=Variety Wallpaper Changer
Icon=/opt/extras.ubuntu.com/variety/share/variety/media/variety.svg
Exec=/opt/extras.ubuntu.com/variety/bin/variety
Terminal=false
Type=Application
X-GNOME-Autostart-Delay=20
« Last Edit: February 09, 2016, 07:48:49 am by rjm65 »
Robert
Peppermint 9 User

Gateway Solo 9300 Pro
IBM T40

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26103
  • Karma: 2843
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Question about Variety wallpaper changer
« Reply #1 on: April 16, 2014, 08:09:45 pm »
Try changing this line:

Code: [Select]
Exec=/opt/extras.ubuntu.com/variety/bin/variety

to

Code: [Select]
Exec=bash -c "sleep 30; /opt/extras.ubuntu.com/variety/bin/variety --quit"
« Last Edit: April 16, 2014, 08:40:07 pm by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline rjm65

  • Veteran
  • ****
  • Posts: 1004
  • Karma: 300
  • I have Peppermint Fresh Breath. :P
    • View Profile
  • Peppermint version(s): Win-98 /Win-7/ Peppermint 9
Re: Question about Variety wallpaper changer
« Reply #2 on: April 16, 2014, 08:25:28 pm »
tried that and variety never opened after boot, I noticed there is only one " in your changed line in the script, should there be another " in there usually a " mark in a script is an open command and another " is used to close command....  I'm not sure of that but that is how java script works anyways....   :)
Robert
Peppermint 9 User

Gateway Solo 9300 Pro
IBM T40

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26103
  • Karma: 2843
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Question about Variety wallpaper changer
« Reply #3 on: April 16, 2014, 08:41:35 pm »
yeah, sorry .. fixed above.

If it still doesn't work .. what happens if you run
Code: [Select]
/opt/extras.ubuntu.com/variety/bin/variety --quit
in a terminal
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline rjm65

  • Veteran
  • ****
  • Posts: 1004
  • Karma: 300
  • I have Peppermint Fresh Breath. :P
    • View Profile
  • Peppermint version(s): Win-98 /Win-7/ Peppermint 9
Re: Question about Variety wallpaper changer
« Reply #4 on: April 17, 2014, 11:27:10 am »
What happens in terminal is it runs variety but don't quit...  it gives a bunch of error codes too see below....

Spoiler (click here to view / hide)
/opt/extras.ubuntu.com/variety/bin/variety --quit
ERROR: 2014-04-17 11:17:21,859: process_command() 'Could not process passed command'
Traceback (most recent call last):
  File "/opt/extras.ubuntu.com/variety/variety/VarietyWindow.py", line 1917, in process_command
    self.on_quit()
  File "/opt/extras.ubuntu.com/variety/variety/VarietyWindow.py", line 1649, in on_quit
    for d in self.dialogs + [self.preferences_dialog, self.about]:
AttributeError: 'VarietyWindow' object has no attribute 'dialogs'
/usr/lib/python2.7/dist-packages/gi/overrides/Gtk.py:391: Warning: g_object_set_property: construct property "type" for object `PreferencesDialog' can't be set after construction
  Gtk.Window.__init__(self, type=type, **kwds)
No such schema 'com.canonical.unity-greeter'
/usr/lib/python2.7/dist-packages/gi/overrides/Gtk.py:391: Warning: g_object_set_property: construct property "type" for object `PreferencesVarietyDialog' can't be set after construction
  Gtk.Window.__init__(self, type=type, **kwds)
No such schema 'com.canonical.unity-greeter'
[close]
« Last Edit: April 17, 2014, 11:45:41 am by rjm65 »
Robert
Peppermint 9 User

Gateway Solo 9300 Pro
IBM T40

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26103
  • Karma: 2843
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Question about Variety wallpaper changer
« Reply #5 on: April 17, 2014, 11:39:59 am »
OK, can you explain exactly what it is you're trying to achieve ?
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline rjm65

  • Veteran
  • ****
  • Posts: 1004
  • Karma: 300
  • I have Peppermint Fresh Breath. :P
    • View Profile
  • Peppermint version(s): Win-98 /Win-7/ Peppermint 9
Re: Question about Variety wallpaper changer
« Reply #6 on: April 17, 2014, 11:44:23 am »
well what i want it to do is load up and change the wallpaper during boot and exit.....  because it sits there using 50 megs of ram.... Because of the DE I am using scripts don't work....
Robert
Peppermint 9 User

Gateway Solo 9300 Pro
IBM T40

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26103
  • Karma: 2843
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Question about Variety wallpaper changer
« Reply #7 on: April 17, 2014, 11:58:55 am »
so does:
Code: [Select]
/opt/extras.ubuntu.com/variety/bin/variety --quit
or
Code: [Select]
variety --quit
or
Code: [Select]
sudo /opt/extras.ubuntu.com/variety/bin/variety --quit
or
Code: [Select]
sudo variety --quit
run from the command line cause variety to exit ?
« Last Edit: April 17, 2014, 12:00:44 pm by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline rjm65

  • Veteran
  • ****
  • Posts: 1004
  • Karma: 300
  • I have Peppermint Fresh Breath. :P
    • View Profile
  • Peppermint version(s): Win-98 /Win-7/ Peppermint 9
Re: Question about Variety wallpaper changer
« Reply #8 on: April 17, 2014, 12:11:56 pm »
so does:
Code: [Select]
/opt/extras.ubuntu.com/variety/bin/variety --quit
or
Code: [Select]
variety --quit
or
Code: [Select]
sudo /opt/extras.ubuntu.com/variety/bin/variety --quit
or
Code: [Select]
sudo variety --quit
run from the command line cause variety to exit ?
The first one loads variety but don't exit it is the same line above post i put the error it gives in a spoiler....
the variety --quit and the sudo variety --quit both say command not found...
the
Code: [Select]
sudo /opt/extras.ubuntu.com/variety/bin/variety --quit
never loads variety and gives errors like above post in spoiler.....
I think I am going to go back to launchpad site and contact this peter levi guy again that made this program and see where these sleep and quit commands should be placed, do you think that is a wise idea???
Robert
Peppermint 9 User

Gateway Solo 9300 Pro
IBM T40

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26103
  • Karma: 2843
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Question about Variety wallpaper changer
« Reply #9 on: April 17, 2014, 12:19:07 pm »
if variety is ALREADY running .. then you open a terminal and run:
Code: [Select]
/opt/extras.ubuntu.com/variety/bin/variety --quit
does it cause variety to exit ?
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline rjm65

  • Veteran
  • ****
  • Posts: 1004
  • Karma: 300
  • I have Peppermint Fresh Breath. :P
    • View Profile
  • Peppermint version(s): Win-98 /Win-7/ Peppermint 9
Re: Question about Variety wallpaper changer
« Reply #10 on: April 17, 2014, 12:22:17 pm »
it says "variety is already running sending the command to the running instance"   then it makes variety quit ....  a big WOO HOO to Mark, I think we are on to something now.....   :D
Robert
Peppermint 9 User

Gateway Solo 9300 Pro
IBM T40

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26103
  • Karma: 2843
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Question about Variety wallpaper changer
« Reply #11 on: April 17, 2014, 02:11:00 pm »
OK, WITHOUT variety running, what happens if you run:
Code: [Select]
/opt/extras.ubuntu.com/variety/bin/variety; sleep 30; /opt/extras.ubuntu.com/variety/bin/variety --quit
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline rjm65

  • Veteran
  • ****
  • Posts: 1004
  • Karma: 300
  • I have Peppermint Fresh Breath. :P
    • View Profile
  • Peppermint version(s): Win-98 /Win-7/ Peppermint 9
Re: Question about Variety wallpaper changer
« Reply #12 on: April 17, 2014, 02:19:38 pm »
Variety opens and changes wallpaper but does not quit until i close the terminal then it quits....
Spoiler (click here to view / hide)
/opt/extras.ubuntu.com/variety/bin/variety; sleep 30; /opt/extras.ubuntu.com/variety/bin/variety --quit
/usr/lib/python2.7/dist-packages/gi/overrides/Gtk.py:391: Warning: g_object_set_property: construct property "type" for object `PreferencesDialog' can't be set after construction
  Gtk.Window.__init__(self, type=type, **kwds)
No such schema 'com.canonical.unity-greeter'
/usr/lib/python2.7/dist-packages/gi/overrides/Gtk.py:391: Warning: g_object_set_property: construct property "type" for object `PreferencesVarietyDialog' can't be set after construction
  Gtk.Window.__init__(self, type=type, **kwds)
No such schema 'com.canonical.unity-greeter'
[close]
Robert
Peppermint 9 User

Gateway Solo 9300 Pro
IBM T40

Offline rjm65

  • Veteran
  • ****
  • Posts: 1004
  • Karma: 300
  • I have Peppermint Fresh Breath. :P
    • View Profile
  • Peppermint version(s): Win-98 /Win-7/ Peppermint 9
Re: Question about Variety wallpaper changer (SOLVED)
« Reply #13 on: April 18, 2014, 11:52:21 am »
I am marking this one solved because I figured it out with the help of PCNetSpec and used his ideas to get the job done, now this might not be the right way to fix this issue, but it is working and doing what I want it to do....
What PCNetSpec said in one of the posts above got me thinking....  he said what happens if variety is running, and i run variety --quit in terminal???
I said it shuts down variety like i want it too.... 
so what I did was I made a second variety.desktop file in .config/autostart...
I changed the first variety.desktop file back to its original form using the autostart delay=20 command at the bottom...
in the second variety.desktop file I changed the autostart delay to 40, this gives variety enough time to load and change my wallpaper, before the second file loads with the variety --quit command in it which forces the original variety to exit....  This way I get my wallpaper change and don't have to exit Variety manually every time to save 50 megs of ram.....  Thank you Mark I appreciate all your wisdom and help.....
« Last Edit: April 18, 2014, 12:44:45 pm by rjm65 »
Robert
Peppermint 9 User

Gateway Solo 9300 Pro
IBM T40

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26103
  • Karma: 2843
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Question about Variety wallpaper changer (SOLVED)
« Reply #14 on: April 18, 2014, 12:42:11 pm »
Hey, if it works, it works ;)

You're welcome, and thanks for marking it solved.
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec