LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-08-2014, 05:22 PM   #1
rkfb
Member
 
Registered: Oct 2003
Location: Guildford, England
Distribution: Slackware64 -current running i3
Posts: 499

Rep: Reputation: 174Reputation: 174
Select session from runlevel 3


Just thought I would share this in case people didn't know it could be done or found it useful.

I run twm as my main desktop and boot in to a command prompt on runlevel 3. Once there and logged in I can select the session I wish to run by varying my startx command thus:

First off I have a .bash_profile:

#!/bin/bash
# .bash_profile

if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi

to pick up my .bashrc that contains this section:

# startx
alias startx0='startx ~/path/to/xinit/files/xinitrc0'
alias startx1='startx ~/path/to/xinit/files/xinitrc1'
alias startx2='startx ~/path/to/xinit/files/xinitrc2'
alias startx3='startx ~/path/to/xinit/files/xinitrc3'
alias startx4='startx ~/path/to/xinit/files/xinitrc4'

xinitrc0 to xinitrc4 have varying contents.
0: has the default twm desktop configuration, untouched from installation runs one xterm, nothing else, full screen.
2: runs a full desktop, opening everything I need for programming, multimedia and sysadmin.
3: opens a just few programming apps.
4: opens a web browser and a couple of other bits and pieces.

Typing startx* on login logs me in to the relevant session depending what I'm after. The above are just examples, you could make them what you like, adding as many as you like. It doesn't depend on you running twm, your default DE could be anything (as far as I understand, someone here may know more), just that you boot up to the command line. All you have to do is edit the various xinitrc's according to what you're after.

I do find it really useful and definitely prefer it to being dropped in at a graphical login. In fact I'll quite often select startx1 as I can quickly fire up a browser or whatever from there. (Getting a full screen xterm was just trial and error on the geometry numbers).

Hope this helps someone.
 
Old 02-08-2014, 07:09 PM   #2
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,493

Rep: Reputation: 2809Reputation: 2809Reputation: 2809Reputation: 2809Reputation: 2809Reputation: 2809Reputation: 2809Reputation: 2809Reputation: 2809Reputation: 2809Reputation: 2809
Thanks for sharing.

Glad it works for you; a poor man's version of Activities in KDE, but with all the fun of extra X restarts.
 
Old 02-09-2014, 04:34 AM   #3
rkfb
Member
 
Registered: Oct 2003
Location: Guildford, England
Distribution: Slackware64 -current running i3
Posts: 499

Original Poster
Rep: Reputation: 174Reputation: 174
Quote:
Originally Posted by allend View Post
Thanks for sharing.

Glad it works for you; a poor man's version of Activities in KDE, but with all the fun of extra X restarts.
Or you can login on different virtual consoles and switch between environments with ctrl-alt-F*.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
MES5 in runlevel 3 stuck after starting mavisd. Can't change back to runlevel 5 JnPson Linux - Enterprise 3 01-16-2013 06:58 PM
[SOLVED] Getting a text console runlevel in Kubuntu 10.04 (Changing runlevel won't work) gregorian Linux - Newbie 4 09-05-2010 11:50 AM
Root Session in FC10 - can't login in GUI (runlevel 5) stefanolima Fedora 10 07-12-2010 06:10 AM
Gentoo - Select GNOME as default session lord-lucifer Linux - Newbie 1 08-18-2008 04:45 PM
Can't select KDE session Myrdos Linux - Software 2 12-21-2004 12:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration