WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [info file] pcmanfm controls desktop bg, wallpaper and icon matters  (Read 2866 times)

aus9

  • Guest
Hi 

This post attempts to reduce size of info file for the pcmanfm TC64
Links do NOT need to be clicked, they are an extra aid for those struggling with my language

In this post I am a right handed mouse user so RC=right click would normally be used to bring up a
context menu if the Window Manager (=WM) supports it. Also Work Spaces (=WS) Background (=bg)

Goal 1 Have pcmanfm control your bg or wallpaper.
Goal 2 Allow WM to control context menu.
Goal 3 Allow pcmanfm use desktop icons and - or /usr/local/share/applications icons
Goal 4 Automate it if you like it

Before we try automation we start file manager in desktop mode by
Code: [Select]
pcmanfm --desktop &
Goal 1 Have pcmanfm control your bg or wallpaper.
You do not need to deactive .setbackground in your .xsession. pcmanfm desktop mode will draw over the top.

1.1 Change backgrounds
With pcmanfm we have the option to choose a colour through mouse clicks.
The option to use hex values is still allowed.

Either use RC or the menu system, start Desktop Preferences GUI.
It will start at Appearance tab
-> Pulldown wallpaper mode and select fill with background color only
https://imgur.com/gzfXKuo

-> Depending on the version of pcmanfm, there are options to click on various colours, change the RGB value of a selection,
use a grab tool and also input the hex value. v 1.3.1 then needs select button to be clicked.

I can paste any RGB value into its box while I still have custom box open.
Please ensure there is no white space preceding the value you are pasting or inputting.
Values can be found on the net eg https://www.rapidtables.com/web/color/RGB_Color.html
https://imgur.com/TiDaDWP

1.2 Change to a wallpaper, image formats I have tested include:
-bmp
-jpg (or jpeg)
-pbm
-tiff
-xbm
-xpm

If your wallpaper is not the same size as your current monitor resolution,
you may need to tile or stretch or if too large - crop.
Optional use a TCE like mtpaint to rescale it?

In desktop preferences
-> Pulldown and choose wallpaper mode
-> LC the little folder icon on the wallpaper section and navigate to your wallpaper(s).

If you have more than one WS, repeat the process by clicking on each WS and
repeating desktop preferences if you want different wallpapers per WS.

or Tick the box to allow same wallpaper across all WS.

You can see other options in Appearances which I leave to you to discover.
https://imgur.com/MDjmb14

Goal 2 Allow WM to control context menu.
Menu is affected by the WM, so you may prefer one WM over another. If you disallow context menu, your options may be
limited unless you have a feature rich WM or independent TCE such as:
wbar
panel
tray
dmenu

With Desktop Preferences GUI
-> LC on tab for Advanced
-> LC to tick the box for show menus provided by window managers when desktop clicked.
Using other methods are hinted above are not discussed here.
https://imgur.com/TVIh0eO

Goal 3 Allow pcmanfm use desktop icons and -or  /usr/local/share/applications icons
Lets pretend you want a quick way of getting icons on your desktop?

3.1 Load all TCEs that you might use on a regular basis.

3.2 Now copy icons from /usr/local/share/applications to Desktop using your fav file manager
There are many ways of doing this, my way is open to that dir
-> I select all icons by keyboard combo Ctrl +a
-> Copy to clipboard by Ctrl + c
-> LC the Desktop dir and paste all icons with Ctrl + v

3.3 LC new desktop icons will likely lead you to a popup asking you for some actions
https://imgur.com/J3hgJx0

Fix this in pcmanfm by
-> Pulldown Edit
-> LC Preferences
-> LC box to tick so Don't ask options on launch executable file
https://imgur.com/IjtxjHu

There is no need to change file permissions under Desktop.
And doing so makes no difference if you have not ticked the Don't ask box!

3.4 On reboot, any TCE associated with a Desktop icon will display a "broken" image
if not in your boot list
https://imgur.com/tzSh9EN

Manually loading the missing TCE will not change the icon until you exit to prompt and then run
Code: [Select]
startx
3.5 If you have already got a TCE open, go to another WS, click on a desktop icon and nothing appears to happen.
It is likely it is actioned in the already opened TCE on the other WS.

If you want to avoid that, because you can afford to have 2 or more instances of that TCE running etc
you can change the preferences so each icon click will force the TCE to open in a separate window.

Desktop Preferences -> Advanced TAB -> tick the box for open folders from desktop in a new window
https://imgur.com/28NpVnt

3.6 If you prefer no Desktop icons, bookmark /usr/local/share/applications
(and if non-standard any other dir where *.desktop files exist)
https://imgur.com/rrWWKAu

3.7 Desktop icon size is controlled by pcmanfm preferences
Edit -> Preferences -> Display for size.

3.8 Play with pcmanfm Preferences and Desktop Preferences for other settings as you see fit.
 
Goal 4 Automate it if you like it
Easiest way to automate it is to add a file to ~/.X.d
But I prefer to have only one file in there rather than multiple files so here is example

Actual or literal contents of ~/.X.d/pcmanfm
Quote
numlockx on &
pcmanfm --desktop &

Notice that numlockx affects keyboard (not WM) so can load first.
If you autoload your web browser I suggest you append to end of list
/usr/local/bin/firefox & (change to whatever you use please)


Any complicated TCE setups might be better placed into ~/.local/bin/<something>.sh and then
the X.d line calls that file.
eg
Quote
numlockx on &
pcmanfm --desktop &
~/.local/bin/intel &

And if things need a sleep....have the sleep command in your local bin file, if possible.

# Tip #
Forewarning I will be updating pcmanfm built against gtk3 so if you are unhappy with larger size,
remove the md5 txt file and you can keep your current version.
Do the same for libfm and menu-cache too.
« Last Edit: July 17, 2020, 01:56:08 AM by aus9 »

aus9

  • Guest
Re: [info file] pcmanfm controls desktop bg, wallpaper and icon matters
« Reply #1 on: July 21, 2020, 12:50:11 AM »
changed mind and built against gtk2.

aus9

  • Guest
Re: [info file] pcmanfm controls desktop bg, wallpaper and icon matters
« Reply #2 on: July 25, 2020, 10:17:14 AM »
I had an issue with mime for opening files.

thanks to GNUser for his script
http://forum.tinycorelinux.net/index.php/topic,23614.0.html

It inspired me to also look at pcmanfm after seeing spacefm was working correctly for xdg-open stuff.

The answer is to run as local user
Code: [Select]
tce-load -i desktop-file-utils
update-desktop-database ~/.local/share/applications

I won't attempt to update TCE for a while as I still have some other TCEs to update etc