LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 03-17-2017, 10:47 AM   #1
selfprogrammed
Member
 
Registered: Jan 2010
Location: Minnesota, USA
Distribution: Slackware 13.37, 14.2, 15.0
Posts: 635

Rep: Reputation: 154Reputation: 154
want to startx kde and startx xfce


Right now I can only start xfce.
RE: startx -> XFCE, as selected by a link
/etc/X11/xinit/xinitc -> /etc/X11/xinit/xinitrc.xfce

But what if I want to run KDE.
With my Linux 2.6 I had startx->KDE and startxfce4->xfce.

Now someone has gutted the startxfce4 script and it does not start xfce4 correctly anymore when invoked directly.

startkde just errors out because X is not running and it cannot find a display.

Question 1: If startxfce4 and startkde is not meant to be invoked directly, why are they in /usr/bin .

Question 2: How can an user with startx configured to start XFCE, temporarily have a session with KDE instead. I used to be able to do this to test if a program was behaving (or mis-behaving) the same in KDE.
Has someone decided that users are not allowed to do that anymore?
 
Old 03-17-2017, 10:58 AM   #2
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
On the cli type
Code:
xwmconfig
change it to whatever you want to start using startx. if you created that link I'd suggest getting rid of it. use xwmconfig to change .xinitrc when using startx.

you can only run one wm at a time fwik (from what I know)

Last edited by BW-userx; 03-17-2017 at 11:01 AM.
 
2 members found this post helpful.
Old 03-17-2017, 11:27 AM   #3
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
There is a way to run startx the type the WM you want to start but I forget how that is actually done, though this may work too inside .xinitrc something like this could be used.
Code:
 if [[ "$1" =  "kde"  ]] ; then
{
  #run commands for this session
   # start something
    #start something
    #start session kde
  
      printf "1 - $1\n"
}
    

  elif [[ "$1" =  'xfce' ]] ; then 
{
    #run commands for this session
   # start something
    #start something
    #start session startxfce4

  printf "2 - $1\n"
}
  else
  
  #run default session here
  printf "3 - $0\n"
    fi
I think you'd have to bounce back and forth to check out between xfce4 and kde -- things like WindowMaker or is it blackbox that can start a different WM within itself? But kde and xfce4 .. mmmmmm I don't think so.. I've never heard of such a thing as what you've stated.

Last edited by BW-userx; 03-17-2017 at 11:38 AM.
 
Old 03-17-2017, 07:53 PM   #4
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,371

Rep: Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750
Quote:
Question 2: How can an user with startx configured to start XFCE, temporarily have a session with KDE instead.
My suggestion is to create a second user. When logged in, switch to a second console session with Ctrl-Alt-F2, log in as the second user and startx. You can switch between sessions with Ctrl-Alt-F7 and Ctrl-Alt-F8.
 
Old 03-17-2017, 10:44 PM   #5
MadMaverick9
Member
 
Registered: Aug 2010
Posts: 353
Blog Entries: 4

Rep: Reputation: Disabled
Code:
/usr/bin/startx /etc/X11/xinit/xinitrc.kde
Code:
bash $ ls -1 /etc/X11/xinit/
README.Xmodmap
xinitrc.awesome
xinitrc.blackbox
xinitrc.fluxbox
xinitrc.fvwm2
xinitrc.i3
xinitrc.kde
xinitrc.twm
xinitrc.wmaker
xinitrc.xfce
In your shell rc file:
Code:
alias startkde='/usr/bin/startx /etc/X11/xinit/xinitrc.kde > /dev/null 2>&1'
 
2 members found this post helpful.
Old 03-18-2017, 07:48 AM   #6
BratPit
Member
 
Registered: Jan 2011
Posts: 250

Rep: Reputation: 100Reputation: 100
Quote:
ck-launch-session startx /usr/bin/startkde -- /usr/bin/Xephyr :1
KDE "inside" LXDE:

http://www.hostmat.eu/images/50361177461805599048.png
 
1 members found this post helpful.
Old 03-18-2017, 10:41 AM   #7
selfprogrammed
Member
 
Registered: Jan 2010
Location: Minnesota, USA
Distribution: Slackware 13.37, 14.2, 15.0
Posts: 635

Original Poster
Rep: Reputation: 154Reputation: 154
Thank You for the useful ideas. I had hoped that it was some parameter to startx that they did not document.

According to MadMaverick9, that first parameter can select the manager.
I was trying
> startx kde
But maybe you have to specify a full path name.
If that works, I shall be modifying startx to do that automatically.
If it sees $1 is KDE, I will make use the full path to xinitrc.kde.
I was hoping to avoid having to rewrite another part of this install.

---
< wmconfig >
Will have to look into that and what it does. It may be system level only.
However, I definitely do not want to reconfig my setup every time I need to test something.
Have had enough trouble getting it setup to work as it is.
----
< another user >
I thought of that too, but the link to XFCE is set at the system level.
If I can figure out how to get around that for the second user, I ought to be able to do
the same for any user.

Just how did they expect two users on the same system to have separate selections for window manager if this link is set system wide. Is that what wmconfig does ??

It was simple on Linux 2.6, you just edited your profile to start the one you wanted, but that does not work anymore. If they are going to change things like that they could leave some clues around as to what has replaced it and how capable it is.

----
Thanks again.
 
