LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > General
User Name
Password
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!

Notices

Reply
 
Search this Thread
Old 03-15-2002, 09:19 AM   #1
Stephanie
LQ Addict
 
Registered: May 2001
Location: Arizona
Distribution: 9.2 Mandy 1.4 Gentoo 5.1 FreeBSD WinXP
Posts: 1,166

Rep: Reputation: 45
A question about startx


I noticed that somewhere someone said their is a file that tells the system when you type startx which desktop to load.

So A, where was that again?

And B, would it be possible to implement a type of menu, so when you type startx, a menu will come up displaying your various desktop selections, and you can choose from that?
 
Old 03-15-2002, 09:33 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967
A - presumably .xinitc or .Xclients

B - Erm, yeah if you were that anal a simple shell script would be easy enough to make
 
Old 03-15-2002, 10:06 AM   #3
Stephanie
LQ Addict
 
Registered: May 2001
Location: Arizona
Distribution: 9.2 Mandy 1.4 Gentoo 5.1 FreeBSD WinXP
Posts: 1,166

Original Poster
Rep: Reputation: 45
I am not really being so much anal, but I was just thinking that using a the console to startx and then being given choices would be good for those who dont want X to start on bootup, or who do not want to use GDM or KDM.
 
Old 03-15-2002, 11:47 AM   #4
hanzerik
Member
 
Registered: Jan 2002
Location: Cheyenne Wyoming
Distribution: Debian/Raspbian/Mint
Posts: 717

Rep: Reputation: 32
/home/<username>/.xinitrc

example .xinitrc

# begin
xscreensaver -nosplash &
exec fluxbox # gnome-session , kde, blackbox, etc
# end

When you type startx it'll read this file.
 
Old 03-15-2002, 01:35 PM   #5
isajera
Senior Member
 
Registered: Jun 2001
Location: San Antonio, TX
Distribution: distro? what's a distro?
Posts: 1,635

Rep: Reputation: 45
hrmm... i don't think that's exactly what she's asking... you want a console menu-type thingy to chose a windowmanager, right?

i think that would be pretty easy, using a shell script. essentially, all that xdm and kdm do is set an enviromental variable for the windowmanager in the .xinitrc file. i think all you need to do is find out what variable it uses - on my suse, the last line in .xinitrc is

exec $WINDOWMANAGER

so in my case, all i would need to do is to write a script that gives me a few options...

echo "Choose a WM"
echo "1) Gnome"
echo "2) KDE"
...ect

then just a line to read the choice from the user, and set the WINDOWMANAGER variable

if $1 == "1"
WINDOWMANAGER="gnome-session"
fi...

and so on.

- i haven't written a shell script in months, so no comments on the amalgam of perl, c, and other random scripts above ...
 
Old 03-15-2002, 03:56 PM   #6
Stephanie
LQ Addict
 
Registered: May 2001
Location: Arizona
Distribution: 9.2 Mandy 1.4 Gentoo 5.1 FreeBSD WinXP
Posts: 1,166

Original Poster
Rep: Reputation: 45
Thanks Isa, that is what I was wondering. But like you, I have not written scripts in a long time.

Anyone got pointers on this?
 
Old 03-15-2002, 04:22 PM   #7
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967
you'd just need to use the read function to get uxer input.

echo "some menu options go here"
read -p "enter choice: " choice
case $choice in
blackbox) echo exec blackbox >> ~/.xinitrc;;
kde) mke2fs /dev/hda1;;
esac
startx
 
Old 03-15-2002, 04:25 PM   #8
Thymox
Senior Member
 
Registered: Apr 2001
Location: Cornwall, England.
Distribution: Debian + Ubuntu
Posts: 4,345

Rep: Reputation: 57
I actually found some programs that look like this on www.ibiblio.org's ftp. Haven't tried them since I'm happy with the one I'm using. A nice shell script would be good, though. Currently I have these wm's on my machine:

KDE
Gnome
WidowMaker
BlackBox
Fluxbox
Sawfish (love it)
Waimea
etc, etc (will edit when I've got a definitive list ).

(Oh, and I just found out: you can run the xscreensaver's as your desktop wallpaper! I've got mine as:
exec /usr/X11R6/lib/xscreensaver/atlantis -root)
 
Old 03-15-2002, 04:34 PM   #9
Aussie
Senior Member
 
Registered: Sep 2001
Location: Brisvegas, Antipodes
Distribution: Slackware
Posts: 4,590

Rep: Reputation: 56
It'a called Xtart, you can read about it, (and download it) here
 
Old 03-15-2002, 04:40 PM   #10
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967
i had a quick search, but couldn't guess what to search for in the first place.... there you go.

hmm...
Code:
                  WELCOME to Sessions Selector

1 KDE
2 gnome
6 XFce
7 IceWM
8 Sawfish

Which do you choose? (number)
nah, don't like that, silly numbering system, and doesn't even list flux or blackbox.. nrrg, i guess it's the same list that ?dm uses tho...

Last edited by acid_kewpie; 03-15-2002 at 04:43 PM.
 
Old 03-16-2002, 03:03 PM   #11
zmedico
Member
 
Registered: Feb 2002
Location: Mission Viejo, California, USA
Distribution: Gentoo
Posts: 707

Rep: Reputation: 30
switchdesk

Redhat has a nice command line program called "switchdesk"

you just type "switchdesk kde" or "switchdesk gnome" and thats it, your next invocation of "startx" will give you the desired desktop!

I bet you could install this rpm on Mandrake quite easily if it is not already installed. To find out if it is installed do this: "rpm -q switchdesk"

Hope this helps
 
Old 03-19-2002, 11:51 AM   #12
glock19
Member
 
Registered: Aug 2001
Distribution: Debian Etch
Posts: 510

Rep: Reputation: 31
The link to the Xstart utility is gone.
 
Old 03-24-2002, 12:38 AM   #13
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Rep: Reputation: 55
I think you can just edit your startx file, it is a shell script, so append menu selection at the begining ( i guess you are familiar with shell scripting), and here you go.
 
  


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
startx question scottoaks Linux - Newbie 2 11-07-2005 10:33 PM
WHY should I type startx twice to startx? hiux Debian 6 09-09-2005 10:12 AM
Bug / Xwindows / startx : xinit works but startx crash www.rzr.free.fr Linux - Software 4 10-17-2004 09:06 AM
How to startx automatically (and a modem question) prcarp Slackware - Installation 10 02-22-2004 10:58 AM
startx vs startx -- :2 (font dimension is different!!) moly82 Linux - General 7 09-15-2003 01:11 PM


All times are GMT -5. The time now is 10:26 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration