LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices

Reply
 
Search this Thread
Old 12-05-2004, 12:09 AM   #1
paegus
LQ Newbie
 
Registered: Apr 2004
Location: Edinburgh
Distribution: Ubuntu 10.04
Posts: 8

Rep: Reputation: 0
FC3 adding to session list (blackbox, etc)


I would like to add 3rd party session managers to the default list so you can pick them at login and set them as default via switchdesk.

how can i do this or at least where should i be looking?
 
Old 12-07-2004, 08:54 AM   #2
Winno
Member
 
Registered: Sep 2003
Location: Australia
Distribution: Fedora Core 3 / Mandrake 10.1 / Gentoo 2005.0
Posts: 100

Rep: Reputation: 15
I could be wrong in this, but this could be a starting point for those who want to experiment. Notice the /etc/X11 directory

As root:

Copy and modify one of the KDE/GNOME scripts in this folder:
/etc/X11/gdm/Sessions

Open file /etc/X11/xdm/Xsession, locate the section below (about halfway down) and copy and modify the KDE line

Code:
# now, we see if xdm/gdm/kdm has asked for a specific environment
case $# in
1)
    if [ -x "$SWITCHDESKPATH/Xclients.$1" ]; then
       exec -l $SHELL -c "$SSHAGENT $SWITCHDESKPATH/Xclients.$1";
    fi;

    case "$1" in
    failsafe)
       exec -l $SHELL -c "xterm -geometry 80x24-0-0"
       ;;
    gnome)
       exec -l $SHELL -c "$SSHAGENT gnome-session"
       ;;
    kde|kde1|kde2)
       exec -l $SHELL -c "$SSHAGENT $SWITCHDESKPATH/Xclients.kde"
       ;;

To set a default graphical environment, open up /etc/X11/xinit/Xclients and alter the defaults. This section is about 1/3 of the way down. Here's my swapped section:

Code:
if [ -z "$PREFERRED" ]; then

    GSESSION=gnome-session
    STARTKDE=startkde

    # by default, we run KDE.
    if which $STARTKDE >/dev/null 2>&1; then
        exec `which $STARTKDE`
    fi

    # if KDE isn't installed, try GNOME.
    if which $GSESSION >/dev/null 2>&1; then
        exec `which $GSESSION`
    fi
fi
I know this is messy, but hopefully one day someone (or even myself) could come up with a nice GUI to work this out.

Hope this helps

Last edited by Winno; 12-07-2004 at 08:58 AM.
 
Old 12-07-2004, 04:48 PM   #3
triet
Member
 
Registered: Apr 2003
Distribution: Fedora Core 4
Posts: 34

Rep: Reputation: 15
This is what i did (for Xfce4):

1. Copy the desktop entry file of your 3rd party session manager into /usr/share/xsessions folder. In my case, i installed Xfce to /2nd/programs/xfce-4RC1 folder, this is what i did:

# cp /2nd/programs/xfce-4RC1/share/examples/xfce42.desktop /usr/share/xsessions/

This adds an entry of Xfce42 to the login screen next too Gnome, KDE, failsafe...

2. To make it the default:

Go to your home folder:
# cd ~
Make a backup copy of your current .Xclients-default just in case:
# cp .Xclients-default .Xclients-default.backup
Change .Xclients-default to contain this:
#!/bin/bash
exec <fullpath-to-startYourSessionManager> (in my case it's exec /2nd/programs/xfce-4RC1/bin/startxfce4)
exit 1

This makes xfce4 the default manager already, no need to run switchdesk. It actually doesn't show up on switchdesk.

This way is not sophisticated like Winno's way but i found it's less headace. Hope it can help you. I'll try Winno's way now.
 
Old 01-15-2005, 09:21 AM   #4
dolvmin
Member
 
Registered: Jul 2003
Location: Florida
Distribution: Red Hat 7.2/8/9, Fedora Core 1/2/3, Smoothwall, Mandrake 7.0/10, Vecter 4, Arch 0.6, EnGuarde
Posts: 289

Rep: Reputation: 30
Quote:
Originally posted by Winno
I could be wrong in this, but this could be a starting point for those who want to experiment. Notice the /etc/X11 directory

As root:

Copy and modify one of the KDE/GNOME scripts in this folder:
/etc/X11/gdm/Sessions

Open file /etc/X11/xdm/Xsession, locate the section below (about halfway down) and copy and modify the KDE line

Code:
# now, we see if xdm/gdm/kdm has asked for a specific environment
case $# in
1)
    if [ -x "$SWITCHDESKPATH/Xclients.$1" ]; then
       exec -l $SHELL -c "$SSHAGENT $SWITCHDESKPATH/Xclients.$1";
    fi;

    case "$1" in
    failsafe)
       exec -l $SHELL -c "xterm -geometry 80x24-0-0"
       ;;
    gnome)
       exec -l $SHELL -c "$SSHAGENT gnome-session"
       ;;
    kde|kde1|kde2)
       exec -l $SHELL -c "$SSHAGENT $SWITCHDESKPATH/Xclients.kde"
       ;;

