summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Stakenvicius <axs@gentoo.org>2013-10-24 18:56:04 +0000
committerIan Stakenvicius <axs@gentoo.org>2013-10-24 18:56:04 +0000
commit1c324038c905e9d6d64365404da3c535ce3ee984 (patch)
tree98dc8465958aef8307e037b9de74b716d642ab24 /x11-misc/slim/files
parentupdate of subunit to 0.0.15 and added support for normal python-r1 (diff)
downloadhistorical-1c324038c905e9d6d64365404da3c535ce3ee984.tar.gz
historical-1c324038c905e9d6d64365404da3c535ce3ee984.tar.bz2
historical-1c324038c905e9d6d64365404da3c535ce3ee984.zip
fixed regression for session-chooser (bug 489078), changed default session list to be from xsession .desktop files, changed operation of -nodaemon and slim.service to fix systemd session issue after multiple logins (bugs.freedesktop.org/show_bug.cgi?id=62866)
Package-Manager: portage-2.2.7/cvs/Linux x86_64 Manifest-Sign-Key: 0x2B6559ED
Diffstat (limited to 'x11-misc/slim/files')
-rw-r--r--x11-misc/slim/files/slim-1.3.6-config.diff77
-rw-r--r--x11-misc/slim/files/slim-1.3.6-session-chooser.patch115
-rw-r--r--x11-misc/slim/files/slim-1.3.6-systemd-session.patch29
3 files changed, 221 insertions, 0 deletions
diff --git a/x11-misc/slim/files/slim-1.3.6-config.diff b/x11-misc/slim/files/slim-1.3.6-config.diff
new file mode 100644
index 000000000000..9da6795cccfa
--- /dev/null
+++ b/x11-misc/slim/files/slim-1.3.6-config.diff
@@ -0,0 +1,77 @@
+--- slim.conf.orig 2010-08-25 11:52:23.000000000 -0400
++++ slim.conf 2010-08-25 11:58:58.000000000 -0400
+@@ -2,7 +2,7 @@
+ # Note: -xauth $authfile is automatically appended
+ default_path /bin:/usr/bin:/usr/local/bin
+ default_xserver /usr/bin/X
+-#xserver_arguments -dpi 75
++xserver_arguments -nolisten tcp -br -deferglyphs 16 vt07
+
+ # Commands for halt, login, etc.
+ halt_cmd /sbin/shutdown -h now
+@@ -18,7 +18,7 @@
+
+
+ # Activate numlock when slim starts. Valid values: on|off
+-# numlock on
++numlock on
+
+ # Hide the mouse cursor (note: does not work with some WMs).
+ # Valid values: true|false
+@@ -33,7 +33,8 @@
+ # to adjust the command according to your preferred shell,
+ # i.e. for freebsd use:
+ # login_cmd exec /bin/sh - ~/.xinitrc %session
+-login_cmd exec /bin/bash -login ~/.xinitrc %session
++# login_cmd exec /bin/bash -login ~/.xinitrc %session
++login_cmd exec /bin/bash -login /usr/share/slim/Xsession %session
+
+ # Commands executed when starting and exiting a session.
+ # They can be used for registering a X11 session with
+@@ -41,20 +42,30 @@
+ #
+ # sessionstart_cmd some command
+ # sessionstop_cmd some command
++sessionstart_cmd /usr/bin/sessreg -a -l :0.0 %user
++sessionstop_cmd /usr/bin/sessreg -d -l :0.0 %user
+
+ # Start in daemon mode. Valid values: yes | no
+ # Note that this can be overriden by the command line
+ # options "-d" and "-nodaemon"
+-# daemon yes
++daemon yes
+
+-# Available sessions (first one is the default).
+-# The current chosen session name is replaced in the login_cmd
++# Available sessions:
++# The current chosen session name replaces %session in the login_cmd
+ # above, so your login command can handle different sessions.
++# If no session is chosen (via F1), %session will be an empty string.
+ # see the xinitrc.sample file shipped with slim sources
+-sessions xfce4,icewm-session,wmaker,blackbox
++#sessions xfce4,icewm-session,wmaker,blackbox
++# Alternatively, read available sessions from a directory of scripts:
++#sessiondir /etc/X11/Sessions
++# Or, read available sessions from the xsessions desktop files --
++# note that this may provide a full path to the session executable!
++sessiondir /usr/share/xsessions
+
+-# Executed when pressing F11 (requires imagemagick)
++# Executed when pressing F11 (requires media-gfx/imagemagick for import)
++# Alternative is media-gfx/scrot. See Gentoo bug 252241 for more info.
+ screenshot_cmd import -window root /slim.png
++#screenshot_cmd scrot /root/slim.png
+
+ # welcome message. Available variables: %host, %domain
+ welcome_msg Welcome to %host
+@@ -83,8 +91,8 @@
+ # randomly choose from
+ current_theme default
+
+-# Lock file
+-lockfile /var/run/slim.lock
++# Lock file, /etc/init.d/xdm expects slim.pid
++lockfile /run/slim.pid
+
+ # Log file
+ logfile /var/log/slim.log
diff --git a/x11-misc/slim/files/slim-1.3.6-session-chooser.patch b/x11-misc/slim/files/slim-1.3.6-session-chooser.patch
new file mode 100644
index 000000000000..b43c9a307605
--- /dev/null
+++ b/x11-misc/slim/files/slim-1.3.6-session-chooser.patch
@@ -0,0 +1,115 @@
+--- a/cfg.cpp 2013-10-01 18:38:05.000000000 -0400
++++ b/cfg.cpp 2013-10-24 12:12:20.584103253 -0400
+@@ -274,14 +274,14 @@
+ while (true) {
+ string::const_iterator begin = s;
+ while (*s != c && s != str.end()) { ++s; }
+- tmp = string(begin, s);
+- if (useEmpty || tmp.size() > 0)
++ tmp = string(begin, s);
++ if (useEmpty || tmp.size() > 0)
+ v.push_back(tmp);
+ if (s == str.end()) {
+ break;
+ }
+ if (++s == str.end()) {
+- if (useEmpty)
++ if (useEmpty)
+ v.push_back("");
+ break;
+ }
+@@ -289,6 +289,7 @@
+ }
+
+ void Cfg::fillSessionList(){
++ string strSessionList = getOption("sessions");
+ string strSessionDir = getOption("sessiondir");
+
+ sessions.clear();
+@@ -307,29 +308,29 @@
+ struct stat oFileStat;
+
+ if (stat(strFile.c_str(), &oFileStat) == 0) {
+- if (S_ISREG(oFileStat.st_mode) &&
+- access(strFile.c_str(), R_OK) == 0){
+- ifstream desktop_file( strFile.c_str() );
+- if (desktop_file){
+- string line, session_name = "", session_exec = "";
+- while (getline( desktop_file, line )) {
+- if (line.substr(0, 5) == "Name=") {
+- session_name = line.substr(5);
+- if (!session_exec.empty())
+- break;
+- } else
+- if (line.substr(0, 5) == "Exec=") {
+- session_exec = line.substr(5);
+- if (!session_name.empty())
+- break;
+- }
+- }
+- desktop_file.close();
+- pair<string,string> session(session_name,session_exec);
+- sessions.push_back(session);
+- cout << session_exec << " - " << session_name << endl;
+- }
+-
++ if (S_ISREG(oFileStat.st_mode) &&
++ access(strFile.c_str(), R_OK) == 0){
++ ifstream desktop_file( strFile.c_str() );
++ if (desktop_file){
++ string line, session_name = "", session_exec = "";
++ while (getline( desktop_file, line )) {
++ if (line.substr(0, 5) == "Name=") {
++ session_name = line.substr(5);
++ if (!session_exec.empty()) break;
++ } else if (line.substr(0, 5) == "Exec=") {
++ session_exec = line.substr(5);
++ if (!session_name.empty()) break;
++ }
++ }
++ desktop_file.close();
++ if (!session_name.empty() && !session_exec.empty()) {
++ pair<string,string> session(session_name,session_exec);
++ sessions.push_back(session);
++ } else if (access(strFile.c_str(), X_OK) == 0) {
++ pair<string,string> session(string(pDirent->d_name),strFile);
++ sessions.push_back(session);
++ }
++ }
+ }
+ }
+ }
+@@ -338,8 +339,18 @@
+ }
+
+ if (sessions.empty()){
+- pair<string,string> session("","");
+- sessions.push_back(session);
++ if (strSessionList.empty()) {
++ pair<string,string> session("","");
++ sessions.push_back(session);
++ } else {
++ // iterate through the split of the session list
++ vector<string> sessit;
++ split(sessit,strSessionList,',',false);
++ for (vector<string>::iterator it = sessit.begin(); it != sessit.end(); ++it) {
++ pair<string,string> session(*it,*it);
++ sessions.push_back(session);
++ }
++ }
+ }
+ }
+
+--- a/app.cpp 2013-10-24 12:16:59.870111072 -0400
++++ b/app.cpp 2013-10-24 12:29:59.899132910 -0400
+@@ -377,10 +377,6 @@
+ LoginPanel->SetName(cfg->getOption("default_user") );
+ }
+
+- if (firstloop) {
+- LoginPanel->SwitchSession();
+- }
+-
+ if (!AuthenticateUser(focuspass && firstloop)){
+ panelclosed = 0;
+ firstloop = false;
diff --git a/x11-misc/slim/files/slim-1.3.6-systemd-session.patch b/x11-misc/slim/files/slim-1.3.6-systemd-session.patch
new file mode 100644
index 000000000000..0639aeb5f185
--- /dev/null
+++ b/x11-misc/slim/files/slim-1.3.6-systemd-session.patch
@@ -0,0 +1,29 @@
+--- a/app.cpp 2013-10-23 16:19:57.074100282 -0400
++++ b/app.cpp 2013-10-23 16:33:13.302122574 -0400
+@@ -829,8 +829,13 @@
+
+ StopServer();
+ RemoveLock();
+- while (waitpid(-1, NULL, WNOHANG) > 0); /* Collects all dead childrens */
+- Run();
++ if (force_nodaemon) {
++ delete LoginPanel;
++ exit(ERR_EXIT); /* use ERR_EXIT so that systemd's RESTART=on-failure works */
++ } else {
++ while (waitpid(-1, NULL, WNOHANG) > 0); /* Collects all dead childrens */
++ Run();
++ }
+ }
+
+ void App::KillAllClients(Bool top) {
+--- a/slim.service 2013-10-23 16:19:57.074100282 -0400
++++ b/slim.service 2013-10-23 16:45:14.901142776 -0400
+@@ -4,6 +4,7 @@
+
+ [Service]
+ ExecStart=/usr/bin/slim -nodaemon -s
++Restart=on-failure
+
+ [Install]
+ Alias=display-manager.service
+Common subdirectories: slim-1.3.6/themes and slim-1.3.6.new/themes