LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   want to startx kde and startx xfce (https://www.linuxquestions.org/questions/slackware-14/want-to-startx-kde-and-startx-xfce-4175602007/)

selfprogrammed 03-17-2017 10:47 AM

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?

BW-userx 03-17-2017 10:58 AM

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)

BW-userx 03-17-2017 11:27 AM

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.

allend 03-17-2017 07:53 PM

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.

MadMaverick9 03-17-2017 10:44 PM

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'

BratPit 03-18-2017 07:48 AM

Quote:

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

http://www.hostmat.eu/images/50361177461805599048.png

selfprogrammed 03-18-2017 10:41 AM

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.

BW-userx 03-18-2017 11:47 AM

it is xwmconfig - do not forget the x

Slackware Linux Essentials
Chapter 6 X Configuration

allend 03-18-2017 12:51 PM

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

Gordie 03-18-2017 06:13 PM

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

montagdude 03-18-2017 07:20 PM

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.

selfprogrammed 03-20-2017 11:25 AM

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.

BW-userx 03-20-2017 11:41 AM

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

Gordie 03-20-2017 12:07 PM

Quote:

Originally Posted by selfprogrammed (Post 5685992)
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

BratPit 03-20-2017 01:13 PM

Quote:

Originally Posted by BW-userx (Post 5685997)
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


All times are GMT -5. The time now is 12:09 AM.