Skip to content

Instantly share code, notes, and snippets.

@TheGuardianWolf
Created December 23, 2016 04:21
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save TheGuardianWolf/12e48be37e09b9f9808d7e9938944d6b to your computer and use it in GitHub Desktop.
Patched: 20161223172013
# $Id$
# Maintainer: Evan Penner <evaninrussia@gmail.com>
# Based on cinnamon PKGBUILD
_pkgname=cinnamon
pkgname=${_pkgname}-git
pkgver=5848.3a6820c4
pkgrel=1
pkgdesc="A Linux desktop which provides advanced innovative features and a traditional user experience"
arch=('i686' 'x86_64')
url="https://github.com/linuxmint/Cinnamon"
license=('GPL2')
depends=('cinnamon-settings-daemon-git' 'cinnamon-session-git' 'cinnamon-desktop-git'
'cinnamon-control-center-git' 'cjs-git' 'cinnamon-menus-git'
'cinnamon-translations-git' 'muffin-git' 'cinnamon-screensaver-git'
'nemo-dev' 'polkit-gnome'
'network-manager-applet' 'gnome-icon-theme' 'gnome-themes-standard'
'accountsservice' 'caribou' 'clutter-gtk' 'gconf' 'libgnomekbd'
'gnome-themes-standard' 'gstreamer' 'libgnome-keyring'
'librsvg' 'networkmanager' 'python2-dbus' 'python2-pillow'
'python2-pam' 'python2-pexpect' 'python2-pyinotify' 'python2-lxml' 'webkitgtk'
'xorg-server')
makedepends=('gnome-common' 'intltool' 'git')
options=('!emptydirs')
conflicts=("${_pkgname}")
provides=("${_pkgname}")
install=${pkgname}.install
source=("${_pkgname}"::git+https://github.com/linuxmint/cinnamon.git
"use_wheel.patch")
sha256sums=('SKIP'
'942a350e4408024f4c1eba55b3ff9f532db914851147e8969bb242882fd4be87')
pkgver() {
cd "${srcdir}/${_pkgname}"
echo $(git rev-list --count master).$(git rev-parse --short master)
}
prepare() {
cd ${srcdir}/cinnamon
# Use wheel group instread of sudo
patch -Np1 -i ../use_wheel.patch
# Add polkit agent to required components
sed -i 's/RequiredComponents=\(.*\)$/RequiredComponents=\1polkit-gnome-authentication-agent-1;/' files/usr/share/cinnamon-session/sessions/cinnamon*.session
# Use pkexec instead of gksu
sed -i 's/gksu/pkexec/' files/usr/bin/cinnamon-settings-users
# Check for the cc-panel path, not for the unneeded binary
sed -i 's|/usr/bin/cinnamon-control-center|/usr/lib/cinnamon-control-center-1/panels|' files/usr/bin/cinnamon-settings
# Cinnamon has no upstream backgrounds, use GNOME backgrounds instead
sed -i 's|/usr/share/cinnamon-background-properties|/usr/share/gnome-background-properties|' \
files/usr/share/cinnamon/cinnamon-settings/modules/cs_backgrounds.py
}
build() {
cd ${srcdir}/cinnamon
./autogen.sh --prefix=/usr \
--sysconfdir=/etc \
--libexecdir=/usr/lib/cinnamon \
--localstatedir=/var \
--disable-static \
--disable-schemas-compile \
--with-session-tracking=systemd
make
}
package() {
cd "${srcdir}/${_pkgname}"
make DESTDIR="${pkgdir}/" install
}
--- a/files/usr/share/cinnamon/cinnamon-settings-users/cinnamon-settings-users.py 2016-12-23 16:59:40.005754000 +1300
+++ b/files/usr/share/cinnamon/cinnamon-settings-users/cinnamon-settings-users.py 2016-12-23 16:57:46.775035000 +1300
@@ -153,12 +153,11 @@ class EditableEntry (Gtk.Notebook):
class PasswordDialog(Gtk.Dialog):
- def __init__ (self, user, password_mask, group_mask):
+ def __init__ (self, user, password_mask):
super(PasswordDialog, self).__init__()
self.user = user
self.password_mask = password_mask
- self.group_mask = group_mask
self.set_modal(True)
self.set_skip_taskbar_hint(True)
@@ -224,14 +223,7 @@ class PasswordDialog(Gtk.Dialog):
def change_password(self):
newpass = self.new_password.get_text()
self.user.set_password(newpass, "")
- mask = self.group_mask.get_text()
- if "nopasswdlogin" in mask:
- subprocess.call(["gpasswd", "-d", self.user.get_user_name(), "nopasswdlogin"])
- mask = mask.split(", ")
- mask.remove("nopasswdlogin")
- mask = ", ".join(mask)
- self.group_mask.set_text(mask)
- self.password_mask.set_text(u'\u2022\u2022\u2022\u2022\u2022\u2022')
+ self.password_mask.set_text(u'\u2022\u2022\u2022\u2022\u2022\u2022')
self.destroy()
def set_passwords_visibility(self):
@@ -569,7 +561,7 @@ class Module:
model, treeiter = self.users_treeview.get_selection().get_selected()
if treeiter != None:
user = model[treeiter][INDEX_USER_OBJECT]
- dialog = PasswordDialog(user, self.password_mask, self.groups_label)
+ dialog = PasswordDialog(user, self.password_mask)
response = dialog.run()
def _on_groups_button_clicked(self, widget):
@@ -814,11 +806,11 @@ class Module:
pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_size("/usr/share/cinnamon/faces/user-generic.png", 48, 48)
description = "<b>%s</b>\n%s" % (fullname, username)
piter = self.users.append(None, [new_user, pixbuf, description])
- # Add the user to his/her own group and sudo if Administrator was selected
+ # Add the user to his/her own group and wheel if Administrator was selected
if dialog.account_type_combo.get_active() == 1:
- subprocess.call(["usermod", username, "-G", "%s,sudo,nopasswdlogin" % username])
+ subprocess.call(["usermod", username, "-G", "%s,wheel" % username])
else:
- subprocess.call(["usermod", username, "-G", "%s,nopasswdlogin" % username])
+ subprocess.call(["usermod", username, "-G", "%s" % username])
self.load_groups()
dialog.destroy()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment