I am now an open source contributor!

Overview

I use open-source software every day, since November 2015. That was the year of Linux on the Desktop for me. I picked as my desktop environment Cinnamon.

I normally don’t use virtual desktops or “workspaces,” but on one laptop I was for a while. It was actually a KDE Plasma 5 installation, which reinforced my plans to stick to Cinnamon as my heavyweight DE. However, the KDE Plasma virtual workspaces worked fine, and provided all sorts of options for the window list and alt-tab switcher for listing windows across all the workspaces. Cinnamon did not have such an offering, so when I finally replaced KDE with Cinnamon on that workstation, I just reverted to my single-workspace workflow.

I told someone online (probably in the #korora channel at irc.freenode.net) that I was willing to pay money for Cinnamon to provide a window list option for displaying the windows from all workspaces. Well, as of October 2, I guess I owe myself $50.

Check out my merged pull request to Cinnamon! I added the feature, as a boolean setting, to the mainline Cinnamon window list applet. So eventually my option will be included in the Fedora Cinnamon build down the line. For the time being, though, I’m going to continue to use my separate applet that provides my feature.

Advertisements

Restart cinnamon from command line

When cinnamon freezes up and needs to be restarted, you can restart it from Cinnamon itself or from a different terminal.

In Cinnamon

Press ALT+F2. Type in the letter r and press enter.

On the command line

To switch to another console terminal, press CTRL+ALT+F2.
On this terminal, type this command.

pkill -HUP -f "cinnamon --replace"

References

Weblinks

  1. User sim at askubuntu.com https://askubuntu.com/questions/143838/how-do-i-restart-cinnamon-from-the-tty/523436#523436

Cinnamon on VNC on CentOS 7

Overview

This document describes how to install Cinnamon desktop environment on CentOS 7 for use in VNC. Basically, you can take a headless server and turn it into a virtual desktop controller.

Caveats

Limitations of this design prevent this from scaling up past so many users, so this would be best suited for home or small office use.
VNC uses no security. Consider alternatives or additions to this process when security is a consideration.

Installing Cinnamon for VNC

Installing the components

Install the vnc server.

yum install tigervnc-server tigervnc vnc

Install the desktop environment.

yum install cinnamon

Install any applications to be used.

yum install firefox gnome-terminal

Configuring the components

For each user that uses a virtual desktop on this host, you will need a separate systemd service, as well as a vnc password which is separate from the regular user password. Also set up the xstartup file for vnc.

tu=bgstack15
tn=1
sudo cp -p /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@\:${tn}.service
sed -r -i -e "s//${tu}/g;' /etc/systemd/system/vncserver@\:${tn}.service
systemctl enable vncserver@\:${tn}.service
firewall-cmd --permanent --add-port 59$( printf '%02i' "${tn}")/tcp
printf "For user ${tu} please provide new "
su - ${tu} -c vncpasswd
tf=~/.vnc/xstartup
test -f "${tf}" && \cp -p "${tf}" "${tf}.$( date "+%Y-%m-%dT%H%M%S" )"; touch "${tf}"; chmod 0755 "${tf}"
cat <<EOF > "${tf}"
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
exec /usr/bin/cinnamon-session
EOF
systemctl start vncserver@\:${tn}.service

Connecting to the desktop

On a client, run

vncviewer hostname:1

Logout from Different Desktop Environments from Command Line

Rambling

Some people spend all day in terminals, even though there’s a desktop environment running. I normally have four different terminals open on my main screen, in a normal quadrant pattern. I arrange them on the taskbar so they are clockwise, starting in the upper left quadrant.

Problem

Suppose you want to close your session, without having to use the mouse or pressing the Super key or anything like that.

You want to enter a command from your terminal that will close your session. Here is a list of how to do that, for each different desktop environment (DE) I’ve collected so far.

Logout from desktop environments

Logout from cinnamon from command line

cinnamon-session-quit --logout --force

Logout from xfce from command line

xfce-session-quit -l

Logout from GNOME Shell from command line

­gnome-session-quit

Logout from KDE4 from command line

qdbus org.kde.ksmserver /KSMServer org.kde.KSMServerInterface.logout -1 -1 -1

Logout from KDE5 from command line

With confirmation

qdbus org.kde.ksmserver /KSMServer logout 1 3 3

Without confirmation

qdbus org.kde.ksmserver /KSMServer logout 0 3 3

Logout from desktop environment from command line

loginctl terminate-user username

References

Weblinks

  1. Cinnamon https://forums.linuxmint.com/viewtopic.php?t=177547
  2. Gnome https://askubuntu.com/questions/15795/how-can-you-log-out-via-the-terminal#15796
  3. KDE4 http://www.techlw.com/2012/07/log-out-in-ubuntu-from-command-line.html
  4. KDE5 Plasma https://forum.kde.org/viewtopic.php?f=289&t=135065
  5. Extra reading for KDE https://majewsky.wordpress.com/2009/07/11/shutdown-your-machine-automatically-or-from-remote/