Different background for each workspace?
Forum rules
LMDE 2 has reached end of support as of 1-1-2019
LMDE 2 has reached end of support as of 1-1-2019
Re: Different background for each workspace?
Yes there is a small delay for the image to load after the workspace switch (less than a second on my system). The script and wallpapoz work at the command line level - the current desktop image is replaced by another one. For a minimal delay switch, the images probably would be stored in memory but that probably requires some coding at a lower level which is beyond my knowledge. Things change fast, maybe some Mint developper will look into this and a solution will appear soon.
In the meantime I can live with a small delay for a non-critical feature.
In the meantime I can live with a small delay for a non-critical feature.
Re: Different background for each workspace?
That what I thought
I'm not a programer at all (except a basic cumputer class in tech college, PREMSwindows era, was MSDOS tho)
I feel old
J.Jay
I'm not a programer at all (except a basic cumputer class in tech college, PREMSwindows era, was MSDOS tho)
I feel old
J.Jay
Re: Different background for each workspace?
If it will make you feel any better, my BASIC class was on a TRS-80 Model III... We were fancy because one of our computers had two
720Mb floppy drives.
Sent from my SPH-D710 using Tapatalk 2
720Mb floppy drives.
Sent from my SPH-D710 using Tapatalk 2
Try politeness; people will like you for it.
Re: Different background for each workspace?
Most in class were commodore 64er I think their was a pet also. If remember they (the school) was getting Colts next year. And other classroom had 'apple 2s
J.Jay
J.Jay
Re: Different background for each workspace?
Ah, good times... I didn't get a C-64 until I was 19 or 20. I went all out and got the monitor and dual floppy drives.
Sent from my SPH-D710 using Tapatalk 2
Sent from my SPH-D710 using Tapatalk 2
Try politeness; people will like you for it.
Re: Different background for each workspace?
Ah, good times... I didn't get a C-64 until I was 19 or 20. I went all out and got the monitor and dual floppy drives.
Yea I was out of HS when go into computer (dad bought me C128) I didn't but new of Tandy users! Were about even but you edged be out earlier
J.Jay
P.S went thru Amigaland to BEOS (actually Win 95 played back to BEOS) Back to Windowsworld finally Linux (I think desktop Linux was pretty new/geeky)
Sorry long-winded (off topic and nostalgic) (had birthday month ago ) Had older friend had one of those cassette/storage things.
Yea I was out of HS when go into computer (dad bought me C128) I didn't but new of Tandy users! Were about even but you edged be out earlier
J.Jay
P.S went thru Amigaland to BEOS (actually Win 95 played back to BEOS) Back to Windowsworld finally Linux (I think desktop Linux was pretty new/geeky)
Sorry long-winded (off topic and nostalgic) (had birthday month ago ) Had older friend had one of those cassette/storage things.
Re: Different background for each workspace?
I'm the original poster. I have LMDE 64 bit with MATE.
I downloaded and installed Wallpapoz, and I can run the GUI.
I have defined a directory of images for each workspace, and I saved my changes.
Then I clicked Daemon->restart. I change workspaces and the background stays the same.
The image is supposed to change after one minute, but it does not.
What obvious thing am I missing? The background I get is the same one I had before,
which was selected by issuing the command: mate-appearance-properties %F
Thanks in advance.
I downloaded and installed Wallpapoz, and I can run the GUI.
I have defined a directory of images for each workspace, and I saved my changes.
Then I clicked Daemon->restart. I change workspaces and the background stays the same.
The image is supposed to change after one minute, but it does not.
What obvious thing am I missing? The background I get is the same one I had before,
which was selected by issuing the command: mate-appearance-properties %F
Thanks in advance.
Re: Different background for each workspace?
sorry away doing other things for few days...
only one monitor/display? or have external monitor hooked to laptop ect.?
on mate I have not used since very early version (was very gnome2 compatible) I'll try on newer (1.4 version) of mate
J.Jay
P.S. the first wallpaper will be your 'wallpaper set in mate preferences' the 'walpapoz' ones doesn't take effect till the 1st change to a different desktop (& back). (you can get around that by setting wallpaper the same as 1st in walpapoz the same)
have you saved changes before restart daemon?I'm the original poster. I have LMDE 64 bit with MATE.
I downloaded and installed Wallpapoz, and I can run the GUI.
I have defined a directory of images for each workspace, and I saved my changes.
Then I clicked Daemon->restart. I change workspaces and the background stays the same.
The image is supposed to change after one minute, but it does not.
What obvious thing am I missing? The background I get is the same one I had before,
which was selected by issuing the command: mate-appearance-properties %F
only one monitor/display? or have external monitor hooked to laptop ect.?
on mate I have not used since very early version (was very gnome2 compatible) I'll try on newer (1.4 version) of mate
J.Jay
P.S. the first wallpaper will be your 'wallpaper set in mate preferences' the 'walpapoz' ones doesn't take effect till the 1st change to a different desktop (& back). (you can get around that by setting wallpaper the same as 1st in walpapoz the same)
Re: Different background for each workspace?
Sorry...
Does work on LMDE (Xfce) 4.10 (currently using) 4.6 & 4.8 and Hopefully 4.12 when out. also Debians based on squeeze (still gnome2) repos such as 'solus,snow3 ect.
J.Jay
P.S. I use walpapoz 0.6.2 (I think not being worked on anymore)
can't get work on current mate (1.4) May be code just needs new name for packages? (I'm not a coder unfortunately)on mate I have not used since very early version (was very gnome2 compatible) I'll try on newer (1.4 version) of mate
Does work on LMDE (Xfce) 4.10 (currently using) 4.6 & 4.8 and Hopefully 4.12 when out. also Debians based on squeeze (still gnome2) repos such as 'solus,snow3 ect.
J.Jay
P.S. I use walpapoz 0.6.2 (I think not being worked on anymore)
Mint 16 / MATE
For anyone using Linux Mint 16 with the MATE desktop, here' a small tweak to Garolou's script above (it was for Mint 13 with Cinnamon).
In function setdesktop(), change the gsettings command to read:
There's still a one-second delay every time the background is updated, but it's happening outside of the script. Probably some MATE daemon's scan interval, but I couldn't track it down.
P.S. Nice to see some other old timers here. I got my start on the Apple II+ - great machine. Spent a little time on the TRS-80 Model III as well. My high school got its first computer lab the year *after* I graduated
In function setdesktop(), change the gsettings command to read:
Code: Select all
gsettings set org.mate.background picture-filename "$desktop_dir$1"
P.S. Nice to see some other old timers here. I got my start on the Apple II+ - great machine. Spent a little time on the TRS-80 Model III as well. My high school got its first computer lab the year *after* I graduated
Re: Different background for each workspace? openbox too
Yes I know this is an old thread But I wanted to thank garolou for sharing his code, and share with him the modifications I made to make this work in openbox on a Mageia Linux System... Since he doesn't accept private messages, this is my best option for doing so...
The script had to be modified to use a different background setting tool for openbox. And since I use 12 desktop areas, I had to modify the while loop to handle both 1 and 2 digit array index values.
I'd like to properly credit garolou for the initial code, but this thread is the closest I'm able to come to that. See http://murga-linux.com/puppy/viewtopic. ... 539#764539...
My Openbox compatible code follows:
Thanks garolou. Your code helped me a LOT.garolou wrote:Hello everyone,
I just moved from Ubuntu 11.10 to Mint 13 cinnamon. The desktop environment here is more of what I'm looking for. I like the idea of having a different background for each workspace also... so I spent a day to figure out a way to do it - It's not perfect but pretty close.
The script basically monitors a 'change of workspace' and resets the background image to your choice.
Modify the paths and image names appropriately.Code: Select all
#!/bin/bash # Workspace desktop image switcher WDIS 1.0 # Script to change the desktop image when switching workspaces. # Tested on Linux Mint 13 'cinnamon' desktop_dir="/home/username/.cinnamon/backgrounds/" # full path to images directory; desktop_img[0]="boat.jpg" desktop_img[1]="boat_mirror.jpg" desktop_img[2]="" desktop_img[3]="" # add more images if using more workspaces setdesktop() { gsettings set org.gnome.desktop.background picture-uri "file://$desktop_dir$1" } xprop -root -spy _NET_CURRENT_DESKTOP | ( while read -r; do desk=${REPLY:${#REPLY}-1:1} setdesktop ${desktop_img[$desk]} done )
Let me know if there is any way I can improve the code.
Cheers
The script had to be modified to use a different background setting tool for openbox. And since I use 12 desktop areas, I had to modify the while loop to handle both 1 and 2 digit array index values.
I'd like to properly credit garolou for the initial code, but this thread is the closest I'm able to come to that. See http://murga-linux.com/puppy/viewtopic. ... 539#764539...
My Openbox compatible code follows:
Code: Select all
#based on an original script posted to linuxmint forum by garolou
#[url]http://forums.linuxmint.com/viewtopic.php?p=672189#p672189[/url]
# Script to change the desktop image when switching workspaces.
# Tested on Mageia release 3 (Official) for x86_64 Kernel 3.10.28-desktop-1.mga3
# desktop_dir="/usr/share/backgrounds/" # full path to images directory;
desktop_dir="$HOME/0bg/" # full path to images directory;
desktop_img[0]="ChillyLickingGood2001.jpg"
desktop_img[1]="z_optic2.png"
desktop_img[2]="metruck.jpg"
desktop_img[3]="greydragon.png"
desktop_img[4]="ShiloWannaPlay0273.jpg"
desktop_img[5]="snapshot-dragon-storm.png"
desktop_img[6]="DragonlySkyscapes-014.jpg"
desktop_img[7]="DragonlySkyscapes-016.jpg"
desktop_img[8]="FantaScene-006.jpg"
desktop_img[9]="DragonlySkyscapes-018.jpg"
desktop_img[10]="DragonlySkyscapes-019.jpg"
desktop_img[11]="jungle.png"
# add more images if using more workspaces
setdesktop() {
# => test
# display "$desktop_dir$1"
# => Mageia
feh --bg-scale "$desktop_dir$1"
# => fatdog
# wallpaper "$desktop_dir$1"
}
xprop -root -spy _NET_CURRENT_DESKTOP | (
while read -r; do
desk=${REPLY:${#REPLY}-2:2}
case $desk in
[0-9][0-9]) setdesktop ${desktop_img[$desk]};;
*)desk=${REPLY:${#REPLY}-1:1};
setdesktop ${desktop_img[$desk]};;
esac
done
)
Re: Different background for each workspace?
Welcome to the forums.
I am assuming that you want to use one of the scripts provided in this thread.
Basically, you want to use a text editor such as gedit to create a file with the script in it. In the case of the scripts seen in this thread, one would copy the entire contents of the 'CODE' box and paste it into the text editor and then save that under a file name.
Then, you would have to modify the properties of that file so that it is executable.
I am assuming that you want to use one of the scripts provided in this thread.
Basically, you want to use a text editor such as gedit to create a file with the script in it. In the case of the scripts seen in this thread, one would copy the entire contents of the 'CODE' box and paste it into the text editor and then save that under a file name.
Then, you would have to modify the properties of that file so that it is executable.
Try politeness; people will like you for it.
Re: Different background for each workspace?
One more question. How to set the wallpaper streched in this script?
Re: Different background for each workspace?
I wouuld think that it would either be a setting in Cinnamon, or you'd want to make your wallpapers the same size as your desktop ahead of time.
Try politeness; people will like you for it.
Re: Different background for each workspace?
To get your background to be stretched, put the following line in your script after the line where you set the background:
HTH.
Code: Select all
gsettings set org.gnome.desktop.background picture-options 'stretched'
Re: Different background for each workspace?
Slight update to work on Cinnamon in ver 17.1
I was unable to properly escape spaces in the filenames for desktop_img[x]= Probably just slowness on my part...
Save the script to a file, I call it bgswitcher.sh
make it executable ( chmod +x bgswitcher.sh )
Then add it to Startup Applications in System settings. Include the ampersand (&) after the path so that it runs in the background.
Now when you log in, you're all set.
I was unable to properly escape spaces in the filenames for desktop_img[x]= Probably just slowness on my part...
Code: Select all
#!/bin/bash
# Workspace desktop image switcher WDIS 1.0
# Script to change the desktop image when switching workspaces.
# Tested on Linux Mint 13 'cinnamon'
# update -2015-2-14 switch to org.cinnamon.desktop.background; tweak desktop_dir; tested on Linux Mint 17.1 cinnamon
desktop_dir=~/.cinnamon/backgrounds/ # full path to images directory;
desktop_img[0]="Galaxy.jpg"
desktop_img[1]="Brushes.jpg"
desktop_img[2]="Shapes.jpg"
desktop_img[3]="Rice_Paddy.jpg"
# add more images if using more workspaces
setdesktop() {
gsettings set org.cinnamon.desktop.background picture-uri "file://${desktop_dir}${1}"
}
xprop -root -spy _NET_CURRENT_DESKTOP | (
while read -r; do
desk=${REPLY:${#REPLY}-1:1}
#echo "DESKTOP = $desk"
setdesktop ${desktop_img[${desk}]}
done
)
make it executable ( chmod +x bgswitcher.sh )
Then add it to Startup Applications in System settings. Include the ampersand (&) after the path so that it runs in the background.
Now when you log in, you're all set.
-
- Level 3
- Posts: 120
- Joined: Fri Jan 18, 2013 10:28 am
- Location: Germany - Wilhelmshaven & Frankfurt
- Contact:
Re: Different background for each workspace?
Garalou's script works fine in Cinnamon 17.1 for me.
Fast enough even on my 6 year old Thinkpad.
If you'd create a RAM disk at startup and copy your backgrounds to it,
switching will even be faster.
But the whole thing would be much nicer if you could also have different sets of icons per workplace,
e.g. links to manuals, sources and dev tools for your developer workplace,
music, videos and audio software for your creative workplace ...
Couldn't the desktop config file be copied and switched per workplace, too?
Added:
When switching workplaces, the task bar does only show programs active on this workplace,
so the list of active programs, and/or the taskbar must be stored somewhere and switched over.
That may be a entry point to start switching the background and the set of desktop icons, too.
Fast enough even on my 6 year old Thinkpad.
If you'd create a RAM disk at startup and copy your backgrounds to it,
switching will even be faster.
But the whole thing would be much nicer if you could also have different sets of icons per workplace,
e.g. links to manuals, sources and dev tools for your developer workplace,
music, videos and audio software for your creative workplace ...
Couldn't the desktop config file be copied and switched per workplace, too?
Added:
When switching workplaces, the task bar does only show programs active on this workplace,
so the list of active programs, and/or the taskbar must be stored somewhere and switched over.
That may be a entry point to start switching the background and the set of desktop icons, too.
Last edited by mideal on Wed May 20, 2015 12:59 pm, edited 1 time in total.
Yoga 910 16GB/2TB running Mint 20.3 Cinnamon 64Bit
__________________________
…trust me - I’m the sunscreen.
__________________________
…trust me - I’m the sunscreen.