You are not logged in.
Pages: 1
Greetings:
I pasted a conversation from several Xfce blogs about any way to make different backgrounds appear on different workspaces and those that claim such works by using "SyncWall" and "qtcreator" make it an urban legend with bogus "proof" screen captures. Mint mavens say only KDE makes this go. Can anyone confirm that diff backgrounds/workspaces even works in Xfce?
Thanks for dispelling any myths!
Jim in NYC
====
Different Backgrounds On Different Desktops Not Possible?
by jimwg on Thu Apr 11, 2013 6:02 am
Greetings:
I just want it reaffirmed by the Mint mavens here: It's not possible to have different backgrounds with different desktops yet because there's no Compiz Wallpaper plug-in which users on Ubuntu sites claim you must have to do it in XFCE and MATE, is that correct?
Thanks for any input,
Jim in NYC
jimwg
Level 3
Posts: 152
Joined: Sun Apr 22, 2012 9:31 pm
Top
Top
Re: Different Backgrounds On Different Desktops Not Possible
by steve.sansumwright on Thu May 30, 2013 11:55 am
I would be interested in this one too, I just yesterday got compiz and virtual desktops working, Ive tried getting the compiz-extras deb from many sites but as yet Ive had no luck as i always run into dependancy issues.
steve.sansumwright
Level 1
Posts: 7
Joined: Mon Apr 01, 2013 5:26 pm
Top
Re: Different Backgrounds On Different Desktops Not Possible
by palo on Thu May 30, 2013 12:16 pm
Who says not possible? Running Xfce with E17 on top. Take a walk on the wild side.
ATTACHMENTS
Pager
Pager.png (77.42 KiB) Viewed 132 times
palo
Level 4
Posts: 268
Joined: Mon Jun 25, 2012 7:28 am
Location: Pennsylvania
Top
Re: Different Backgrounds On Different Desktops Not Possible
by jimwg on Mon Jun 10, 2013 9:26 pm
palo wrote:
Who says not possible? Running Xfce with E17 on top. Take a walk on the wild side.
That;s great then! How do you do it because other Xfce blogs can't! Help me learn linux, thanks!
Jim in NYC
jimwg
Level 3
Posts: 152
Joined: Sun Apr 22, 2012 9:31 pm
Top
Re: Different Backgrounds On Different Desktops Not Possible
by rakeshsingh on Tue Jun 11, 2013 3:53 am
I have not used this myself, but you can try SyncWall
http://thehive.xbee.net/index.php?modul ... y&pageid=1
Interesting bunch of features....
rakeshsingh
Level 1
Posts: 8
Joined: Fri Jun 07, 2013 6:09 am
Top
Re: Different Backgrounds On Different Desktops Not Possible
by jimwg on Tue Jun 11, 2013 8:06 am
rakeshsingh wrote:
I have not used this myself, but you can try SyncWall
http://thehive.xbee.net/index.php?modul ... y&pageid=1
But what do you use yourself to get those kind of image results?
Jim in NYC
jimwg
Level 3
Posts: 152
Joined: Sun Apr 22, 2012 9:31 pm
Top
Re: Different Backgrounds On Different Desktops Not Possible
by homerscousin on Thu Jun 13, 2013 3:25 pm
Who says not possible? Running Xfce with E17 on top. Take a walk on the wild side.
Wild, indeed.
I wonder if I can do this in KDE?
i5 3570k, ASRock z77 Extreme 4, 8 Gb Ripjaws 1600, Antec 430w psu, HVR 1600 tv tuner, custom case- marble top, oak face. Carver & DCM Time Window sound system. Mint 14 KDE.
homerscousin
Level 5
Posts: 519
Joined: Fri May 25, 2012 2:43 pm
Location: Somewhere on planet Earth (mostly)
Top
Re: Different Backgrounds On Different Desktops Not Possible
by homerscousin on Thu Jun 13, 2013 3:25 pm
Wow, don't know what I did. Quote did not work right, double posted, came back to edit. Hope it is more presentable.
What was the question?
Offline
Its being worked on. See https://bugzilla.xfce.org/show_bug.cgi?id=369 for more information.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Greetings:
Does this need a new topic to be seen as a suggestions topic?
I'm no programmer or hacker or anything near that sharp, but I was wondering off the cuff whether there was a way to write a script or a "macro"(?) that executes all the key or mouse clicks it takes to select and pop up a specific wallpaper and somehow tie or link that "macro" to an action like when you want to switch to a another workspace. In other words, can a key or mouse click to move to another workspace be "monitored" in such a way that when such is activated it also triggers the macro to execute popping up a new specific wallpaper? Hope I'm saying all this right. It's just a wild hope/suggestion. Thanks for steering me straight!
Jim in NYC
Last edited by jimwg (2013-06-19 17:39:32)
Offline
Try this simple memory-resident script. You can load it manually from the terminal or add it to your startup applications. It cycles continously and every second checks to see if the workspace has changed (using wmctrl) and if so, changes the wallpaper. Not ideal, but it will work.
You need to edit the script to change NUMBER_WORKSPACES to be the number of workspaces that you have and also edit the values in the WORKSPACE_WALL array to point to the wallpapers that you want to use for every workspace.
#!/bin/bash
# The Poor Man's Wallpaper/Workspace solution
# Requires: wmctrl
# Make sure you edit the NUMBER_WORKSPACES and WORKSPACE_WALL array to suit.
# Remember: wmctrl starts counting workspaces at 0.
lockfile=/tmp/.wspm.lockfile
if ( set -o noclobber; echo "locked" > "$lockfile") 2> /dev/null; then
trap 'rm -f "$lockfile"; exit $?' INT TERM EXIT
echo "Locking succeeded" >&2
###### EDIT THESE VALUES
NUMBER_WORKSPACES=4
WORKSPACE_WALL[0]=/usr/share/backgrounds/space-01.jpg
WORKSPACE_WALL[1]=/usr/share/backgrounds/space-02.jpg
WORKSPACE_WALL[2]=/usr/share/backgrounds/space-03.jpg
WORKSPACE_WALL[3]=/usr/share/backgrounds/space-04.jpg
###### DO NOT EDIT BELOW
CURRENT_WORKSPACE=$(wmctrl -d | grep \* | cut -d' ' -f1)
while true
do
sleep 1
NEW_WORKSPACE=$(wmctrl -d | grep \* | cut -d' ' -f1)
if [ $CURRENT_WORKSPACE -ne $NEW_WORKSPACE ]; then
wmctrl -s $NEW_WORKSPACE
xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/image-path -s ${WORKSPACE_WALL[$NEW_WORKSPACE]}
CURRENT_WORKSPACE=$NEW_WORKSPACE
fi
done
rm -f "$lockfile"
else
echo "Lock failed - exit" >&2
exit 1
fi
Last edited by ToZ (2013-06-25 13:40:41)
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Try this simple memory-resident script. You can load it manually from the terminal or add it to your startup applications. It cycles continously and every second checks to see if the workspace has changed (using wmctrl) and if so, changes the wallpaper. Not ideal, but it will work.
You need to edit the script to change NUMBER_WORKSPACES to be the number of workspaces that you have and also edit the values in the WORKSPACE_WALL array to point to the wallpapers that you want to use for every workspace.
#!/bin/bash # The Poor Man's Wallpaper/Workspace solution # Requires: wmctrl # Make sure you edit the NUMBER_WORKSPACES and WORKSPACE_WALL array to suit. # Remember: Xfce starts counting workspaces at 0. lockfile=/tmp/.wspm.lockfile if ( set -o noclobber; echo "locked" > "$lockfile") 2> /dev/null; then trap 'rm -f "$lockfile"; exit $?' INT TERM EXIT echo "Locking succeeded" >&2 ###### EDIT THESE VALUES NUMBER_WORKSPACES=4 WORKSPACE_WALL[0]=/usr/share/backgrounds/space-01.jpg WORKSPACE_WALL[1]=/usr/share/backgrounds/space-02.jpg WORKSPACE_WALL[2]=/usr/share/backgrounds/space-03.jpg WORKSPACE_WALL[3]=/usr/share/backgrounds/space-04.jpg ###### DO NOT EDIT BELOW CURRENT_WORKSPACE=$(wmctrl -d | grep \* | cut -d' ' -f1) while true do sleep 1 NEW_WORKSPACE=$(wmctrl -d | grep \* | cut -d' ' -f1) if [ $CURRENT_WORKSPACE -ne $NEW_WORKSPACE ]; then wmctrl -s $NEW_WORKSPACE xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/image-path -s ${WORKSPACE_WALL[$NEW_WORKSPACE]} CURRENT_WORKSPACE=$NEW_WORKSPACE fi done rm -f "$lockfile" else echo "Lock failed - exit" >&2 exit 1 fi
I'll get on this soon as I can!!! So far of all the countless Xfce and Mint and Ubuntu sites I've sloughed through, you have come up with a practical "here right now!" solution on this issue! Super kudos for your effort! If it one day had some kind of "Clonezilla" graphic interface for computer newbies to use you have yourself a worldbeater!!
Keep the great talent!!
Jim in NYC
Offline
ToZ
I'll check this out today! If there was a way to give this script a Clonzeilla-like graphical command line interface so newbies can more easily select images to workplace windows (and make XFCE even more appealing) this can be a keeper! I hope XFCE developers catch wind of this as a newbie-easy add-on or feature that can take the "only we can do it" bluster out of KDE's sails!
Good job!!!
Jim in NYC
Offline
Try this simple memory-resident script. You can load it manually from the terminal or add it to your startup applications. It cycles continously and every second checks to see if the workspace has changed (using wmctrl) and if so, changes the wallpaper. Not ideal, but it will work.
You need to edit the script to change NUMBER_WORKSPACES to be the number of workspaces that you have and also edit the values in the WORKSPACE_WALL array to point to the wallpapers that you want to use for every workspace.
#!/bin/bash # The Poor Man's Wallpaper/Workspace solution # Requires: wmctrl # Make sure you edit the NUMBER_WORKSPACES and WORKSPACE_WALL array to suit. # Remember: Xfce starts counting workspaces at 0. lockfile=/tmp/.wspm.lockfile if ( set -o noclobber; echo "locked" > "$lockfile") 2> /dev/null; then trap 'rm -f "$lockfile"; exit $?' INT TERM EXIT echo "Locking succeeded" >&2 ###### EDIT THESE VALUES NUMBER_WORKSPACES=4 WORKSPACE_WALL[0]=/usr/share/backgrounds/space-01.jpg WORKSPACE_WALL[1]=/usr/share/backgrounds/space-02.jpg WORKSPACE_WALL[2]=/usr/share/backgrounds/space-03.jpg WORKSPACE_WALL[3]=/usr/share/backgrounds/space-04.jpg ###### DO NOT EDIT BELOW CURRENT_WORKSPACE=$(wmctrl -d | grep \* | cut -d' ' -f1) while true do sleep 1 NEW_WORKSPACE=$(wmctrl -d | grep \* | cut -d' ' -f1) if [ $CURRENT_WORKSPACE -ne $NEW_WORKSPACE ]; then wmctrl -s $NEW_WORKSPACE xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/image-path -s ${WORKSPACE_WALL[$NEW_WORKSPACE]} CURRENT_WORKSPACE=$NEW_WORKSPACE fi done rm -f "$lockfile" else echo "Lock failed - exit" >&2 exit 1 fi
Using Nadia XFCE but doesn't seem to work. No images outside regular wallpaper shows. The Workspace Switcher menu doesn't seem to list 0 as a start number, just 1 to 4. Could that be a hangup? Just wildly guessing and will check out more.
Jim in NYC
Last edited by jimwg (2013-06-25 12:18:01)
Offline
Although the Workspace switcher lists the workspaces as 1 to 4, internally they are managed as 0 to 3.
1. Do you have a single monitor setup?
2. Can you post back your edited version of the script?
3. Can you run the following commands and post back the results?
xfconf-query -c displays -p /Default -l | cut -d'/' -f3 | uniq | wc -l
wmctrl -d
wmctrl -d | grep \* | cut -d' ' -f1
xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/image-path
ps -ef | grep xfdesktop
4. Can you run this command and see if it changes the wallpaper:
xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/image-path -s /path/to/image/file
...replace /path/to/image/file with the path to an actual wallpaper file.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Although the Workspace switcher lists the workspaces as 1 to 4, internally they are managed as 0 to 3.
1. Do you have a single monitor setup?
2. Can you post back your edited version of the script?
3. Can you run the following commands and post back the results?
xfconf-query -c displays -p /Default -l | cut -d'/' -f3 | uniq | wc -l
wmctrl -d
wmctrl -d | grep \* | cut -d' ' -f1
xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/image-path
ps -ef | grep xfdesktop
4. Can you run this command and see if it changes the wallpaper:
xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/image-path -s /path/to/image/file
...replace /path/to/image/file with the path to an actual wallpaper file.
jimwg@bluemint1 ~ $ xfconf-query -c displays -p /Default -l | cut -d'/' -f3 | uniq | wc -l
1
jimwg@bluemint1 ~ $ wmctrl -d
0 * DG: 1024x768 VP: 0,0 WA: 0,0 1024x768 Workspace 1
1 - DG: 1024x768 VP: N/A WA: 0,0 1024x768 Workspace 2
2 - DG: 1024x768 VP: N/A WA: 0,0 1024x768 Workspace 3
3 - DG: 1024x768 VP: N/A WA: 0,0 1024x768 Workspace 4
jimwg@bluemint1 ~ $ wmctrl -d | grep \* | cut -d' ' -f1
0
jimwg@bluemint1 ~ $ xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/image-path
/path/to/image/file
jimwg@bluemint1 ~ $ ps -ef | grep xfdesktop
jimwg 7220 7191 0 08:06 ? 00:00:01 xfdesktop --display :0.0 --sm-client-id 24c961fc5-264d-4941-b143-8e985c032848
jimwg 7937 7879 0 09:09 pts/0 00:00:00 grep --colour=auto xfdesktop
jimwg@bluemint1 ~ $
jimwg@bluemint1 ~ $ xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/image-path -s /usr/share/backgrounds/stars.jpg
Works displaying stars.jpg
Also -- using a user's slightly modified version by caribriz from LinuxMint:
Jim - I'm no techie either :wink: - but I had a go at the solution by ToZ in both a flash drive full install of LM13 xfce and a live LM14 xfce.
It seems to work - with just a minor lag when switching desktops.
If interested, this is how I did it for LM14 xfce - your mileage may vary ....
Note: for the experiment I just used three of the images in LM14 /usr/share/backgrounds for Workspaces 1, 2 and 3
.... I left Workspace 0 as the original desktop wallpaper, gelsan_green.png - the images are different for LM13 xfce:
Added Workspace Switcher to panel, went to Settings > Workspaces and made 4 sure workspaces were enabled (should be by default ?)
Open terminal, enter commands:
sudo apt-get install wmctrl
mkdir .scripts
cd .scripts
gedit workspace-wall-change
gedit opens .... copied/pasted the text below -
Code: Select all
#!/bin/bash
# The Poor Man's Wallpaper/Workspace solution by ToZ
# Requires: wmctrl
# Make sure you edit the NUMBER_WORKSPACES and WORKSPACE_WALL array to suit.
# Remember: Xfce starts counting workspaces at 0.
lockfile=/tmp/.wspm.lockfile
if ( set -o noclobber; echo "locked" > "$lockfile") 2> /dev/null; then
trap 'rm -f "$lockfile"; exit $?' INT TERM EXIT
echo "Locking succeeded" >&2
###### EDIT THESE VALUES
NUMBER_WORKSPACES=4
WORKSPACE_WALL[0]=/usr/share/backgrounds/gelsan_green.png
WORKSPACE_WALL[1]=/usr/share/backgrounds/sparks.jpg
WORKSPACE_WALL[2]=/usr/share/backgrounds/stars.jpg
WORKSPACE_WALL[3]=/usr/share/backgrounds/water.jpg
###### DO NOT EDIT BELOW
CURRENT_WORKSPACE=$(wmctrl -d | grep \* | cut -d' ' -f1)
while true
do
sleep 1
NEW_WORKSPACE=$(wmctrl -d | grep \* | cut -d' ' -f1)
if [ $CURRENT_WORKSPACE -ne $NEW_WORKSPACE ]; then
wmctrl -s $NEW_WORKSPACE
xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/image-path -s ${WORKSPACE_WALL[$NEW_WORKSPACE]}
CURRENT_WORKSPACE=$NEW_WORKSPACE
fi
done
rm -f "$lockfile"
else
echo "Lock failed - exit" >&2
exit 1
fi
saved file (you're already in .scripts folder, so just clicked save) > closed gedit
in same terminal, make the file executable:
chmod +x workspace-wall-change
exit terminal
Settings > Session and Startup > Application Autostart > click Add
type in name: workspace-wall-change
in command type in: /home/your-own-username/.scripts/workspace-wall-change
click ok
click Session tab > click Save session
logout/in
When trying it in LM13 xfce I somehow managed to "lose" my window settings as I have done at times in the past ...
I just opened a terminal and entered xfwm4
So - it worked for me - see how you go.
=========================================================
Top
Re: Different Backgrounds On Different Desktops Not Possible
Unread postby caribriz on Tue Jun 25, 2013 8:52 am
jimwg wrote:Using Nadia XFCE but doesn't seem to work. Maybe my workspace image addresses from Pictures folder are too long or the script only works with images inside usr folder? Or does desktop wallpaper menu have to be set to single image or none? The Workspace Switcher menu doesn't seem to list 0 as a start number, just 1 to 4. Could that be a hangup? Just wildly guessing and will check out more.
Jim in NYC
Hi Jim -
Just tried it again, a few different times in LM14 xfce (live).
The first time it didn't work :shock: - so rebooted, and tried again.
2nd time - did work - this was as I posted above - with the 4 images in /usr/share/backgrounds.
Rebooted and tried again.
3rd time - this time I tried it with the same images as before, but located in /home/mint/Pictures - I copied the 4 images from /usr/share/backgrounds to /home/mint/Pictures and edited workspace-wall-change script image lines to read:
Code: Select all
###### EDIT THESE VALUES
NUMBER_WORKSPACES=4
WORKSPACE_WALL[0]=/home/mint/Pictures/gelsan_green.png
WORKSPACE_WALL[1]=/home/mint/Pictures/sparks.jpg
WORKSPACE_WALL[2]=/home/mint/Pictures/stars.jpg
WORKSPACE_WALL[3]=/home/mint/Pictures/water.jpg
Saved the file, and continued the instructions as before.
It worked again.
In Desktop settings - on each occasion, it was set as "single image".
In Workspace Switcher menu, it is listed as 1 to 4 - contrary to what is in the script - "# Remember: Xfce starts counting workspaces at 0." :?
This was the result, regardless of whether the images were located in /usr/share/backgrounds OR /home/mint/Pictures:
workspaces 1 and 2.png
LM14 xfce workspaces 1 and 2
workspaces 3 and 4.png
LM14 xfce workspaces 3 and 4
As I said, this was done on a live usb of LM14 xfce, but I did do it as well in full install of LM13 xfce.
So, I'm not sure why it didn't work for me first time - it's working now.
Maybe you could start over and try to recreate what I did exactly - using the same images in /usr/share/backgrounds - just to see if that works?
Offline
The command:
wmctrl -d
...lists the workspaces. Notice that the first one is 0. Perhaps the more accurate statement is to say that wmctrl counts workspaces starting at 0 (not Xfce). Sorry about that confusion. I've edited my original script.
jimwg@bluemint1 ~ $ xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/image-path
/path/to/image/file
...this should not say /path/to/file, but rather have the actual path to a file. For example:
$ xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/image-path
/home/toz/Pictures/DualScreen/Eye.jpg
Can you post back the contents of your script file so that I can review it?
Just like the other poster you've quoted, this works fine on my install (single monitor/4 workspaces) like your setup. You can fine-tune the delay by changing the sleep command. Right not its set a 1 (1 second). You can set it at 0.5 (half a second) if you want it more responsive. Just keep in mind that you will have a program running on your computer that is cycling every half a second.
Last edited by ToZ (2013-06-25 13:41:38)
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
One other thing to keep in mind. If you are making changes to the script while its running, you have to kill the existing script before the changes will show. To do so, if you've named the script wspm for example, then:
killall wspm
...then restart the script to test.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Just found a bug - wasn't accounting for wallpapers with spaces in the name. Here is an updated version of the script that fixes that issue:
#!/bin/bash
# The Poor Man's Desktop/Workspace solution
# Requires: wmctrl
# Make sure you edit the NUMBER_WORKSPACES and WORKSPACE_WALL array to suit.
# Remember: wmctrl starts counting workspaces at 0.
lockfile=/tmp/.wspm.lockfile
if ( set -o noclobber; echo "locked" > "$lockfile") 2> /dev/null; then
trap 'rm -f "$lockfile"; exit $?' INT TERM EXIT
echo "Locking succeeded" >&2
###### EDIT THESE VALUES
NUMBER_WORKSPACES=4
WORKSPACE_WALL[0]="/home/toz/Pictures/Abstract Smoke.jpg"
WORKSPACE_WALL[1]="/home/toz/Pictures/Bello Nebula.jpg"
WORKSPACE_WALL[2]="/home/toz/Pictures/Cold Morning.jpg"
WORKSPACE_WALL[3]="/home/toz/Pictures/Evenings Rest.jpg"
###### DO NOT EDIT BELOW
CURRENT_WORKSPACE=$(wmctrl -d | grep \* | cut -d' ' -f1)
while true
do
sleep 1
NEW_WORKSPACE=$(wmctrl -d | grep \* | cut -d' ' -f1)
if [ $CURRENT_WORKSPACE -ne $NEW_WORKSPACE ]; then
wmctrl -s $NEW_WORKSPACE
xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/image-path -s "${WORKSPACE_WALL[$NEW_WORKSPACE]}"
CURRENT_WORKSPACE=$NEW_WORKSPACE
fi
done
rm -f "$lockfile"
else
echo "Lock failed - exit" >&2
exit 1
fi
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Can you post back the contents of your script file so that I can review it?
Hope this helps though can't see how as the only things I replaced were the image paths!
#!/bin/bash
# The Poor Man's Desktop/Workspace solution
# Requires: wmctrl
# Make sure you edit the NUMBER_WORKSPACES and WORKSPACE_WALL array to suit.
# Remember: wmctrl starts counting workspaces at 0.
lockfile=/tmp/.wspm.lockfile
if ( set -o noclobber; echo "locked" > "$lockfile") 2> /dev/null; then
trap 'rm -f "$lockfile"; exit $?' INT TERM EXIT
echo "Locking succeeded" >&2
###### EDIT THESE VALUES
NUMBER_WORKSPACES=4
WORKSPACE_WALL[0]="/usr/share/backgrounds/Aquarius.svg"
WORKSPACE_WALL[1]="/usr/share/backgrounds/stars.jpg"
WORKSPACE_WALL[2]="/home/amberella/Pictures/VictoriAlisha-Amberella/alisha photos1_files/Alisha Dodd glamorous.jpg"
WORKSPACE_WALL[3]="/home/amberella/Pictures/VictoriAlisha-Amberella/alisha photos1_files/alishasummer1-13viorbs.jpg"
###### DO NOT EDIT BELOW
CURRENT_WORKSPACE=$(wmctrl -d | grep \* | cut -d' ' -f1)
while true
do
sleep 1
NEW_WORKSPACE=$(wmctrl -d | grep \* | cut -d' ' -f1)
if [ $CURRENT_WORKSPACE -ne $NEW_WORKSPACE ]; then
wmctrl -s $NEW_WORKSPACE
xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/image-path -s "${WORKSPACE_WALL[$NEW_WORKSPACE]}"
CURRENT_WORKSPACE=$NEW_WORKSPACE
fi
done
rm -f "$lockfile"
else
echo "Lock failed - exit" >&2
exit 1
fi
Offline
Assuming that the wrapped lines are because of the post here and are not wrapped in the actual script, the script looks good. Is it still not working (as it should work)?
What did you name the file and where did you save it?
Is it currently running. You can use "ps -ef | grep <NAME>" where <NAME> is the name of the script to check. For example:
toz@xubi:~$ ps -ef | grep wspm
toz 753 696 0 13:07 pts/0 00:00:00 /bin/bash /home/toz/bin/wspm
toz 851 780 0 13:07 pts/2 00:00:00 grep wspm
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Assuming that the wrapped lines are because of the post here and are not wrapped in the actual script, the script looks good. Is it still not working (as it should work)?
What did you name the file and where did you save it?
Is it currently running. You can use "ps -ef | grep <NAME>" where <NAME> is the name of the script to check. For example:
toz@xubi:~$ ps -ef | grep wspm
toz 753 696 0 13:07 pts/0 00:00:00 /bin/bash /home/toz/bin/wspm
toz 851 780 0 13:07 pts/2 00:00:00 grep wspm
jimwg@bluemint1 ~ $ ps -ef | grep workspace-wall-change
jimwg 1867 1 0 13:11 ? 00:00:00 /bin/sh /home/jimwg/.scripts/workspace-wall-change
jimwg 10022 7165 0 13:36 pts/2 00:00:00 grep --colour=auto workspace-wall-change
jimwg@bluemint1 ~ $
I wish I knew were in the command chain it is broken. Could be because I'm concurrently running other things in the background or have other user accounts as well? Or that I'm running Xfce which is fully installed on a flash drive? I'm just a newbie running all the angles! Thanks for putting up!
Offline
Okay lets try this. Here is a version of the script with debug commands in it:
#!/bin/bash
# The Poor Man's Desktop/Workspace solution - DEBUG Version
# Requires: wmctrl
# Make sure you edit the NUMBER_WORKSPACES and WORKSPACE_WALL array to suit.
# Remember: wmctrl starts counting workspaces at 0.
echo "wspm DEBUG: starting - $@" > /tmp/wspmDEBUG
lockfile=/tmp/.wspm.lockfile
if ( set -o noclobber; echo "locked" > "$lockfile") 2> /dev/null; then
trap 'rm -f "$lockfile"; exit $?' INT TERM EXIT
echo "wspm DEBUG: Locking succeeded" >> /tmp/wspmDEBUG
###### EDIT THESE VALUES
NUMBER_WORKSPACES=4
echo "wspm DEBUG: NUMBER_WORKSPACE = "$NUMBER_WORKSPACES >> /tmp/wspmDEBUG
WORKSPACE_WALL[0]="/usr/share/backgrounds/Aquarius.svg"
echo "wspm DEBUG: WORKSPACE_WALL[0] = ${WORKSPACE_WALL[0]}" >> /tmp/wspmDEBUG
echo "wspm DEBUG: WORKSPACE_WALL[0]_file =" $(file "${WORKSPACE_WALL[0]}") >> /tmp/wspmDEBUG
WORKSPACE_WALL[1]="/usr/share/backgrounds/stars.jpg"
echo "wspm DEBUG: WORKSPACE_WALL[1] = ${WORKSPACE_WALL[1]}" >> /tmp/wspmDEBUG
echo "wspm DEBUG: WORKSPACE_WALL[1]_file =" $(file "${WORKSPACE_WALL[1]}") >> /tmp/wspmDEBUG
WORKSPACE_WALL[2]="/home/amberella/Pictures/VictoriAlisha-Amberella/alisha photos1_files/Alisha Dodd glamorous.jpg"
echo "wspm DEBUG: WORKSPACE_WALL[2] = ${WORKSPACE_WALL[2]}" >> /tmp/wspmDEBUG
echo "wspm DEBUG: WORKSPACE_WALL[2]_file =" $(file "${WORKSPACE_WALL[2]}") >> /tmp/wspmDEBUG
WORKSPACE_WALL[3]="/home/amberella/Pictures/VictoriAlisha-Amberella/alisha photos1_files/alishasummer1-13viorbs.jpg"
echo "wspm DEBUG: WORKSPACE_WALL[3] = ${WORKSPACE_WALL[3]}" >> /tmp/wspmDEBUG
echo "wspm DEBUG: WORKSPACE_WALL[3]_file =" $(file "${WORKSPACE_WALL[3]}") >> /tmp/wspmDEBUG
###### DO NOT EDIT BELOW
CURRENT_WORKSPACE=$(wmctrl -d | grep \* | cut -d' ' -f1)
echo "wspm DEBUG: CURRENT_WORKSPACE = "$CURRENT_WORKSPACE >> /tmp/wspmDEBUG
while true
do
sleep 1
NEW_WORKSPACE=$(wmctrl -d | grep \* | cut -d' ' -f1)
echo "wspm DEBUG: NEW_WORKSPACE = "$NEW_WORKSPACE >> /tmp/wspmDEBUG
if [ $CURRENT_WORKSPACE -ne $NEW_WORKSPACE ]; then
wmctrl -s $NEW_WORKSPACE
xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/image-path -s "${WORKSPACE_WALL[$NEW_WORKSPACE]}"
echo "wspm DEBUG: xfconf-query = "$(xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/image-path) >> /tmp/wspmDEBUG
CURRENT_WORKSPACE=$NEW_WORKSPACE
echo "wspm DEBUG: new CURRENT_WORKSPACE = "$CURRENT_WORKSPACE >> /tmp/wspmDEBUG
fi
done
rm -f "$lockfile"
else
echo "Lock failed - exit" >&2
exit 1
fi
Here is what I want you to do:
1. Kill the running process:
killall workspace-wall-change
2. Copy and Paste the debug version above in place of the last script and save the file.
3. Open a terminal window and run:
workspace-wall-change
...depending on where you saved it, you may need to specify the whole path to the script.
4. Change to another workspace then change back.
5. Press Ctrl+C in the terminal window to terminate the program.
6. Post back the contents of /tmp/wspmDEBUG.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Here is what I want you to do:
1. Kill the running process:killall workspace-wall-change
2. Copy and Paste the debug version above in place of the last script and save the file.
3. Open a terminal window and run:workspace-wall-change
...depending on where you saved it, you may need to specify the whole path to the script.
4. Change to another workspace then change back.
5. Press Ctrl+C in the terminal window to terminate the program.
6. Post back the contents of /tmp/wspmDEBUG.
I can't even seem to get to first base here. Is it acting like it can't even find workspace-wall-change to work on it?
jimwg@bluemint1 ~ $ killall workspace-wall-change
workspace-wall-change: no process found
jimwg@bluemint1 ~ $ file:///home/jimwg/.scripts/workspace-wall-change
bash: file:///home/jimwg/.scripts/workspace-wall-change: No such file or directory
jimwg@bluemint1 ~ $
jimwg@bluemint1 ~ $ killall /home/jimwg/.scripts/workspace-wall-change
/home/jimwg/.scripts/workspace-wall-change: no process found
jimwg@bluemint1 ~ $ /home/jimwg/.scripts/workspace-wall-change
Lock failed - exit
jimwg@bluemint1 ~ $ cd /home/jimwg/.scripts/workspace-wall-change
bash: cd: /home/jimwg/.scripts/workspace-wall-change: Not a directory
jimwg@bluemint1 ~ $ cd /home/jimwg/.scripts/workspace-wall-change
bash: cd: /home/jimwg/.scripts/workspace-wall-change: Not a directory
jimwg@bluemint1 ~ $ cd /home/jimwg/.scripts/
jimwg@bluemint1 ~/.scripts $ killall workspace-wall-change
workspace-wall-change: no process found
jimwg@bluemint1 ~/.scripts $ workspace-wall-change
workspace-wall-change: command not found
jimwg@bluemint1 ~/.scripts $ workspace-wall-change
Offline
jimwg@bluemint1 ~ $ /home/jimwg/.scripts/workspace-wall-change
Lock failed - exit
Either:
1. workspace-wall-change is running,
2. another version of this script (possibly called something else) has a hold on the lock file, or
3. the lock file is stale (which shouldn't have happened).
Did you run a version of this script under a different name and is it possible that it is still running? If so, then "killall <that_name>".
Otherwise, try this:
First, make sure the script isn't running:
killall workspace-wall-change
...then try deleting the lock file:
rm /tmp/.wspm.lockfile
...then try running the script again:
/home/jimwg/.scripts/workspace-wall-change
Last edited by ToZ (2013-06-25 23:04:01)
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
jimwg@bluemint1 ~ $ /home/jimwg/.scripts/workspace-wall-change
Lock failed - exitEither:
1. workspace-wall-change is running,
2. another version of this script (possibly called something else) has a hold on the lock file, or
3. the lock file is stale (which shouldn't have happened).Did you run a version of this script under a different name and is it possible that it is still running? If so, then "killall <that_name>".
Otherwise, try this:
First, make sure the script isn't running:
killall workspace-wall-change
...then try deleting the lock file:
rm /tmp/.wspm.lockfile
...then try running the script again:
/home/jimwg/.scripts/workspace-wall-change
====================================
Okay, appears that the deleting lock file trick was the one to get it going! Looks good, but just some heads-up if there was any side-effects to all this troubleshooting. On first boot-up (Xfce fully installed on flash drive BTW if it matters) I received alerts that might have nothing to do with this wallpaper issue in case of coincidence but just thought you ought know;
On the first screen I made it on a fresh new XFCE screen since other session choices seemed deleted. A alert from Dropbox, first saying that it had error mounted in the wrong place then shortly after asking me to reauthorize. Same warning from Web browser, acting like briefly didn't want to load. Didn't repeat after second boot, but during second boot got this:
/dev/sdb1: Unexpected inconsistency. Run FSCK manually. Mountall: filesystem has errors. Skipping mounting since Plymouth not available. /dev/sdb1: Inodes that were part of a corrupted orphan linked list found.
I let it run through and clear itself up. Seems okay so far. I'll keep you abreast on this progress. Again, these might have nothing to do with the workspace-wallpaper issue, just an under-maintained drive
A few things for your talents to consider: Is there anyway to scale/re-size each workspace image independently? And any optional way to have a workspace run the desktop wallpaper slideshow list?
Good job!
Jim in NYC
Offline
Glad to hear you got it working. Just a heads up, make sure you are not running the DEBUG version of the script - the log file will fill up quickly using up valuable disk space.
I do not believe this script has anything to do with the messages you received - they are just not related.
A few things for your talents to consider: Is there anyway to scale/re-size each workspace image independently?
What exactly do you mean by "scale/re-size each workspace image independently"? In the desktop settings dialog you can specify the style (auto, centered, tiled, stretched, scaled, zoomed) for the images, or are you thinking that you would like to specify a different style for each wallpaper?
And any optional way to have a workspace run the desktop wallpaper slideshow list?
Yes. For the workspace that you want the slide show, set the image to "/home/jimwg/.config/xfce4/desktop/backdrop.list". Of course, you will have to have created the backdrop list first. You should be able to create other indepedent backdrop lists and specify them as well. Look at the content and format of the default one and create your own based on it (e.g. backdrop1.list backdrop2.list, etc)
Time permitting, I'll have a look and see what I can do.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Okay. Here is the next version. Changes include:
1. You don't have to specify the number of workspaces anymore. It was redundant. The script will cycle through all existing ones.
2. I've added 3 configuration parameters for each workspace:
- WALL = the image name or the name of the backdrop list file (for the slideshow)
- STYLE = the image style (0=auto, 1=centered, 2=tiled, 3=stretched, 4=scaled, 5=zoomed)
- CYCLETIMER = if a backdrop list is specified, the time in munites to cycle the images.
3. I've removed the confusion regarding workspaces numbers and the way wmctrl handles workspaces. Workspace #1 is workspace #1. The wmctrl conversion is handled internally by the script.
To upgrade from version 1:
1. "killall <script>" (where <script> is the name of the currently running script)
2. copy/paste/save the script over the existing one
3. start it up again.
To install new:
1. save the code below to a file (e.g. $HOME/bin/wspm)
2. make the file executable
3. start it manually when you want to use it or add it to your startup applications for automatic use.
Here is version 2:
#!/bin/bash
# The Poor Man's Desktop/Workspace solution (version 2)
# Requires: wmctrl
# Make sure you edit the WORKSPACE configuration parameters to suit.
# debug mode = bash -xv /path/to/wspm 2>&1 | tee wspm.log
# make sure that only one instance of this script is running
lockfile=/tmp/.wspm.lockfile
if ( set -o noclobber; echo "locked" > "$lockfile") 2> /dev/null; then
trap 'rm -f "$lockfile"; exit $?' INT TERM EXIT
echo "wspmDEBUG: Locking succeeded" >&2
######### EDIT THESE VALUES #############################################################################
### #
### WORKSPACE_WALL -> image file or backdrop list (slideshow images) #
### WORKSPACE_STYLE -> 0=auto, 1=centered, 2=tiled, 3=stretched, 4=scaled, 5=zoomed #
### WORKSPACE_CYCLETIMER -> for background slideshow, spceify how often in minutes to cycle image #
### #
### Note: You need one set of configuration parameters for each available workspace #
### #
### Workspace #1 #
WORKSPACE_WALL[1]="/home/toz/Pictures/avatars/avatar.png" #
WORKSPACE_STYLE[1]=1 #
WORKSPACE_CYCLETIMER[1]=0 #
### Workspace #2 #
WORKSPACE_WALL[2]="/home/toz/Pictures/avatars/avatar.png" #
WORKSPACE_STYLE[2]=2 #
WORKSPACE_CYCLETIMER[2]=0 #
### Workspace #3 #
WORKSPACE_WALL[3]="/home/toz/Pictures/avatars/avatar.png" #
WORKSPACE_STYLE[3]=3 #
WORKSPACE_CYCLETIMER[3]=0 #
### Workspace #4 #
WORKSPACE_WALL[4]="/home/toz/.config/xfce4/desktop/backdrop.list" #
WORKSPACE_STYLE[4]=0 #
WORKSPACE_CYCLETIMER[4]=1 #
####################################################################################################
######### DO NOT EDIT BELOW #############################################################################
CURRENT_WORKSPACE=0
while true
do
NEW_WORKSPACE=$(($(wmctrl -d | grep \* | cut -d' ' -f1)+1))
if [ $CURRENT_WORKSPACE -ne $NEW_WORKSPACE ]; then
wmctrl -s $((($NEW_WORKSPACE)-1))
xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/image-path -s "${WORKSPACE_WALL[$NEW_WORKSPACE]}"
xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/image-style -s "${WORKSPACE_STYLE[$NEW_WORKSPACE]}"
xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/backdrop-cycle-timer -s "${WORKSPACE_CYCLETIMER[$NEW_WORKSPACE]}"
CURRENT_WORKSPACE=$NEW_WORKSPACE
fi
sleep 1
done
rm -f "$lockfile"
else
echo "wspmDEBUG: Lock failed - exit" >&2
exit 1
fi
Last edited by ToZ (2013-07-01 04:09:25)
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
ToZ
I'm having a problem beyond not getting switchable workspace wallpapers. Tried to open a workspace panel of freshly booted Workspace Switcher and got this:
Failed to execute child process "xfwm4-workspace-settings" (No such file or directory)
Certain icons and button symbols are no longer appearing on Seamonkey's browser window as well. Occurs on all accounts on drive. How do I repair this? Thanks!
Jim in NYC
Offline
Have a look at your ~/.xsession-errors log file for hints as to what is happening. You could try clearing out your sessions cache:
If you are using Xfce 4.10, you should have a "Clear Saved Sessions" button located at "Settings Manager -> Sessions and Startup -> Session. Log out and back in again to see if it works.
If not, you can do it manually:
1. Log out.
2. Go to first tty (Ctrl+Alt+F1)
3. Log in to the text console
4. Run the following commands:
cd $HOME/.cache
rm -rf sessions
5. Go back to the gui login (Ctrl+Alt+F7)
6. Log in again.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Have a look at your ~/.xsession-errors log file for hints as to what is happening. You could try clearing out your sessions cache:
If you are using Xfce 4.10, you should have a "Clear Saved Sessions" button located at "Settings Manager -> Sessions and Startup -> Session. Log out and back in again to see if it works.
If not, you can do it manually:
1. Log out.
2. Go to first tty (Ctrl+Alt+F1)
3. Log in to the text console
4. Run the following commands:cd $HOME/.cache rm -rf sessions
5. Go back to the gui login (Ctrl+Alt+F7)
6. Log in again.
Very good, ToZ!
Would you know how I can inform XFCE honchos and developers about your refinements of the "Poor Man's Desktop/Workspace solution (version 2)" script? All you hear on Linux sites is that you could only use KDE to do what it does, giving workspaces their own wallpaper backgrounds. I would think this feature is a big XFCE plus!
Jim in NYC
Last edited by jimwg (2013-07-08 22:49:50)
Offline
They are already working on it - a much better version that is integrated with xfdesktop (mine is just a sloppy work around). Here is the bug report: https://bugzilla.xfce.org/show_bug.cgi?id=369 and here is the git location of the code: http://git.xfce.org/xfce/xfdesktop/log/ … provements. Currently it sits in a branch off of master, so you need to do some fancy compiling if you want to get it to work.
Or we can wait until it becomes an official part of Xfce.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Pages: 1
[ Generated in 0.021 seconds, 7 queries executed - Memory usage: 792.28 KiB (Peak: 873.56 KiB) ]