Access to desktop preferences in terminal


(hamzeh) #1

Hi to all, I need to load and edit the desktop preferences of lxqt in linux terminal. Please guide me, how can I load and change this setting from a command in terminal or from config file.

Regards,


(stefano) #2

The desktop configs are in ~/.config/pcmanfm-qt/lxqt/settings.conf in the section [Desktop]


(hamzeh) #3

Thank you for your reply. But for example when I change the wallpaper from GUI, this file don’t change or update. Where is the problem in your opiniion?


(stefano) #4

It does well update here… check again. What distro are you using?


(Pedram Pourang) #5

@stefonarch is right. In addition, some settings are saved on quitting. ~/.config/pcmanfm-qt contains all user settings of pcmanfm-qt – some for its window, some for Desktop.


(hamzeh) #6

@tsujan @stefonarch Thank you. Oh sorry, when I change the settings in gui , ~/.config/pcmanfm-qt/lxqt/settings.conf will be update. But I have another problem :sweat_smile: I’ve problem when I change the settings of desktop from file (`~/.config/pcmanfm-qt/lxqt/settings.conf), but the modification don’t apply. Do I should any thing?


(Pedram Pourang) #7

It applies only if you stop pcmanfm-qt’s process, change the settings correctly in the config file and then, start pcmanfm-qt again. Please note that the process should be stopped – closing the window isn’t enough.

When you edit the file while pcmanfm-qt is running, it will overwrite the changes on quitting.


(stefano) #8

You can stop pcmanfm-qt in session settings > LXQt Modules “Desktop”


(hamzeh) #9

@tsujan @stefonarch Thank you for your attention. Every thing is ok now. :smiley: Now I have an other question: Can I change the desktop settings from terminal by command and without any gui?


(Pedram Pourang) #10

I makes no difference. Desktop settings are also in the above-mentioned folder and Desktop is a part of pcmanfm-qt’s process.

However, please note that Qt settings aren’t there for manual editing. Values can have formats that aren’t human-readable – although that’s not the case with pcmanfm-qt for now.


(hamzeh) #11

@tsujan Yes, you’re absolutely right. But I need to change the following settings without config file modification and without gui.

I makes no difference. Desktop settings are also in the above-mentioned folder and Desktop is a part of pcmanfm-qt’s process.

You mean that, if I change the desktop settings with any command in linux terminal, again I must restart pcmanfm-qt’s process?

Also a private request :smiley: How can I send private message to you here? I need a private communication channel? :wink:


(Pedram Pourang) #12

Yes, of course! That’s the case with 99% of apps. There are exceptions in LXQt though – personally, I don’t like them.

I don’t know. @agaida knows these things better than anyone.

You could email me; my email address is in READMEs of my github projects. But it might take a while before I could answer.


(Alf Gaida) #13

klick on the avatar and than message


(hamzeh) #14

Thank you so much for clarify. Do you know how can I restart Desktop LXQT module from linux terminal?


(Pedram Pourang) #15

To make pcmafm-qt quit gracefully:

qdbus org.pcmanfm.PCManFM /Application "quit"

To start it in the default way:

pcmanfm-qt --desktop --profile=lxqt

(hamzeh) #16

@tsujan Thank you for your reply.
These commands can run as root or must be run for none-root users?


(Pedram Pourang) #17

The desktop is never run as root.


(hamzeh) #18

@tsujan Ok, thank you. When I stop/start desktop session with above commands, the screen will be blank for a short moments. Can I prevent it with any solution?

And I have another problem, sometimes when I change the desktop config file, the desktop session don’t start again and I should again:

  • stop it
  • change config file
  • start it

Do you have any idea?


(Pedram Pourang) #19

No, you can’t. It’s like restarting Plasma under KDE – not the same thing but similar. pcmanfm-qt draws Desktop. So, when you stop its process, a blank Desktop is inevitable.

Actually, as I shortly mentioned above, it isn’t a good idea to change user config files of GUI apps manually. Some settings are applied on-the-fly in Preferences dialogs, some are applied only after app restart. That’s the case with most apps, Qt or not.

And I have another problem, sometimes when I change the desktop config file, the desktop session don’t start again and I should again

Maybe, it crashes because of wrong manual changes, although that shouldn’t happen. If you have V0.14 and you see a coredump inside /var/lib/systemd/coredump, please open an issue at https://github.com/lxqt/pcmanfm-qt/issues and attach what comes after where:

coredumpctl gdb pcmanfm-qt
where

(Pedram Pourang) #20

Frankly, I didn’t understand why you wanted to edit the config file manually. Personally, I see no use to it. Some values may have formats like “@ByteArray(\0\0\0\xff\0\0\0\x1\0\0\0\x2\0\0\0\x7f\0\0\x2T\x1\xff\xff\xff\xff\x1\0\0\0\x1\0)”, which is meaningless to the user. That doesn’t happen in pcmanfm-qt but only by chance.

GUI apps have preferences dialogs for that purpose and it’s something users should do. Distro maintainers could add their global config as a start point but they shouldn’t interfere with user config files.