[SOLVED] Different Backgrounds, Desktop Icons for Different Workspaces (LM20.x, LM21.x Cinn, Mate, XFCE)

Write tutorials for Linux Mint here
More tutorials on https://github.com/orgs/linuxmint/discu ... /tutorials and (archive) on https://community.linuxmint.com/tutorial
Forum rules
Don't add support questions to tutorials; start your own topic in the appropriate sub-forum instead. Before you post read forum rules
dj1s
Level 2
Level 2
Posts: 54
Joined: Fri Jun 19, 2020 5:21 pm
Location: BC, Canada

Re: [SOLVED] Different Backgrounds, Icons on Different Workspaces (LM20.x Cinn, Mate, XFCE)

Post by dj1s »

I neglected to mention that you have to replace script variables like $1 with real values. $1 is the first parameter passed to the script. If $1 is 3, then
ln -sfn Desk3 Desktop
wmctrl -s 2

Did you run your tests after adding xfdesktop after the killall line? If xfdesktop had already been killed, then it is understandable that desktop ID might be invalid.
Un-Informed
Level 1
Level 1
Posts: 7
Joined: Sun Feb 27, 2022 12:23 pm

Re: [SOLVED] Different Backgrounds, Icons on Different Workspaces (LM20.x Cinn, Mate, XFCE)

Post by Un-Informed »

Well, I have rebuilt my system several times due to my learning curve. After a several fresh installs of Linux Mint 20.3 your solution has worked as presented each time :D . I am very happy with the results. Being curious I wondered why I had to re-customize my desktop icons on my second monitor to show icons. Solved that problem by adding another line to your script.

gsettings set org.nemo.desktop desktop-layout 'false::false' # comment NO desktop icons
gsettings set org.nemo.desktop desktop-layout 'true::false' # comment Desktop Icons on Primary Monitor Only
gsettings set org.nemo.desktop desktop-layout 'true::true' # comment Desktop Icons All Monitors

Had to spend some time learning about gsettings

Thank
dj1s
Level 2
Level 2
Posts: 54
Joined: Fri Jun 19, 2020 5:21 pm
Location: BC, Canada

Re: [SOLVED] Different Backgrounds, Icons on Different Workspaces (LM20.x Cinn, Mate, XFCE)

Post by dj1s »

@Un-Informed. Did you try replacing my last line with yours? I suspect it will work for the multi-monitor case without first invoking the single monitor case. Just curious, because I never explored that option.

I will likely add your observations to my tutorial. Thanks.
Un-Informed
Level 1
Level 1
Posts: 7
Joined: Sun Feb 27, 2022 12:23 pm

Re: [SOLVED] Different Backgrounds, Icons on Different Workspaces (LM20.x Cinn, Mate, XFCE)

Post by Un-Informed »

I commented out the the first two lines. I was thinking if I was traveling with the laptop it would be easier to comment or UN-comment a line.
dj1s
Level 2
Level 2
Posts: 54
Joined: Fri Jun 19, 2020 5:21 pm
Location: BC, Canada

Re: [SOLVED] Different Backgrounds, Icons on Different Workspaces (LM20.x Cinn, Mate, XFCE)

Post by dj1s »

Has something changed? I found I needed the false::false in order for gsettings to recognize a change to the icons.
Un-Informed
Level 1
Level 1
Posts: 7
Joined: Sun Feb 27, 2022 12:23 pm

Re: [SOLVED] Different Backgrounds, Icons on Different Workspaces (LM20.x Cinn, Mate, XFCE)

Post by Un-Informed »

My error, I was looking at a copy of the script when I posted. I have all 3 lines active ( not commented out)
hEarthKore
Level 1
Level 1
Posts: 1
Joined: Mon Jan 23, 2023 1:48 pm

Re: [SOLVED] Different Backgrounds, Desktop Icons for Different Workspaces (LM20.x, LM21.x Cinn, Mate, XFCE)

Post by hEarthKore »

Thank you for this great solution. Sadly it does not work on cinnamon 21.1. It shows only desktop folder not the desk1 or desk2 etc.. swithcing desks work, but with the same background image and icons (desk1, desk2 and background files are visible on desktop, not visible what is in Desk1 folder, only what is in Desktop folder). Maybe there is a cchange in cinnamon 21.1 how to deal with showing Desktop folders...