Old 03-18-2017, 11:47 AM   #8
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
it is xwmconfig - do not forget the x

Slackware Linux Essentials
Chapter 6 X Configuration
 
Old 03-18-2017, 12:51 PM   #9
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,371

Rep: Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750
Quote:
ck-launch-session startx /usr/bin/startkde -- /usr/bin/Xephyr :1
With the -resizeable option, that is cool!
Code:
ck-launch-session startx /usr/bin/startkde -- /usr/bin/Xephyr :1 -resizeable
 
Old 03-18-2017, 06:13 PM   #10
Gordie
Member
 
Registered: Aug 2007
Location: Nolalu, Ontario, Canada
Distribution: Slackware64-Current
Posts: 871

Rep: Reputation: 364Reputation: 364Reputation: 364Reputation: 364
xwmconfig
If you run it as root it changes your default window manager at system level.
If you run it as a user it only changes things for that particular user
 
Old 03-18-2017, 07:20 PM   #11
montagdude
Senior Member
 
Registered: Apr 2016
Distribution: Slackware
Posts: 2,011

Rep: Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619
There's also always the option to use runlevel 4 and then use kdm or another display manager to choose your session when you log in.
 
Old 03-20-2017, 11:25 AM   #12
selfprogrammed
Member
 
Registered: Jan 2010
Location: Minnesota, USA
Distribution: Slackware 13.37, 14.2, 15.0
Posts: 635

Original Poster
Rep: Reputation: 154Reputation: 154
The solution by MadMaverick9 works,, that first parameter can select the manager (if you specify it as a full pathname).
> startx /etc/X11/xinit/xinitrc.kde

I can fix the startx script to do that.
> startx kde
---> xinitrc = /etc/X11/xinit/xinitrc.kde
This is not exact because this is going to be a non-trivial exercise.
Something similar to the BW solution (post #2) but done in the system script, instead of just for the one user.

I still do not know why startkde and startxfce4 are in /usr/bin. They fail when executed by a user. I am looking to move them someplace like /etc/X11/xinit, with the other indirect scripts. Will have to find any script that refers to them and rewrite it. Putting a link in /usr/bin does not fix anything. Then they can be replaced by scripts that actually work when executed by the user.

Proposed content /usr/bin/startkde :
#!/bin/sh
startx /etc/X11/xinit/xinitrc.kde

However, I will need to see if this leaves any extra executions of bash hanging around while X is active. The alternative is to bury the same code in startkde, but triggered by detecting no other parameters (which may be non-trivial) considering that other scripts that may already invoke it that way.


<xwmconfig>
This is the same program that sets up the system wide default at installation.
When run as root is sets the soft link in /etc/X11/xinit .
It can do this on a per user basis by copying the xinit file to the user directory, as ./xinitrc . In doing this it wipes out any user modifications to ./xinitrc .

As stated, I do not want to keep changing default settings to accomplish this.

Last edited by selfprogrammed; 03-20-2017 at 11:28 AM.
 
Old 03-20-2017, 11:41 AM   #13
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
I found this you might be able to make something out of it, it speaks of running different wm in different ttys I think at the same time.

https://bbs.archlinux.org/viewtopic.php?id=113002

another
: Howto: Running multiple X sessions
 
Old 03-20-2017, 12:07 PM   #14
Gordie
Member
 
Registered: Aug 2007
Location: Nolalu, Ontario, Canada
Distribution: Slackware64-Current
Posts: 871

Rep: Reputation: 364Reputation: 364Reputation: 364Reputation: 364
Quote:
Originally Posted by selfprogrammed View Post
As stated, I do not want to keep changing default settings to accomplish this.
On KDE or XFCE what mods to your xinitrc have you made? Only with Blackbox have I had to mod the xintrc.

My KDE and XFCE keep their settings

Last edited by Gordie; 03-20-2017 at 05:55 PM.
 
Old 03-20-2017, 01:13 PM   #15
BratPit
Member
 
Registered: Jan 2011
Posts: 250

Rep: Reputation: 100Reputation: 100
Quote:
Originally Posted by BW-userx View Post
I found this you might be able to make something out of it, it speaks of running different wm in different ttys I think at the same time.

https://bbs.archlinux.org/viewtopic.php?id=113002

another
: Howto: Running multiple X sessions
Yeah

Quote:
startx /etc/X11/xinit/xinitrc.kde -- :1
Quote:
startx /etc/X11/xinit/xinitrc.fluxbox -- :2
Quote:
startx /etc/X11/xinit/xinitrc.openbox -- :3
Quote:
startx /etc/X11/xinit/xinitrc.lxde -- :4
 
1 members found this post helpful.
  


Reply



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
[SOLVED] [startx problem] - startx goes to black/grey screen and comes back to command prompt! iNUKE Ubuntu 13 01-07-2011 01:32 PM
(nvidia) First startx = blank screen, second startx = works ?!? BuckRogers01 Linux - Hardware 2 04-07-2006 05:26 PM
Bug / Xwindows / startx : xinit works but startx crash www.rzr.free.fr Linux - Software 4 10-17-2004 08:06 AM
startx (xfce) Shr00mBoXx Slackware 7 03-28-2004 11:26 AM
XFCE crashes when i startx. kriep Slackware 1 12-06-2003 11:31 PM

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

All times are GMT -5. The time now is 06:05 PM.

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