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.
OK I am doing something silly again, sharing /home with slack and manjaro (arch knock off). with manjaro I had to kill, turn off, disable the login manager because it for whatever reason it was not allowing me to login under my user name, as soon as I disabled that (SDDM) and used startx. I can log in.
now comes Slack it too is startx setup, but because of the way it is setup every time one wants to change the wm/dt xwmconfig needs to be used which over writes .xinitrc every time a different wm/dt is to be used. so, manjaor .xinitrc is set up for $1 case statement. here it is, it is NOT working with slack other than using what is set for the DEFAULT_SESSION.
I cannot figure out why, anyone got any ideas?
Code:
#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)
userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap
#DEFAULT_SESSION=startkde
DEFAULT_SESSION=startfluxbox
# merge in defaults and keymaps
if [ -f $sysresources ]; then
xrdb -merge $sysresources
fi
if [ -f $sysmodmap ]; then
xmodmap $sysmodmap
fi
if [ -f "$userresources" ]; then
xrdb -merge "$userresources"
fi
if [ -f "$usermodmap" ]; then
xmodmap "$usermodmap"
fi
# start some nice programs
if [ -d /etc/X11/xinit/xinitrc.d ] ; then
for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
[ -x "$f" ] && . "$f"
done
unset f
fi
#does not even echo this command
echo "1 $1"
get_session(){
local dbus_args=(--sh-syntax --exit-with-session)
case $1 in
awesome) dbus_args+=(awesome) ;;
bspwm) dbus_args+=(bspwm-session) ;;
budgie) dbus_args+=(budgie-desktop) ;;
cinnamon) dbus_args+=(cinnamon-session) ;;
deepin) dbus_args+=(startdde) ;;
enlightenment) dbus_args+=(enlightenment_start) ;;
enlight) dbus_args+=(enlightenment_start) ;;
fluxbox) dbus_args+=(startfluxbox) ;;
fbox) dbus_args+=(exec startfluxbox) ;;
gnome) dbus_args+=(gnome-session) ;;
i3|i3wm) dbus_args+=(i3 --shmlog-size 0) ;;
jwm) dbus_args+=(jwm) ;;
kde) dbus_args+=(startkde) ;;
lxde) dbus_args+=(startlxde) ;;
lxqt) dbus_args+=(lxqt-session) ;;
mate) dbus_args+=(mate-session) ;;
e16) dbus_args+=(e16) ;;
bbox) dbus_args+=(startblackbox) ;;
wmaker) dbus_args+=(wmaker) ;;
#xfce) dbus_args+=(xfce4-session) ;;
#xfce) dbus_args+=(xfce4-session) ;;
openbox) dbus_args+=(openbox-session) ;;
*) dbus_args+=($DEFAULT_SESSION) ;;
esac
echo "dbus-launch ${dbus_args[*]}"
}
#get_session
#exec $(get_session)
$(get_session)
#update W/M menus
## blackbox, fluxbox, windowmaker
bbmenu &
fbmenu &
mwmenu &
the only thing I am seeing worth posting on the cli after startx , is
Code:
xauth: file /home/userx/.serverauth.5951 does not exist this
when using just 'get_session' echo "1 $1" gave me 'xterm'
Have you got a ~/.xsession file?
This is the one that actually gets executed on the (fairly default) Slackware system I'm replying from.
Try modifying that instead.
======
A couple of notes about your script:
- your final line needs to exec the wm; this means you need to move the lines that start the menus above this.
Then your last line could be:
Code:
exec dbus-launch ${dbus_args[*]}
- why is `getsession' a separate function? I would just remove the first and last lines from the function to inline it, then you don't need to worry about how you call it.
Have you got a ~/.xsession file?
This is the one that actually gets executed on the (fairly default) Slackware system I'm replying from.
Try modifying that instead.
======
A couple of notes about your script:
- your final line needs to exec the wm; this means you need to move the lines that start the menus above this.
Then your last line could be:
Code:
exec dbus-launch ${dbus_args[*]}
- why is `getsession' a separate function? I would just remove the first and last lines from the function to inline it, then you don't need to worry about how you call it.
it is actually written by whomever from Manjaro, it is added on new user login, and It worked without a hitch a few installs ago when I took manjaro down to startx.
this time I
Code:
systemctl disable sddm
I don't remember if that is what I used the first time, I just remember it ws just as easy to trun off the login manager, anyways, I created a different user on manjaro, then tried the .xinitrc in that user login and it didn't work, I researched what other files .xinitrc uses but came up blank, everything was about .bashrc supporting files.
it is actually written by whomever from Manjaro, it is added on new user login, and It worked without a hitch a few installs ago when I took manjaro down to startx.
To clarify about ~/.xinitrc and ~/.xsession, running `wmconfig' on Slackware will create *both* of these files for you. However, only the ~/.xsession one will be set as executable.
To clarify about ~/.xinitrc and ~/.xsession, running `wmconfig' on Slackware will create *both* of these files for you. However, only the ~/.xsession one will be set as executable.
nope, but as valid as you may think that is, that new user I created on manjaro just to check the original script, still didn't work.
that bit is trying to do too much at once on little sleep.
OK I am doing something silly again, sharing /home with slack and manjaro (arch knock off).
I'd share everything but the hidden files and directories. You could do it this way:
Have a separate /home/$USER for each distribution.
Make symlinks only when needed. For instance if you want the same config for Firefox and Thunderbird (assuming the versions are compatible) you could symlink ~/.thunderbird from a distribution to the other one (make sure your regular user has the same UID in both, i.e. "id -u" gives the same output), ditto for Firefox with ~/.mozilla.
Put all non-hidden files in /home/$USER/data in a distribution, make it a symlink to this directory in the other one.
Alternatively put these files in /home/data in a distribution, this directory being owned by $USER, and again make it a symlink to that in the other one.
Last edited by Didier Spaier; 11-16-2018 at 07:39 AM.
I'd share everything but the hidden files and directories. You could do it this way:
Have a separate /home/$USER for each distribution.
Make symlinks only when needed. For instance if you want the same config for Firefox and Thunderbird (assuming the versions are compatible) you could symlink ~/.thunderbird from a distribution to the other one (make sure your regular user has the same UID in both, i.e. "id -u" gives the same output), ditto for Firefox with ~/.mozilla.
Put all non-hidden files in /home/$USER/data in a distribution, make it a symlink to this directory in the other one.
Alternatively put these files in /home/data in a distribution, this directory being owned by $USER, and again make it a symlink to that in the other one.
they are back to separate /homes as of this writing.
Yes, I've made sure that both have exactly the same UID and GID, I've done this before, though that was a while ago. I was trying to see if Slack and Manjaro (arch knock off) play nice together in this kind of setup.
for some symlinks the setup is mimic to the same apps. ie Popcorntime, as far as Firefox the versions will probably, maybe different, depending on update cycles for each distro. Manjaro too is a running relese as Slack current might be put into that same category, depending on who you talk to.
thing is I had manjaro using startx and the .xinitrc that is included to that the modified one is posted, I could almost swear I copied the original over to slack and modded it for the Desktop/ window managers I was using in that and used it instead of running xwmconfig all of the time, the calling of some scripts I wrote to customize menus for dt/wm is new.
the thing is now the .xinitrc does not even work on either system. someone suggested a different file be added, xsessions, which I have not had time to test yet, nor can I remember if that is what I may have had to do the last time when it was working, but not having the two share the same /home.
Have you got a ~/.xsession file?
This is the one that actually gets executed on the (fairly default) Slackware system I'm replying from.
Try modifying that instead.
======
A couple of notes about your script:
- your final line needs to exec the wm; this means you need to move the lines that start the menus above this.
Then your last line could be:
Code:
exec dbus-launch ${dbus_args[*]}
- why is `getsession' a separate function? I would just remove the first and last lines from the function to inline it, then you don't need to worry about how you call it.
Now that I've looked closer into this, as I've always looked at the .xinitrc slack puts in here,
Code:
#!/bin/sh
# $XConsortium: xinitrc.cpp,v 1.4 91/08/22 11:41:34 rws Exp $
userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap
# merge in defaults and keymaps
if [ -f $sysresources ]; then
xrdb -merge $sysresources
fi
if [ -f $sysmodmap ]; then
xmodmap $sysmodmap
fi
if [ -f $userresources ]; then
xrdb -merge $userresources
fi
if [ -f $usermodmap ]; then
xmodmap $usermodmap
fi
# Start the window manager:
if [ -z "$DESKTOP_SESSION" -a -x /usr/bin/ck-launch-session ]; then
exec ck-launch-session /usr/bin/startblackbox
else
exec /usr/bin/startblackbox
fi
I never thought to look at the .xsesson file in here too, which is the same,
Code:
#!/bin/sh
# $XConsortium: xinitrc.cpp,v 1.4 91/08/22 11:41:34 rws Exp $
userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap
# merge in defaults and keymaps
if [ -f $sysresources ]; then
xrdb -merge $sysresources
fi
if [ -f $sysmodmap ]; then
xmodmap $sysmodmap
fi
if [ -f $userresources ]; then
xrdb -merge $userresources
fi
if [ -f $usermodmap ]; then
xmodmap $usermodmap
fi
# Start the window manager:
if [ -z "$DESKTOP_SESSION" -a -x /usr/bin/ck-launch-session ]; then
exec ck-launch-session /usr/bin/startblackbox
else
exec /usr/bin/startblackbox
fi
if memory serves me correctly I'd started adding to the .xinitrc then seen how slack just replaces that every time I changed dt, so I stopped doing it that way, and sought out the other ways to start stuff for the dt,wm, this was back when I first started Linux basically.
so I never looked further into the slack uses .xsesson too.
Thanks for pointing that out.
I'll further my experimentation when I get a chance.
After some more reading, it seems that ~/.xsession is only read when X is started by a display manager, e.g. sddm, gdm, xdm.
~/.xinitrc is used when X is started via `startx'
As Slackware lets the user choose how to run things, the `xwmconfig' script simply updates both files.
(Interestingly enough, the ~/.xinitrc file doesn't need to be executable)
So... my input hasn't helped you much here, sorry. I don't know why your ~/.xinitrc doesn't seem to be being used.
Just out of interest, what is the result of this command?
Code:
ls -l /etc/X11/xinit/xinitrc.d/*
in which distro? I am in Mint right now. thuogh to add, $1 is the 2 string off the cli and it is comming up empty whenever I echo'ed it in both distros, slack, and manJoieo
this is mint though, cough cough..
Code:
userx@minko:~$ ls -l /etc/X11/xinit/xinitrc.d/*
ls: cannot access '/etc/X11/xinit/xinitrc.d/*': No such file or directory
userx@minko:~$ ls /etc/X11
app-defaults fonts Xreset Xsession.d Xwrapper.config
blackbox rgb.txt Xreset.d Xsession.options
cursors xinit Xresources xsm
default-display-manager xkb Xsession XvMCConfig
I am sightly too busy to jump out of Mint at the present moment, in a 10 mins maybe..
back..
same..
no .d dir
Code:
userx@SlackOLatern:~$ ls -l /etc/X11/xinit/xinitrc.d/*
/bin/ls: cannot access '/etc/X11/xinit/xinitrc.d/*': No such file or directory
userx@SlackOLatern:~$ ls -l /etc/X11/xinit/
total 36
-rw-r--r-- 1 root root 321 Mar 16 2003 README.Xmodmap
lrwxrwxrwx 1 root root 15 Nov 14 08:56 xinitrc -> xinitrc.fluxbox*
-rwxr-xr-x 1 root root 661 Nov 9 13:26 xinitrc.blackbox*
-rwxr-xr-x 1 root root 618 Nov 15 17:47 xinitrc.e16*
-rwxr-xr-x 1 root root 660 Apr 13 2018 xinitrc.fluxbox*
-rwxr-xr-x 1 root root 704 Jun 1 13:06 xinitrc.fvwm2*
-rwxr-xr-x 1 root root 627 Apr 17 2018 xinitrc.kde*
-rwxr-xr-x 1 root root 725 Dec 1 2009 xinitrc.twm*
-rwxr-xr-x 1 root root 958 Apr 13 2018 xinitrc.wmaker*
-rwxr-xr-x 1 root root 1198 Apr 13 2018 xinitrc.xfce*
userx@SlackOLatern:~$
After some more reading, it seems that ~/.xsession is only read when X is started by a display manager, e.g. sddm, gdm, xdm.
~/.xinitrc is used when X is started via `startx'
As Slackware lets the user choose how to run things, the `xwmconfig' script simply updates both files.
(Interestingly enough, the ~/.xinitrc file doesn't need to be executable)
So... my input hasn't helped you much here, sorry. I don't know why your ~/.xinitrc doesn't seem to be being used.
hummm well I guess I got a take back my helpful on your post; j/k
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.