Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Cinnamon install without systemd howto
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
francoisd
n00b
n00b


Joined: 23 Jan 2015
Posts: 2

PostPosted: Fri Jan 23, 2015 12:16 pm    Post subject: Cinnamon install without systemd howto Reply with quote

Hi all !

Coming from Debian & Linux Mint I wanted to avoid systemd & Ubuntu so I am beggining with Gentoo. Here I describe how I installed Cinnamon without systemd, after (long…) trys & errors… As I am new to Gentoo some things surely could be better done…! Cinnamon installed version is 2.2.16-r2, as today 2.4.5 is unstable with an amd64 machine.

During Gentoo install
I started with a new Gentoo install as described in the manual, with 2 changes in make.conf and package.mask described here: http://wiki.gentoo.org/wiki/Gentoo_Without_systemd. Thoses changes were made during Gentoo install before mounting /proc, /sys & /dev, and chrooting. I also added LINGUAS="fr" (french) to make.conf to get applications and Cinnamon localized. After chrooting and emerge-webrsync, I selected the desktop profile without gnome (default/linux/amd64/13.0/desktop) because gnome has systemd dependencies), for me n°3 profile. All the other steps where done according to the manual until reboot. I made a non-root user for computer ordinary use:
Code:
useradd -m -G users,wheel,audio,video,plugdev,usb,cdrw,cdrom -s /bin/bash userName

X11 install
In /etc/portage/make.conf:
Code:
VIDEO_CARDS="nouveau"   #could be other as "radeon" for ATI card
INPUT_DEVICES="evdev synaptics"

then
Code:
emerge --ask xorg-server
env-update && source /etc/profile

Nothing that Gentoo X11 manual doesn't say…

Sudo install
For the ordinary user to reboot or shutdown, we need sudo and some settings :
Code:
emerge --ask app-admin/sudo

Then setting parameters with visudo:
Code:
userName  ALL=(root) NOPASSWD: /sbin/reboot
userName  ALL=(root) NOPASSWD: /sbin/halt
userName  ALL=(root) NOPASSWD: /sbin/poweroff
userName  ALL=(root) NOPASSWD: /sbin/shutdown

