LinuxQuestions.org
Help answer threads with 0 replies.
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 12-12-2003, 04:20 PM   #16
Peacedog
LQ Guru
 
Registered: Sep 2003
Location: Danville, VA
Distribution: Slackware, Windows, FreeBSD, OpenBSD, Mac OS X
Posts: 5,296

Original Poster
Rep: Reputation: 168Reputation: 168

i've done some doodling and i'm getting closer. i streamlined the code a bit to fascilitate getting it to work.
Code:
userclientrc1=$HOME/.xinitrc1
userclientrc2=$HOME/.xinitrc2


echo "1 = KDE"
echo "2 = Gnome"
echo "Press a number and <Enter>"
read selection

case "$selection" in
  "1"   ) userclientrc=$userclientrc1;;
  "2"   ) userclientrc=$userclientrc2;;
esac
i now have .xinitrc1 and .xinitrc2, the only difference being the last line.

i am posting them here

.xinitrc1

#!/bin/sh
# $XConsortium: xinitrc.cpp,v 1.4 91/08/22 11:41:34 rws Exp $

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/usr/X11R6/lib/X11/xinit/.Xresources
sysmodmap=/usr/X11R6/lib/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:
startkde


.xinitrc2

#!/bin/sh
# $XConsortium: xinitrc.cpp,v 1.4 91/08/22 11:41:34 rws Exp $

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/usr/X11R6/lib/X11/xinit/.Xresources
sysmodmap=/usr/X11R6/lib/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:
startgnome

it now recognizes kde and loads kde. it does not recognize gnome. i get error startgnome unknown command and it takes me back to the cl. so the code is recognizing the separate .xinitrc files. kde loads fine w/ the exception of the multiple desktops described earlier. any suggestions?

Last edited by Peacedog; 12-12-2003 at 04:22 PM.
 
Old 12-12-2003, 05:13 PM   #17
Peacedog
LQ Guru
 
Registered: Sep 2003
Location: Danville, VA
Distribution: Slackware, Windows, FreeBSD, OpenBSD, Mac OS X
Posts: 5,296

Original Poster
Rep: Reputation: 168Reputation: 168
done some more doodling, edited .xinitrc2 as follows

.xinitrc2

#!/bin/sh
# $XConsortium: xinitrc.cpp,v 1.4 91/08/22 11:41:34 rws Exp $

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/usr/X11R6/lib/X11/xinit/.Xresources
sysmodmap=/usr/X11R6/lib/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:
gnome-session

when i type startx i get

please enter selection

1 kde
2 gnome

both selections work, however, the multiple desktops i described earlier are still appearing. if i can get that to stop happening this would be a huge success. any ideas or suggestions are greatly appreciated.
 
Old 12-12-2003, 05:48 PM   #18
Peacedog
LQ Guru
 
Registered: Sep 2003
Location: Danville, VA
Distribution: Slackware, Windows, FreeBSD, OpenBSD, Mac OS X
Posts: 5,296

Original Poster
Rep: Reputation: 168Reputation: 168
i've been searching around and found this thread

http://www.linuxquestions.org/questi...tiple+desktops

unfortunately there were no responses. i am still diddling my .xinitrc files i will post any succes. as always thx for any help or suggetions.
 
Old 12-12-2003, 06:44 PM   #19
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,296

Rep: Reputation: 65
i would have done something similar to that, but blackbox starts so fast,
i just have menu settings to start the other window managers if i want them
at the bottom of my blackbox menu

[restart] (Start Ice) {icewm}
[restart] (Start KDE) {/usr/bin/startkde}
[restart] (Start KDE2) {/opt/kde2/bin/startkde}
[restart] (Start KDE 2.2.2) {/opt/kde-2.2.2/bin/startkde}
[restart] (Blackbox 5) {blackbox5}
[restart] (Blackbox 6) {blackbox}
[restart] (Start XFCE) {xfwm}
[restart] (Start Qvwm) {qvwm}
[restart] (Start Afterstep) {afterstep}
[restart] (Start FVWM) {fvwm}
[restart] (Start WindowMaker) {wmaker}
[restart] (Start Enlightenment) {/usr/enlightenment/bin/enlightenment}
[restart] (Start Gnome-Session) {gnome-session}
[restart] (Start Sawmill) {sawfish}

