chiark / gitweb /
Initial commit.
authorSimon Tatham <anakin@pobox.com>
Sun, 19 Jan 2025 10:50:31 +0000 (10:50 +0000)
committerSimon Tatham <anakin@pobox.com>
Sun, 19 Jan 2025 13:52:47 +0000 (13:52 +0000)
I've had a personal bodgeware version of this tiny package for some
years. Yesterday I mentioned it to Ian Jackson, who strongly
encouraged me to polish it up and try to get it into Debian proper.

README [new file with mode: 0644]
debian/changelog [new file with mode: 0644]
debian/control [new file with mode: 0644]
debian/copyright [new file with mode: 0644]
debian/rules [new file with mode: 0755]
debian/xsession-traditional.install [new file with mode: 0644]
xsession-traditional.desktop [new file with mode: 0644]

diff --git a/README b/README
new file mode 100644 (file)
index 0000000..4c6c1ac
--- /dev/null
+++ b/README
@@ -0,0 +1,54 @@
+In the 1990s, GUI login managers didn't come with a drop-down list for
+you to select which desktop session type, or window manager, you
+wanted to run after logging in. You just typed a username and a
+password.
+
+To select what software you wanted to run in your X session, you'd
+create a file called ~/.xsession. (And if you didn't have one, the
+system would do something default, controlled by /etc/X11/Xsession.)
+
+Your .xsession would be an executable file, typically a shell script.
+So it wasn't limited to _just_ choosing one desktop session manager or
+WM and starting it up. It could do lots of other things as well: start
+up some initial X applications (clocks, terminals, whatever you
+liked), set environment variables, run background tools like
+ssh-agent, tinker with the X server's settings. Lots of flexibility.
+
+Nowadays the normal thing is to just choose a desktop session type
+from the list presented by lightdm or gdm or whatever. If you have
+detailed preferences, you set them by tweaking the configuration of
+the session manager itself. But if the session manager doesn't have
+enough configuration options for you, or they're too hard to use, then
+maybe you'd rather go back to having a shell script which can do its
+own thing and _then_ run your session manager.
+
+If you want to do this, then write a ~/.xsession script, and run it by
+selecting the option "Traditional X session" from the login prompt's
+list.
+
+Caveats:
+
+Your ~/.xsession has to be executable. It's not enough to just fill it
+with shell commands. You have to start it with #!/bin/sh or similar,
+and 'chmod +x' the file to make it executable.
+
+If you want to end up running one of the standard session types after
+your script has done its setup, then you should end your .xsession
+with an appropriate command to run a session manager. To find out what
+kind of commands will work, you can look in the other files in
+/usr/share/xsessions. Each one will have a line starting with "Exec="
+followed by a shell command. Some are long and complicated; some are
+short and simple. For example:
+
+  Exec=startxfce4
+  Exec=/usr/bin/gnome-session --session=gnome
+
+One of those commands is probably a good choice to put at the end of
+your .xsession.
+
+If you mess up the script so that it fails to run a session manager at
+all (say, by crashing first, or not finding the session manager
+program), then your X session will terminate immediately and you'll be
+back at the login prompt. In that case, switch back to some other
+session type instead of "Traditional X session", and you can log in
+some other way and edit the script.
diff --git a/debian/changelog b/debian/changelog
new file mode 100644 (file)
index 0000000..8b481f3
--- /dev/null
@@ -0,0 +1,5 @@
+xsession-traditional (1.0-1) unstable; urgency=medium
+
+  * Initial release
+
+ -- Simon Tatham <anakin@pobox.com>  Sun, 19 Jan 2025 10:40:03 +0000
diff --git a/debian/control b/debian/control
new file mode 100644 (file)
index 0000000..d28aef9
--- /dev/null
@@ -0,0 +1,23 @@
+Source: xsession-traditional
+Maintainer: Simon Tatham <anakin@pobox.com>
+Section: x11
+Priority: optional
+Build-Depends: debhelper-compat (= 12),
+               debhelper (>=9)
+Standards-Version: 4.7.0.2
+
+Package: xsession-traditional
+Architecture: all
+Depends: ${misc:Depends}, x11-common
+Description: desktop file to run a traditional ~/.xsession
+ This package installs a single file in /usr/share/xsessions which
+ adds a "Traditional Xsession" option to the list of session types in
+ graphical login managers such as gdm and lightdm. That option runs
+ the script /etc/X11/Xsession on login, which in turn will invoke
+ ~/.xsession in the user's home directory if there is one.
+ .
+ This still allows you to run a modern login session such as GNOME or
+ Xfce, by ending your .xsession with a command to launch the session
+ manager. But it also allows you the flexibility to change settings or
+ launch other programs before the login session starts, or modify the
+ options it is run with.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644 (file)
index 0000000..85b20db
--- /dev/null
@@ -0,0 +1,20 @@
+The xsession-traditional package is copyright 2024 Simon Tatham.
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation files
+(the "Software"), to deal in the Software without restriction,
+including without limitation the rights to use, copy, modify, merge,
+publish, distribute, sublicense, and/or sell copies of the Software,
+and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT.  IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE
+FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/debian/rules b/debian/rules
new file mode 100755 (executable)
index 0000000..2301372
--- /dev/null
@@ -0,0 +1,5 @@
+#!/usr/bin/make -f
+
+%:
+       dh $@ 
+
diff --git a/debian/xsession-traditional.install b/debian/xsession-traditional.install
new file mode 100644 (file)
index 0000000..6fb4164
--- /dev/null
@@ -0,0 +1,2 @@
+./xsession-traditional.desktop /usr/share/xsessions
+./README /usr/share/doc/xsession-traditional
diff --git a/xsession-traditional.desktop b/xsession-traditional.desktop
new file mode 100644 (file)
index 0000000..2ffd92a
--- /dev/null
@@ -0,0 +1,4 @@
+[Desktop Entry]
+Name=Traditional X session
+Comment=Use the traditional X11 login script which honours ~/.xsession
+Exec=/etc/X11/Xsession