Or the same for wheel group users (didn't do):
Code:
%wheel  ALL=(root) NOPASSWD: /sbin/reboot
%wheel  ALL=(root) NOPASSWD: /sbin/halt
%wheel  ALL=(root) NOPASSWD: /sbin/poweroff
%wheel  ALL=(root) NOPASSWD: /sbin/shutdown

I also uncommented this line, allowing to use sudo bash:
Code:
%wheel ALL=(ALL) ALL

Cinnamon install
Code:
USE="pulseaudio icu" emerge --ask cinnamon gtk+extra
emerge --ask xf86-video-modesetting polkit-gnome
emerge --ask app-crypt/mit-krb5 app-crypt/mit-krb5-appl

I didn't take notes of all my trys & errors… but Cinnamon needs gtk+extra, xf86-video-modesetting & polkit-gnome. Not sure for mit-krb5 & mit-krb5-appl.

Some settings
X11 & Cinnamon need dbus & consolekit services, Cinnamon needs NetworkManager:
Code:
rc-update add dbus default
rc-update add consolekit default
rc-update add NetworkManager default

If needed before restart:
Code:
/etc/init.d/consolekit start
/etc/init.d/dbus start
/etc/init.d/NetworkManager start

I dont use a login manager and made a ~/.xinitrc file with:
Code:
exec cinnamon-session

(startx to start Cinnamon).

For Grub to start kernel with modesetting, in /etc/default/grub:
Code:
GRUB_CMDLINE_LINUX="nouveau.modeset=1"  # "nouveau" can be "radeon" for ATI cards

then
Code:
grub2-mkconfig -o /boot/grub/grub.cfg

For an ordinary user to perform root only actions, we need to put a javascript file in /etc/polkit-1/rules.d, mine is named 55-allowing-actions.rules (see below). All actions list with pkaction. Feel free to add others if needed. With my file an user belonging to wheel group can shutdown, restart, hibernate, suspend, change colors profiles, use nano as root etc. in Cinnamon.

Theming
By default, Cinnamon comes with gnome icons, very too old fashion for me! Mint-X icons are there: https://github.com/linuxmint/mint-x-icons. You can unzip and put the icon set you want in /usr/share/icons, then make a cache for it (sample for Mint-X icons, there are also colored sets):
Code:
gtk-update-icon-cache /usr/share/icons/Mint-X

After, select the icons in Cinammon. I also tried Mint-X theme (https://github.com/linuxmint/mint-themes/tree/master/usr/share/themes/Mint-X), putted in /usr/share/themes, with the result of a very unstable Cinnamon : not a good idea…

Text color in Cinnamon desktop is grey, not very readable, you can get white text by adding css rules in /usr/share/themes/Adwaita/gtk-3.0/gtk.css (file below).

Common applications
Merged usual gnome apps:
Code:
emerge --ask lxterminal eog gnome-calculator gnome-screenshot gnome-system-monitor file-roller evince

Lxterminal requires no dependencies, gnome-terminal needs systemd, mate-terminal should install all Mate desktop environment…

Debugging
I am now with a very stable Cinnamon desktop. If problems you can start debugging cinnamon-session (exec cinnamon-session --debug in ~/.xinitrc), launching it via ssh to get Xorg messages. If Cinnamon can't launch, deleting cinnamon related item in your home directory (.cinnamon) is not enought, other directories must be deleted too before X restart: .cache, .config, .local & .gnome2. I could easily do all that because Cinnamon was my 1st installed application. So preserve .config and .local files for other apps if needed!

File /etc/polkit-1/rules.d/55-allowing-actions.rules
Code:
/*
  allowing rules added for users in wheel group
  knowing actions: pkaction
  fd january 2015
*/

// suspend, hibernate
polkit.addRule (function(action, subject)
{
  if (action.id == "org.freedesktop.upower.hibernate" ||
      action.id == "org.freedesktop.upower.suspend" &&
      subject.isInGroup ("wheel"))
      {
        return polkit.Result.YES;
      }
});

// shutdown, restart
polkit.addRule (function(action, subject)
{
  if (action.id == "org.freedesktop.consolekit.system.stop" ||
      action.id == "org.freedesktop.consolekit.system.restart" &&
      subject.isInGroup ("wheel"))
      {
        return polkit.Result.YES;
      }
});

// color management
polkit.addRule (function(action, subject)
{
  if (action.id == "org.freedesktop.color-manager.create-device" ||
      action.id == "org.freedesktop.color-manager.create-profile" ||
      action.id == "org.freedesktop.color-manager.delete-device" ||
      action.id == "org.freedesktop.color-manager.delete-profile" ||
      action.id == "org.freedesktop.color-manager.device-inhibit" ||
      action.id == "org.freedesktop.color-manager.modify-device" ||
      action.id == "org.freedesktop.color-manager.modify-profile" &&
      subject.isInGroup ("wheel"))
      {
        return polkit.Result.YES;
      }
});

// media
polkit.addRule (function(action, subject)
{
  if (action.id == "org.freedesktop.udisks2.eject-media" ||
      action.id == "org.freedesktop.udisks2.filesystem-mount" ||
      action.id == "org.freedesktop.udisks2.filesystem-mount-other-seat" ||
      action.id == "org.freedesktop.udisks2.filesystem-mount-system" ||
      action.id == "org.freedesktop.udisks2.filesystem-unmount-others" &&
      subject.isInGroup ("wheel"))
      {
        return polkit.Result.YES;
      }
});

// screen backlight
polkit.addRule (function(action, subject)
{
  if (action.id == "org.cinnamon.settings-daemon.plugins.power.backlight-helper" &&
      subject.isInGroup ("wheel"))
      {
        return polkit.Result.YES;
      }
});

// network manager
polkit.addRule (function(action, subject)
{
  if (action.id == "org.freedesktop.NetworkManager.enable-disable-network" ||
      action.id == "org.freedesktop.NetworkManager.enable-disable-wifi" ||
      action.id == "org.freedesktop.NetworkManager.enable-disable-wwan" ||
      action.id == "org.freedesktop.NetworkManager.network-control" ||
      action.id == "org.freedesktop.NetworkManager.settings.modify.hostname" ||
      action.id == "org.freedesktop.NetworkManager.settings.modify.own" ||
      action.id == "org.freedesktop.NetworkManager.settings.modify.system" ||
      action.id == "org.freedesktop.NetworkManager.sleep-wake" &&
      subject.isInGroup ("wheel"))
      {
        return polkit.Result.YES;
      }
});

// others
polkit.addRule (function(action, subject)
{
  if (action.id == "org.freedesktop.locale1.set-keyboard" ||
      action.id == "org.freedesktop.locale1.set-locale" ||
      action.id == "org.freedesktop.timedate1.set-local-rtc" ||
      action.id == "org.freedesktop.timedate1.set-ntp" ||
      action.id == "org.freedesktop.timedate1.set-time" ||
      action.id == "org.freedesktop.timedate1.set-timezone" ||
      action.id == "org.cinnamon.settings-users" ||
      action.id == "org.nemo.root" &&
      subject.isInGroup ("wheel"))
      {
        return polkit.Result.YES;
      }
});

File /usr/share/themes/Adwaita/gtk-3.0/gtk.css
Code:
@import url("resource:///org/gnome/adwaita/gtk-main.css");

/* added content: */
.nemo-desktop.nemo-canvas-item {
color: #fff;
text-shadow: 1px 1px @desktop_item_text_shadow;
}

.nemo-desktop.nemo-canvas-item:selected {
background-color: alpha(#fff, 0.2);
background-image: none;
color: #FFFFFF;
text-shadow: none;
}
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum