SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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)
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.
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.
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.
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
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.