Cinnamon command line commands in bash

About writing shell scripts and making the most of your shell
Forum rules
Topics in this forum are automatically closed 6 months after creation.
Locked
teachernova370
Level 1
Level 1
Posts: 4
Joined: Thu May 29, 2014 10:19 am

Cinnamon command line commands in bash

Post by teachernova370 »

First, let me give you a little background in what I am trying to do. I have a small free repair shop that helps people in my community. Our goal is to convert as many windows XP users to linux as possible. We do not charge for any service unless there is a hardware cost. It's something we believe in, so we are doing our best. We are also making it easier on the new users by making everything feel like their old xp machines. The only problem is we have more orders than we can handle. So, i have built a script and now I am trapped on the cinnamon commands. Here is what I have found on the net so far.

To change the themes:

Code: Select all

gsettings set org.cinnamon.theme name "WinXP"
To change the windows:

Code: Select all

gsettings set org.cinnamon.desktop.wm.preferences theme "WinXP"
To change the controls:

Code: Select all

gsettings set org.cinnamon.desktop.interface gtk-theme "WinXP"
To change the Startmenu:
This is what I need help on. I need to change it to a icon from a host site and replace the text Menu with Start

To change panel settings to allow cinnamon to scale the text on the pannel.
This is the final step in making the interface look and feel like their old xp machines.

Other than these two issues, The script will allow for a full install, upgrade, and install of commonly used packages, including their netflix ability. If anyone can help us on our indevor, the people of our town will thank you.
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.
User avatar
xenopeek
Level 25
Level 25
Posts: 29597
Joined: Wed Jul 06, 2011 3:58 am

Re: Cinnamon command line commands in bash

Post by xenopeek »

You can install dconf-tools package to get dconf-editor, which will let you browse the settings you can set with gsettings in a nice GUI. AFAIK the settings of applets are stored in the .cinnamon/config/<applet>/<applet>.json file in each user's home folder. You can't change those with gsettings.

For name and icon of menu button that is in the file .cinnamon/config/menu@cinnamon.org/menu@cinnamon.org.json. I have a bit of example code in Python to how to automatically edit that file and change the menu button name: http://forums.linuxmint.com/viewtopic.p ... 22#p785464

The piece of code that changes the menu button name:

Code: Select all

config['menu-label']['value'] = 'MyMenuName'
So after that line you could add the following to also change the menu button icon:

Code: Select all

config['menu-icon']['value'] = '/my/path/to/an/icon.svg'
Replace /my/path/to/an/icon.svg with the full path to a svg format icon on the computer.
Image
teachernova370
Level 1
Level 1
Posts: 4
Joined: Thu May 29, 2014 10:19 am

Re: Cinnamon command line commands in bash

Post by teachernova370 »

The code you present here is python code. Which sadly I don't know enough of. This is a bash script, is there a way to work with the menu icons in bash?
User avatar
xenopeek
Level 25
Level 25
Posts: 29597
Joined: Wed Jul 06, 2011 3:58 am

Re: Cinnamon command line commands in bash

Post by xenopeek »

Good luck with that :wink: I did it in Python because that can parse json files with a handful of lines of code. Have a look at the file .cinnamon/config/menu@cinnamon.org/menu@cinnamon.org.json and then reconsider. IDK how to do that as simple in bash (if I know at all). Python is installed by default, so why not just add a Python script and call that from your bash script? (Or use heredoc to include it in the bash file.) You can just use my script from the link and add the one line I detail above, and of course replace "/home/username" twice with the correct home folder location.

The python script is basically just three lines of code.
1. Load the json file
2. Change a value in the loaded json
3. Write the changes back to the json file
Image
BlackVeils

Post by BlackVeils »

or configure the normal way on a test system, then backup configuration files like you backup your home settings, and cp files to the home directories.

Sent from my Moto G using Tapatalk
CaptainMark

Re: Cinnamon command line commands in bash

Post by CaptainMark »

It's probably easier just to switch out the existing menu icon with your own choice of icon, I would watch out it you intend on using a logo like the Windows one, the legal ramifications could be pretty severe. I would look into creating your own install cd instead, could save you a lot of time, customise just the once, make the cd then install over and over on as many machines as you like.
Locked

Return to “Scripts & Bash”