the only thing tricky in there is was the multiple kde's.
there's ugly little scripts for those that change my path and,
rename's some config files directories. (multiple kde dir's in my home)

crap like this at the beginning of kde 2.0's startkde

rm /root/.kde
ln -s /root/.kde2 /root/.kde
mv /opt/kde-2.2.2 /opt/nde-2.2.2

and stuff like this at the end.

rm /root/.kde
ln -s /root/.kde1 /root/.kde
mv /opt/nde-2.2.2 /opt/kde-2.2.2

kde 2.2.2 is earlier in my path than 2.0, so i can run that freely, but
if i want to run 2.0, i temporarily hide 2.2.2.

i have similar crap going on for about 4 different versions of X.
i like the faster startup speed of 3.3.6. and with the libraries from the
newer versions of X on my system, i can compile and use stuff that
requires newer than 4.0, and still run it under 3.3.6.

anyway, "x" runs whichever version of XFree i ran last, and oldx sets it
to 3.3.6, and newx runs a newer version. can't remember which one
though. come to think of it, i like 3.3.6 best cause i can pull dozens of
kinds of video cards in and out of my machine without reconfiguring
anything. i thought XF86_SVGA was wonderful.


yes, my main system is a mess, but i seem to be able to remember
how stuff works.
 
Old 12-12-2003, 07:02 PM   #20
Angelo
Member
 
Registered: Mar 2003
Location: Connecticut
Distribution: Slackware, OpenBSD
Posts: 61

Rep: Reputation: 15
This is simple but it seems to work:

Make 2 (or more) .xinitrc files like
.xinitrc.gnome
.xinitrc.kde

Make a file called mystartx:
Code:
#!/bin/sh
if [ "$1" == "" ]
then
        echo "1 GNOME"
        echo "2 KDE"
        echo -n "Which WM? "
        read option
else
        option="$1"
fi

case $option in
   1) /usr/X11R6/bin/startx /home/user/.xinitrc.gnome;;
   gnome) /usr/X11R6/bin/startx /home/user/.xinitrc.gnome;;
   2) /usr/X11R6/bin/startx /home/user/.xinitrc.kde;;
   kde) /usr/X11R6/bin/startx /home/user/.xinitrc.kde;;
   *) echo "Bad option!";;
esac

Then alias startx '/home/user/mystartx'


That should do it.

You can then run 'startx kde' or 'startx gnome' or if you don't pass a paramter, the menu comes up.

Angelo

edit: Added missing quotes around $1 in line 2

Last edited by Angelo; 12-12-2003 at 08:31 PM.
 
Old 12-13-2003, 09:06 AM   #21
Peacedog
LQ Guru
 
Registered: Sep 2003
Location: Danville, VA
Distribution: Slackware, Windows, FreeBSD, OpenBSD, Mac OS X
Posts: 5,296

Original Poster
Rep: Reputation: 168Reputation: 168
i've got my original ? answered. it's working when i startx from the cl, i get the options 1 kde
2 gnome

and whichever i select works and loads that wm. the new problem is now i have multiple desktops that start at the middle of my screen and for all i know continue forever to the right. i only see 4, but w/out a right side of the screen i have no idea how many destops there are. any help or suggestions are welcome. thx.
 
Old 12-13-2003, 01:26 PM   #22
Peacedog
LQ Guru
 
Registered: Sep 2003
Location: Danville, VA
Distribution: Slackware, Windows, FreeBSD, OpenBSD, Mac OS X
Posts: 5,296