Anyway, thank you!
dj1s
Level 2
Level 2
Posts: 54
Joined: Fri Jun 19, 2020 5:21 pm
Location: BC, Canada

Re: [SOLVED] Different Backgrounds, Desktop Icons for Different Workspaces (LM20.x, LM21.x Cinn, Mate, XFCE)

Post by dj1s »

I see you just joined, so I can't tell what level of experience you have.

What steps did you take to verify that the scripts do not work for Cinnamon 2.1? The scripts work for me. I suspect you missed a step or made a change that you thought ought to work but doesn't. Most likely problem is failure to make Desktop a link.

I will be away from home computer for at least the next month. If anyone else can help, I would really appreciate it.
esoptron
Level 1
Level 1
Posts: 6
Joined: Sat Jul 15, 2023 10:44 pm

Re: [SOLVED] Different Backgrounds, Desktop Icons for Different Workspaces (LM20.x, LM21.x Cinn, Mate, XFCE)

Post by esoptron »

Can you add a tutorial for uninstalling this, please. I messed something up and I want to redo all the steps.
dj1s
Level 2
Level 2
Posts: 54
Joined: Fri Jun 19, 2020 5:21 pm
Location: BC, Canada

Re: [SOLVED] Different Backgrounds, Desktop Icons for Different Workspaces (LM20.x, LM21.x Cinn, Mate, XFCE)

Post by dj1s »

I don't see the value of writing a tutorial on uninstalling the solution at this time. And the moderators don't want issues raised in Tutorials. I'd rather help you directly. Private message me if you need help. What can you tell me about the problem you are having?

One way to mess up is if you accidentally link to Desktop0, which doesn't exist. Then, the Desktop shows your Home folder. This happened to me once and somehow the default location of "Desktop" got changed to Home. Edit ~/.config/user-dirs.dirs to ensure that the default folders are assigned correctly. Then reboot.
User avatar
twodogs
Level 4
Level 4
Posts: 320
Joined: Sat Jun 09, 2007 9:18 pm

Re: [SOLVED] Different Backgrounds, Desktop Icons for Different Workspaces (LM20.x, LM21.x Cinn, Mate, XFCE)

Post by twodogs »

Nice scripts. I'm running them on my 21.2 install.

Anyway I can hide the background link on my new desktops? Maybe hide it as a dotfile?

Thanks.
dj1s
Level 2
Level 2
Posts: 54
Joined: Fri Jun 19, 2020 5:21 pm
Location: BC, Canada

Re: [SOLVED] Different Backgrounds, Desktop Icons for Different Workspaces (LM20.x, LM21.x Cinn, Mate, XFCE)

Post by dj1s »

Of course! Just change the background file name in the scripts.
User avatar
watong
Level 1
Level 1
Posts: 27
Joined: Wed Jun 21, 2023 1:32 pm

Re: [SOLVED] Different Backgrounds, Desktop Icons for Different Workspaces (LM20.x, LM21.x Cinn, Mate, XFCE)

Post by watong »

Hello OP, thanks for your scripts and tutorial.

However, you can add me to the list of users who have the alt+numbers and alt+arrows options working, but can't make the custom backgrounds for each workspace function.

FWIW I have a file named "background" on each workspace. Also, I'm running 21.2.

Any help will be appreciated.
Lenovo ThinkPad T430 - Intel i5-3320M @ 2.6 GHz - 6 GB DDRAM - 480 GB SSD + 500 GB HDD - Linux Mint 21.2 w/ Cinnamon
Lenovo ThinkPad T470s - Intel i5-6300U @ 3 GHz - 8 GB DDRAM - 256 GB SSD - Linux Mint 21.2 w/ Cinnamon
dj1s
Level 2
Level 2
Posts: 54
Joined: Fri Jun 19, 2020 5:21 pm
Location: BC, Canada

Re: [SOLVED] Different Backgrounds, Desktop Icons for Different Workspaces (LM20.x, LM21.x Cinn, Mate, XFCE)

Post by dj1s »

Let's do this with private messages. Send me a copy of your switch-desk script.

As I mentioned in the tutorial and in another comment, the switch-desk script creates the background files. First you select the background you want in the normal way, then you change desktops to trigger the script to run. Return to the first desktop and the background should be the one you just selected. Do this for each desktop.

If you had manually created the background file, the script may not work. You can safely delete the background files and follow the above procedure.

Hope this helps. Let me know. Cheers.
rickNS
Level 9
Level 9
Posts: 2968
Joined: Tue Jan 25, 2011 11:59 pm

Re: [SOLVED] Different Backgrounds, Desktop Icons for Different Workspaces (LM20.x, LM21.x Cinn, Mate, XFCE)

Post by rickNS »

dj1s wrote: Sat Mar 09, 2024 12:22 pm Let's do this with private messages. Send me a copy of your switch-desk script.
Good work, Thanks.
I wonder though how people get this working as you say in the tutorial
"With your favourite text editor, create switch-desk in your $HOME folder. "

(I got it to work BTW) Should not the script be in ~/bin (where I put it) or ~/.local/bin as those directories get automatically added to PATH ?

EDIT, yes you corrected me.
Also, if I am not mistaken (again), keyboard shortcuts DO require full path
Last edited by rickNS on Sat Mar 09, 2024 8:47 pm, edited 1 time in total.
Mint 20.0, and 21.0 MATE on Thinkpads, 3 X T420, T450, T470, and X200
dj1s
Level 2
Level 2
Posts: 54
Joined: Fri Jun 19, 2020 5:21 pm
Location: BC, Canada

Re: [SOLVED] Different Backgrounds, Desktop Icons for Different Workspaces (LM20.x, LM21.x Cinn, Mate, XFCE)

Post by dj1s »

Thanks!
I learn something new every day. I did not consider the options available for putting the scripts in a place where they ought to be found. Your suggestions are valid and I will improve my tutorial after I test the best way to make the recommendations clear.

BTW, the scripts could be anywhere, as long as they are executable and pointed to by the shortcuts.
rickNS
Level 9
Level 9
Posts: 2968
Joined: Tue Jan 25, 2011 11:59 pm

Re: [SOLVED] Different Backgrounds, Desktop Icons for Different Workspaces (LM20.x, LM21.x Cinn, Mate, XFCE)

Post by rickNS »

dj1s wrote: Sat Mar 09, 2024 4:42 pm

BTW, the scripts could be anywhere, as long as they are executable and pointed to by the shortcuts.
Yes,...full path...I near forgot,
And is well explained in your step 5, I am sorry, no need for you to change anything.

Again good work on your very short, and efficient looking code.
Mint 20.0, and 21.0 MATE on Thinkpads, 3 X T420, T450, T470, and X200
User avatar
SMG
Level 25
Level 25
Posts: 31806
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: [SOLVED] Different Backgrounds, Desktop Icons for Different Workspaces (LM20.x, LM21.x Cinn, Mate, XFCE)

Post by SMG »

Moderator note: Runtoyru]'s issue can now be found here Different Backgrounds, Desktop Icons for Different Workspaces LM21.3.

Per the forum rules in pink/red under the topic title, "Don't add support questions to tutorials; start your own topic in the appropriate sub-forum". If you are having issues with a tutorial, please create a new topic and provide a link to the tutorial in your initial post.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
dj1s
Level 2
Level 2
Posts: 54
Joined: Fri Jun 19, 2020 5:21 pm
Location: BC, Canada

Re: [SOLVED] Different Backgrounds, Desktop Icons for Different Workspaces (LM20.x, LM21.x Cinn, Mate, XFCE)

Post by dj1s »

Updated today to take into account that users might have a language other than English. For example, for French users, the Desktop folder is named Bureau.
User avatar
Logansfury
Level 6
Level 6
Posts: 1181
Joined: Fri Oct 27, 2023 4:08 pm
Location: Las Vegas NV, USA

Re: [SOLVED] Different Backgrounds, Desktop Icons for Different Workspaces (LM20.x, LM21.x Cinn, Mate, XFCE)

Post by Logansfury »

This looks amazing! It's barely over a week I believe since I enabled the applet Workspace switcher, and one of the first things I thought when I tested it was how cool it would be to have a different wallpaper for each workspace.

I note multiple monitor issues have been very briefly mentioned. Both my linux boxes are running triple monitors. Will this work for me?
Image <-- Cick for sudo inxi --usb -Fxxxnmprz output, updated hourly!
Post Reply

Return to “Tutorials”