To set a default graphical environment, open up /etc/X11/xinit/Xclients and alter the defaults. This section is about 1/3 of the way down. Here's my swapped section:

Code:
if [ -z "$PREFERRED" ]; then

    GSESSION=gnome-session
    STARTKDE=startkde

    # by default, we run KDE.
    if which $STARTKDE >/dev/null 2>&1; then
        exec `which $STARTKDE`
    fi

    # if KDE isn't installed, try GNOME.
    if which $GSESSION >/dev/null 2>&1; then
        exec `which $GSESSION`
    fi
fi
I know this is messy, but hopefully one day someone (or even myself) could come up with a nice GUI to work this out.

Hope this helps
Dude, don't know why you are looking for a 3rd party program when you already have gnome-session*rpm installed. It's part of the FC3 package. Only difference between FC2 and FC3 is FC2 has a GUI program that allows changing the default desktop. On either FC2 or FC3, you can use the following command to change the default desktop. If you installed blackbox as a RPM, you shouldn't have to do anything with code.
Code:
switchdesk "desktop name"

(eg. switchdesk kde, switchdesk gnome, switchdesk xfce, (and in your case) switchdesk blackbox)
That's it. 2 word syntex to fix all your problems!

If you need to step away from gnome-session*rpm, I don't think there is one. But if you are interested in changing this in the gui, just make a small script program and have it linked to a icon you create on the desired desktop. Or learn VC++ and QDesigner and create some widgets. Hope this helps bud. =)

Last edited by dolvmin; 01-15-2005 at 09:28 AM.
 
Old 01-15-2005, 09:24 AM   #5
dolvmin
Member
 
Registered: Jul 2003
Location: Florida
Distribution: Red Hat 7.2/8/9, Fedora Core 1/2/3, Smoothwall, Mandrake 7.0/10, Vecter 4, Arch 0.6, EnGuarde
Posts: 289

Rep: Reputation: 30
This is what I did:
Code:
switchdesk blackbox
Of corse, this does not apply if you install blackbox with make.

Last edited by dolvmin; 01-15-2005 at 09:30 AM.
 
Old 01-15-2005, 10:11 AM   #6
dolvmin
Member
 
Registered: Jul 2003
Location: Florida
Distribution: Red Hat 7.2/8/9, Fedora Core 1/2/3, Smoothwall, Mandrake 7.0/10, Vecter 4, Arch 0.6, EnGuarde
Posts: 289

Rep: Reputation: 30
Making a GUI for this should not be that tough. All they need to do is this:
Code:
//Assuming C++
//Declaring major varables.
int SessionOptions = 4;
char Session[SessionOptions] = { "gnome", "kde", "xfce", "blackbox" };
int SessionDesired;

// Program Execution
cin >> SessionDesired;  // Replace with widgets from QT Designer
System( "gnome-session" Session[SessionDesired] );
Of corse this is a very crude and simple program. It may not even work without some alteration, but it's complexity should be the same. Addition syntex would be added for addition support. Addition support could be security, error control, addition compatibility functionality, etc. If I knew how to use QT Designer, I would have made this in a heart beat, and thrown it as a RPM for the public.
 
Old 01-15-2005, 04:05 PM   #7
jspaar
Member
 
Registered: Feb 2004
Location: California
Posts: 99

Rep: Reputation: 15
I don't know how to add something to switchdesk's list. But you can add stuff to the gdm Sessions menu pretty easily:

# cd /etc/X11/dm/Sessions
# cp gnome.desktop foo.desktop

edit foo.desktop:
change Name=GNOME to Name=foo
change Exec=gnome-session to Exec=foo-session

Create a /usr/local/bin/foo-session script that starts your session.

Next time you start gdm, "foo" will appear as an option on the Sessions drop down.
 
  


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
how to change session types list lordmyth Suse/Novell 1 02-20-2005 02:09 AM
blackbox-save session ANU Linux - Software 3 10-01-2003 06:42 AM
blackbox-save session ANU Linux - Software 0 09-25-2003 02:19 PM
adding blackbox to windowmanager choice list on startup ichbinesderelch LinuxQuestions.org Member Success Stories 2 08-14-2003 10:48 AM
Saving a Blackbox session so it loads at next login? deepsix Linux - Software 1 07-22-2003 12:53 PM


All times are GMT -5. The time now is 03:48 AM.

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