Original Poster
Rep: Reputation: 168Reputation: 168
i've been diddling files all day. i'm fresh out of ideas. i'm going to get away from it for a while and try again later w/ a fresh thought proccess. for now i'm at the cl. any thoughts or suggestions are welcome. thx.
 
Old 12-13-2003, 06:31 PM   #23
Peacedog
LQ Guru
 
Registered: Sep 2003
Location: Danville, VA
Distribution: Slackware, Windows, FreeBSD, OpenBSD, Mac OS X
Posts: 5,296

Original Poster
Rep: Reputation: 168Reputation: 168
i'm back with "fresh brain". if there is nothing wrong w/ the startx file, nor the .xinitrc1 or 2 file, then there must be another file that is modified. does anyone know if the .xinitrc files modify, linkto, change in any way, any other x files? i've got to be missing something. are there any files or commands i can post the output from to help resolve this. i could just reinstall as this machine doesn't have anything important, (i'm using it to learn before i switch completely) but, that would really be like quitting and i don't have much of that in me. i'd rather fix the problem and learn from it. anywho, i'm still searching around. i'll keep gooogling and doodling for a while. i'm just not ready to quit yet. thx for any responses.
 
Old 12-14-2003, 12:38 PM   #24
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917
Sorry peace, no idea ... what happens, e.g.,
if you load flux or Ice?


I can't think of any way how .xinitrc's should
interfere with the XServers choice of desktops,
so would assume it's KDE and Gnome specific.


Cheers,
Tink
 
Old 12-14-2003, 05:35 PM   #25
Peacedog
LQ Guru
 
Registered: Sep 2003
Location: Danville, VA
Distribution: Slackware, Windows, FreeBSD, OpenBSD, Mac OS X
Posts: 5,296

Original Poster
Rep: Reputation: 168Reputation: 168
thx anyway Tink, i'll try modifing things to use the other wm's and post back. hadn't thought about trying that. i just have no idea how this thing is launching all these desktops at the same time, and, the only thread i found, only instance or reference to this problem, had 0 hits. i may end up just reinstalling, right now i'm working around it, however, it is quite annoying. (fun though, i love to learn)
 
Old 12-16-2003, 07:58 PM   #26
Peacedog
LQ Guru
 
Registered: Sep 2003
Location: Danville, VA
Distribution: Slackware, Windows, FreeBSD, OpenBSD, Mac OS X
Posts: 5,296

Original Poster
Rep: Reputation: 168Reputation: 168
hey Tink, thought i'd post this just in case anyone else runs across the problem. i had a wierd hunch that maybe i was having trouble w/ the onboard video, so, i put in another generic card, disabled the onboard in the bios, loded the correct driver, via xf86config, and walla...everything works great. the script is working as my last few posts will show. if anyone reads this and would like me to post working scripts , i'll be glad to, but , they are posted in this thread. just want to give a shout out to Tink for the code. works like a champ.

Quote:
originally posted by Shade
Tink nails it.
that was so eloquent , that i couldn't expound.
thx again Tink.

Last edited by Peacedog; 12-16-2003 at 08:00 PM.
 
Old 12-16-2003, 08:32 PM   #27
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917
Glad you're all go now mate, even though
I can't take credit for it in the end - you got
it sussed yourself ;)


Cheers,
Tink
 
  


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
Improving the startx script Woodsman Slackware 14 11-05-2005 08:08 AM
WHY should I type startx twice to startx? hiux Debian 6 09-09-2005 09:12 AM
startx doesn't startx for user vdemuth Mandriva 10 11-08-2004 07:41 PM
Bug / Xwindows / startx : xinit works but startx crash www.rzr.free.fr Linux - Software 4 10-17-2004 08:06 AM
startx vs startx -- :2 (font dimension is different!!) moly82 Linux - General 7 09-15-2003 12:11 PM

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

All times are GMT -5. The time now is 10:34 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