Hello everyone, I need to edit a couple of settings of Linux Mint, and I cannot do it using the GUI (I'm in a chroot environment). These are the settings I'm interested in:
- Change the Cinnamon desktop background
- Disable the screensaver (set it to Never)
- Hide from the Desktop these icons: Computer, Home folder and Mounted Drives
- Disable the Power Settings (set both "Turn off the screen" and "Suspend" to Never, both when on "A/C power" and when on "battery power")
- Add a script to Startup Applications (not really mandatory, I could figure out other ways to do it, e.g. using systemd)
- Disable "Update Manager" from Startup Applications
I usually edit those settings through the System Settings Control Center GUI. Does anyone know how I can edit those settings using command line?
SYSTEM INFO:
The operating system I'm using is Linux Mint 19.1 Cinnamon 64-bit.
Thanks in advance.
How to edit Linux Mint settings through command line
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
How to edit Linux Mint settings through command line
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: How to edit Linux Mint settings through command line
Can you post the output of (The -F needs to be capital)
Code: Select all
inxi -Fxz
- smurphos
- Level 18
- Posts: 8498
- Joined: Fri Sep 05, 2014 12:18 am
- Location: Irish Brit in Portugal
- Contact:
Re: How to edit Linux Mint settings through command line
The short answer is yes you can do most of those via command line. I haven't got time today to post the long answer to your specific wants so I'll post the medium length answer for the time being. Let me know if you get stuck.
The command to use is
Some examples
To get a full list of what can be changed and current values run
Targeted search use grep e.g.
To get a specific current value - e.g for your background
To set a new value - e.g. for your background
To reset a value to default
The command to use is
gsettings
gsettings --help
man gsettings
Some examples
To get a full list of what can be changed and current values run
gsettings list-recursively
Targeted search use grep e.g.
gsettings list-recursively | grep theme
To get a specific current value - e.g for your background
gsettings get org.cinnamon.desktop.background picture-uri
To set a new value - e.g. for your background
gsettings set org.cinnamon.desktop.background picture-uri "file:///path/to/picture"
To reset a value to default
gsettings reset org.cinnamon.desktop.background picture-uri
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
Re: How to edit Linux Mint settings through command line
...for ' - Disable "Update Manager" from Startup Applications',
just look under /etc/xdg/autostart/ (might also wanna also under ~/.config/autostart for other entries)...
cat /etc/xdg/autostart/mintupdate.desktop
...Exec=mintupdate-launcher
which mintupdate-launcher
/usr/bin/mintupdate-launcher
Ie. either move the .desktop file elsewhere, or rename mintupdate-launcher
(making a backup of such first is always a good idea...but i assume you know that).
Bonus (humorous) hint, 2 birds at one shot...in regards to "-Add a script to Startup Applications"...
Depending on what your script does and with what privileges...instead of disabling mintupdate-launcher above,
you could just edit it in nano, and have it do the work for you...
just look under /etc/xdg/autostart/ (might also wanna also under ~/.config/autostart for other entries)...
cat /etc/xdg/autostart/mintupdate.desktop
...Exec=mintupdate-launcher
which mintupdate-launcher
/usr/bin/mintupdate-launcher
Ie. either move the .desktop file elsewhere, or rename mintupdate-launcher
(making a backup of such first is always a good idea...but i assume you know that).
Bonus (humorous) hint, 2 birds at one shot...in regards to "-Add a script to Startup Applications"...
Depending on what your script does and with what privileges...instead of disabling mintupdate-launcher above,
you could just edit it in nano, and have it do the work for you...
Re: How to edit Linux Mint settings through command line
Thanks everyone for your help!
TO SMURPHOS:
I'll definitely take a look to gsettings! I'll use it to edit settings. By the way, I also found this utility: dconf-editor, that is a GUI editor for dconf settings; I think I'll use dconf-editor to find the appropriate settings' names ('cause it's easier since it has a GUI) and then I'll use gsettings as you showed me in order to edit those settings in the chroot environment.
TO THX-1138:
Thanks to you too! I think I'll just move "mintupdate.desktop" elsewhere and then put another .desktop file in "/etc/xdg/autostart" or "~/.config/autostart" for my script.
TO MRMAJIK45:
I don't really see why the informations given by "inxi -Fxz" could be useful in this case, but here they are for the sake of completeness:
TO SMURPHOS:
I'll definitely take a look to gsettings! I'll use it to edit settings. By the way, I also found this utility: dconf-editor, that is a GUI editor for dconf settings; I think I'll use dconf-editor to find the appropriate settings' names ('cause it's easier since it has a GUI) and then I'll use gsettings as you showed me in order to edit those settings in the chroot environment.
TO THX-1138:
Thanks to you too! I think I'll just move "mintupdate.desktop" elsewhere and then put another .desktop file in "/etc/xdg/autostart" or "~/.config/autostart" for my script.
TO MRMAJIK45:
I don't really see why the informations given by "inxi -Fxz" could be useful in this case, but here they are for the sake of completeness:
Code: Select all
System: Host: macchina-linux Kernel: 4.15.0-43-generic x86_64 bits: 64 compiler: gcc v: 7.3.0 Desktop: Cinnamon 4.0.9
Distro: Linux Mint 19.1 Tessa base: Ubuntu 18.04 bionic
Machine: Type: Desktop System: Microsoft product: Virtual Machine v: Hyper-V UEFI Release v4.0 serial: <filter>
Mobo: Microsoft model: Virtual Machine v: Hyper-V UEFI Release v4.0 serial: <filter> UEFI: Microsoft
v: Hyper-V UEFI Release v4.0 date: 08/31/2018
Battery: ID-1: BAT1 charge: 3.2 Wh condition: 5.0/5.0 Wh (100%) model: Microsoft Hyper-V Virtual BatterVirtual
status: Charging
CPU: Topology: 6-Core model: Intel Core i7-8750H bits: 64 type: MT MCP arch: Kaby Lake rev: A L2 cache: 9216 KiB
flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 bogomips: 52991
Speed: 2208 MHz min/max: N/A Core speeds (MHz): 1: 2208 2: 2208 3: 2208 4: 2208 5: 2208 6: 2208 7: 2208 8: 2208
9: 2208 10: 2208 11: 2208 12: 2208
Graphics: Message: No Device data found.
Display: x11 server: X.Org 1.19.6 driver: fbdev unloaded: modesetting,vesa resolution: 1152x864~N/A
OpenGL: renderer: llvmpipe (LLVM 6.0 256 bits) v: 3.3 Mesa 18.0.5 direct render: Yes
Audio: Message: No Device data found.
Network: Message: No Device data found.
IF-ID-1: eth0 state: up speed: 1000 Mbps duplex: full mac: <filter>
Drives: Local Storage: total: 30.00 GiB used: 16.92 GiB (56.4%)
ID-1: /dev/sda model: Virtual Disk size: 30.00 GiB
Partition: ID-1: / size: 28.91 GiB used: 16.91 GiB (58.5%) fs: ext4 dev: /dev/sda2
Sensors: Message: No sensors data was found. Is sensors configured?
Info: Processes: 232 Uptime: 22m Memory: 1.84 GiB used: 931.9 MiB (49.5%) Init: systemd runlevel: 5 Compilers: gcc: 7.3.0
Shell: bash v: 4.4.19 inxi: 3.0.27