How to restart Cinnamon via terminal?

Please post suggestions for improvement of Cinnamon on:
https://github.com/linuxmint/Cinnamon
Post Reply
antrrax
Level 1
Level 1
Posts: 21
Joined: Thu Sep 27, 2018 11:53 am

How to restart Cinnamon via terminal?

Post by antrrax »

I need to restart Cinnamon via terminal after running a script.

Code: Select all

$ sudo cinnamon --replace
I tried the command above, but returns the following message and if I close the terminal or interrupt with CONTROL + C, crashes the PC

Clutter-Message: 19:55:45.932: Sync method: PRESENTATION TIME
Cjs-Message: 19:55:46.116: JS LOG: About to start Cinnamon
Cjs-Message: 19:55:46.162: JS LOG: [LookingGlass/info] Cinnamon.AppSystem.get_default() started in 44 ms
Cjs-Message: 19:55:46.168: JS LOG: [LookingGlass/info] loading user theme: /usr/share/themes/Mint-Y-Dark-Royal/cinnamon/cinnamon.css
Cjs-Message: 19:55:46.187: JS LOG: [LookingGlass/info] added icon directory: /usr/share/themes/Mint-Y-Dark-Royal/cinnamon
Cjs-Message: 19:55:46.331: JS LOG: [LookingGlass/info] PlacesManager: Updating devices
Cjs-Message: 19:55:46.351: JS LOG: [LookingGlass/info] loaded at Wed Jan 15 2020 19:55:46 GMT-0300
Cjs-Message: 19:55:46.351: JS LOG: Cinnamon started at Wed Jan 15 2020 19:55:46 GMT-0300
Cjs-Message: 19:55:46.382: JS LOG: [LookingGlass/info] ExtensionSystem started in 0 ms
Cjs-Message: 19:55:46.383: JS LOG: [LookingGlass/info] DeskletManager started in 0 ms
Cjs-Message: 19:55:46.383: JS LOG: [LookingGlass/info] SearchProviderManager started in 0 ms
openGL version 3.3 detected (GL3 Cogl Driver)
MetaSyncRing disabled: couldn't find required GL extensions, or the minimum safe openGL version was not met
Cjs-Message: 19:55:46.540: JS LOG: [LookingGlass/info] Loaded applet show-desktop@cinnamon.org in 48 ms
Cjs-Message: 19:55:46.595: JS LOG: [LookingGlass/info] Loaded applet calendar@cinnamon.org in 54 ms
Cjs-Message: 19:55:46.629: JS LOG: [LookingGlass/info] Loaded applet removable-drives@cinnamon.org in 34 ms
Cjs-Message: 19:55:46.639: JS LOG: [LookingGlass/info] Role locked: notifications
Cjs-Message: 19:55:46.649: JS LOG: [LookingGlass/info] Loaded applet notifications@cinnamon.org in 20 ms
St-Message: 19:55:46.655: cogl npot texture sizes SUPPORTED
Cjs-Message: 19:55:46.695: JS LOG: [LookingGlass/info] Loaded applet printers@cinnamon.org in 46 ms
Cjs-Message: 19:55:46.707: JS LOG: [LookingGlass/info] Loaded applet xapp-status@cinnamon.org in 12 ms
Cjs-Message: 19:55:46.732: JS LOG: [LookingGlass/info] Loaded applet keyboard@cinnamon.org in 26 ms
Cjs-Message: 19:55:46.759: JS LOG: [LookingGlass/info] Loaded applet power@cinnamon.org in 26 ms
Cjs-Message: 19:55:46.792: JS LOG: [LookingGlass/info] Role locked: panellauncher
Cjs-Message: 19:55:46.795: JS LOG: [LookingGlass/info] Loaded applet grouped-window-list@cinnamon.org in 36 ms
Cjs-Message: 19:55:46.900: JS LOG: [LookingGlass/info] GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.cinnamon.SettingsDaemon.Power was not provided by any .service files
Cjs-Message: 19:55:46.900: JS LOG: [LookingGlass/trace]
<----------------
_proxyInvoker/asyncCallback@resource:///org/cinnamon/cjs/modules/overrides/Gio.js:71:26
---------------->
Cjs-Message: 19:55:46.986: JS LOG: [LookingGlass/info] Loaded applet sound@cinnamon.org in 192 ms
Cjs-Message: 19:55:47.039: JS LOG: [LookingGlass/info] Loaded applet network@cinnamon.org in 52 ms
Cjs-Message: 19:55:47.343: JS LOG: [LookingGlass/info] Loaded applet menu@cinnamon.org in 304 ms
Cjs-Message: 19:55:47.343: JS LOG: [LookingGlass/info] AppletManager started in 992 ms
Cjs-Message: 19:55:47.349: JS LOG: [LookingGlass/info] Cinnamon took 1232 ms to start
Cjs-Message: 19:55:47.404: JS LOG: Unknown network device type, is 14
Note: If I restart Cinnamon manually from the taskbar option, everything works normally.
User avatar
smurphos
Level 17
Level 17
Posts: 7332
Joined: Fri Sep 05, 2014 12:18 am
Location: Britisher
Contact:

Re: How to restart Cinnamon via terminal?

Post by smurphos »

Don't use sudo to restart cinnamon.

From a terminal use - cinnamon --replace & disown or nohup cinnamon --replace &

Or just open a run dialog with keyboard shortcut Alt-F2 and run cinnamon --replace from there.

Might be worth running sudo chown -Rc $USER:$USER $HOME to fix any file ownership issues in your home caused run running cinnamon with sudo.
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
Post Reply

Return to “Cinnamon”