Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Fixing new sessions with GDM 2.6
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
monotux
l33t
l33t


Joined: 09 Sep 2003
Posts: 751
Location: Stockholm, Sweden

PostPosted: Sat Apr 17, 2004 9:20 am    Post subject: Fixing new sessions with GDM 2.6 Reply with quote

GDM have changed their directory where the different xsessions are stored, so /ect/X11/Sessions is obselete.
The new sessions-directory is located at /usr/share/xsessions, and as you can see, the sessions have a new format ("kde.desktop", "gnome.desktop"), and in these files, you only have one line to start your favourite WM / DE.

Since I need xmodmap, imwheel, perlpanel and xfce-mcs-manager while using openbox, I had a serious problem (I won't sit and start these programs manually every time I log in), but I found a lame solution.

I went to /usr/local/bin, and created a file called "openbox-start". This is the content:
Code:
#!/bin/bash
exec xmodmap -e "pointer = 1 2 3 6 7 4 5" &
exec imwheel -p -k -b "000067" -f &
xfce-mcs-manager &
perlpanel &
openbox

that is my "old" .xinitrc. after that, I did a
Code:
chmod 755 openbox-start

so that I can execute the program.

I went back to /usr/share/xsessions, and did this with openbox.desktop:
Code:
[Desktop Entry]
Encoding=UTF-8
Name=Openbox
Comment=This session logs you into Openbox
Exec=openbox-start
TryExec=openbox-start
# no icon yet, only the top three are currently used
Icon=
Type=Application


instead of running only openbox, GDM now runs openbox-start, that contains all the other programs I need. Quite lame, actually :-)

this model is really simple to copy and use with other WM / DEs, it's as simple as changing a name here and there.

Good luck!

(edit: fixed some minor spelling issues)
_________________
Computer science is no more about computers than astronomy is about telescopes.


Last edited by monotux on Fri Apr 23, 2004 4:36 pm; edited 3 times in total
Back to top
View user's profile Send private message
Stormy Eyes
Veteran
Veteran


Joined: 09 Apr 2003
Posts: 1064
Location: Watching God spit-shine my boots.

PostPosted: Wed Apr 21, 2004 3:39 pm    Post subject: Reply with quote

Thanks, Retribute. I was about to start futzing around trying to figure this out myself, but you saved me some work. *purr*
Back to top
View user's profile Send private message
sparks
Guru
Guru


Joined: 05 Mar 2003
Posts: 329
Location: Nashville, TN

PostPosted: Wed Apr 21, 2004 4:44 pm    Post subject: Reply with quote

big thanks! I hade been wondering about this for awhile :lol:
_________________
True trade is honest, but not merciful. Politics is dishonest, no matter how merciful... and war is neither honest nor merciful.... therefore, choose trade above politics, but politics above war.
Back to top
View user's profile Send private message
Odin
Tux's lil' helper
Tux's lil' helper


Joined: 04 Mar 2003
Posts: 92

PostPosted: Fri Apr 23, 2004 5:52 am    Post subject: Reply with quote

Thanks a lot, I was a little annoyed that I couldn't easily switch between gnome and kde anymore :)
Back to top
View user's profile Send private message
colush
n00b
n00b


Joined: 10 Jul 2003
Posts: 2

PostPosted: Sat Apr 24, 2004 12:46 pm    Post subject: Reply with quote

I had followed steps listed above,
first, i created an executable file under "/usr/local/bin" named "gnome-personal" . The content is:
Code:

#!/bin/bash
                                                                               
gnome-session &
                                                                               
#Chinese Input Method
export XMODIFIERS="@im=SCIM"
export XIM=scim
export XIM_PROGRAM=scim
scim -d



Since I want to use the CHN IME, i added the last few lines.
Then I created the session file "gnome-personal.desktop" under /usr/share/xsession, and it follows as:

Code:

[Desktop Entry]
Encoding=UTF-8
Type-XSession
Name=Gnome-Personal
Comment=Gnome Session with Eng menu & Chinese IME
Exec=gnome-personal
TryExec=gnome-personal
# no icon yet, only the top three are currently used
Icon=
Type=Application


But the problem is that everytime i start the X desktop by choosing the option "gnome-personal", I alwasy encounter the same error which is listed below:(the errors are stored in ~/.xsession-error)
Quote:

/etc/X11/gdm/Xsession: Setup done, will execute: /usr/bin/ssh-agent -- gnome-personal
SESSION_MANAGER=local/pcwhite:/tmp/.ICE-unix/32104
Failed to load socket Server module.

And because of this error, it always automatically logout. Anyone who can give me some advice? THX!


Last edited by colush on Sun Apr 25, 2004 4:58 pm; edited 1 time in total
Back to top
View user's profile Send private message
monotux
l33t
l33t


Joined: 09 Sep 2003
Posts: 751
Location: Stockholm, Sweden

PostPosted: Sun Apr 25, 2004 10:56 am    Post subject: Reply with quote

Code:
#!/bin/bash                                                               
#Chinese Input Method
export XMODIFIERS="@im=SCIM" &
export XIM=scim &
export XIM_PROGRAM=scim &
scim -d &                                       
gnome-session


try this. hope it works! :-)
_________________
Computer science is no more about computers than astronomy is about telescopes.
Back to top
View user's profile Send private message
Apreche
Guru
Guru


Joined: 18 Sep 2003
Posts: 506
Location: Beacon, NY

PostPosted: Sun May 23, 2004 2:08 pm    Post subject: Reply with quote

Grrrr. This is not a difficult change, but an annoying one. I just upgraded the gdm and all my different sessions dissapeared. It used to be when I would emerge a window manager ( like xfce4 ) that it would see I have gdm and configure it properly without my interference. But now I upgraded gdm and the only session it has that works is failsafe xterm. Not that I can't do the configuration file thing, in fact I'm doing it right now. But, I wish when emerged gdm that portage would have automatically upped my configuration. I mean etc-updates wouldn't even help with something like this.

How hard would it be to write a tool so that when an app changes its config files that it can parse the old configuration out and change its format. You can't tell me it would have been that hard for it to take my .xinitrc and make an xfce4-start script and an entry in /usr/share/xsessions.

ok, don't mind me. I'm just annoyed I can't load my window manager right now :x
Back to top
View user's profile Send private message
monotux
l33t
l33t


Joined: 09 Sep 2003
Posts: 751
Location: Stockholm, Sweden

PostPosted: Tue May 25, 2004 9:09 pm    Post subject: Reply with quote

why not write one yourself? :)
_________________
Computer science is no more about computers than astronomy is about telescopes.
Back to top
View user's profile Send private message
MasonS
Tux's lil' helper
Tux's lil' helper


Joined: 30 May 2003
Posts: 90

PostPosted: Thu May 27, 2004 7:10 am    Post subject: Reply with quote

I just copied the openbox.desktop to a user.desktop, gave it a new name and pointed the Exec line to /home/user/.xinitrc
Back to top
View user's profile Send private message
Cali
n00b
n00b


Joined: 03 Feb 2004
Posts: 10
Location: Karlsruhe, Germany

PostPosted: Fri Jun 18, 2004 7:43 pm    Post subject: Reply with quote

Hell! I created a loginscript for blackbox in the way, you folks described.
Just an information for other folks, having problems with this: You can loose hours, if you forget to set the accessright to the *.desktop file in /usr/share/xsession to 755 ;)
Back to top
View user's profile Send private message
monotux
l33t
l33t


Joined: 09 Sep 2003
Posts: 751
Location: Stockholm, Sweden

PostPosted: Mon Jun 21, 2004 1:09 pm    Post subject: Reply with quote

MasonS wrote:
I just copied the openbox.desktop to a user.desktop, gave it a new name and pointed the Exec line to /home/user/.xinitrc


haha, that was the lamest of them all! :)
I'm pretending I'm running a multi user system, so I try to keep my system "safe"... :P :)
_________________
Computer science is no more about computers than astronomy is about telescopes.
Back to top
View user's profile Send private message
MasonS
Tux's lil' helper
Tux's lil' helper


Joined: 30 May 2003
Posts: 90

PostPosted: Mon Jun 21, 2004 1:24 pm    Post subject: Reply with quote

For further information regarding security, please visit man chmod or run a search at http://www.google.com/linux for 'permissions'.
Back to top
View user's profile Send private message
DeZZa
n00b
n00b


Joined: 08 Apr 2004
Posts: 58
Location: Denmark, Aalborg

PostPosted: Tue Jul 06, 2004 11:39 pm    Post subject: Reply with quote

Thanks furiorc .. Logical! :D .. I was wondering how i should solve this problem, searched on google for problem, and i was lucky this time ;) no more time to mess around!

Have a great day! :D ..
Back to top
View user's profile Send private message
ilon
n00b
n00b


Joined: 12 Jul 2004
Posts: 1
Location: sweden

PostPosted: Mon Jul 12, 2004 10:58 am    Post subject: Re: Fixing new sessions with GDM 2.6 Reply with quote

furiorc wrote:
GDM have changed their directory where the different xsessions are stored, so /ect/X11/Sessions is obselete.
The new sessions-directory is located at /usr/share/xsessions, and as you can see, the sessions have a new format ("kde.desktop", "gnome.desktop"), and in these files, you only have one line to start your favourite WM / DE.

Since I need xmodmap, imwheel, perlpanel and xfce-mcs-manager while using openbox, I had a serious problem (I won't sit and start these programs manually every time I log in), but I found a lame solution.

I went to /usr/local/bin, and created a file called "openbox-start". This is the content:
Code:
#!/bin/bash
exec xmodmap -e "pointer = 1 2 3 6 7 4 5" &
exec imwheel -p -k -b "000067" -f &
xfce-mcs-manager &
perlpanel &
openbox

that is my "old" .xinitrc. after that, I did a
Code:
chmod 755 openbox-start

so that I can execute the program.

I went back to /usr/share/xsessions, and did this with openbox.desktop:
Code:
[Desktop Entry]
Encoding=UTF-8
Name=Openbox
Comment=This session logs you into Openbox
Exec=openbox-start
TryExec=openbox-start
# no icon yet, only the top three are currently used
Icon=
Type=Application


instead of running only openbox, GDM now runs openbox-start, that contains all the other programs I need. Quite lame, actually :-)

this model is really simple to copy and use with other WM / DEs, it's as simple as changing a name here and there.

Good luck!

(edit: fixed some minor spelling issues)


It dosnt work for me... :/

Code:

root@b0rked xsessions # ls -la /usr/share/xsessions/
total 16
drwxr-xr-x    2 root root  144 Jul 11 06:06 .
drwxr-xr-x  103 root root 2704 Jul 11 05:19 ..
-rwxr-xr-x    1 root root  202 Jun 25 15:10 fluxbox.desktop
-rwxr-xr-x    1 root root 2919 Jun 25 15:53 gnome.desktop
-rwxr-xr-x    1 root root  195 Jul 11 05:32 xfce.desktop

Code:

root@b0rked xsessions # cat xfce.desktop
[Desktop Entry]
Encoding=UTF-8
Name=Xcfe4
Comment=This session logs you into XFCE4
Exec=startxfce4
TryExec=startxfce4
# no icon yet, only the top three are currently used
Icon=
Type=Application

but it only shows fluxbox and gnome... (and the failsafe and so)
_________________
dont fix what isnt broken
Back to top
View user's profile Send private message
monotux
l33t
l33t


Joined: 09 Sep 2003
Posts: 751
Location: Stockholm, Sweden

PostPosted: Fri Nov 12, 2004 9:55 pm    Post subject: Re: Fixing new sessions with GDM 2.6 Reply with quote

ilon wrote:
furiorc wrote:
GDM have changed their directory where the different xsessions are stored, so /ect/X11/Sessions is obselete.
The new sessions-directory is located at /usr/share/xsessions, and as you can see, the sessions have a new format ("kde.desktop", "gnome.desktop"), and in these files, you only have one line to start your favourite WM / DE.

Since I need xmodmap, imwheel, perlpanel and xfce-mcs-manager while using openbox, I had a serious problem (I won't sit and start these programs manually every time I log in), but I found a lame solution.

I went to /usr/local/bin, and created a file called "openbox-start". This is the content:
Code:
#!/bin/bash
exec xmodmap -e "pointer = 1 2 3 6 7 4 5" &
exec imwheel -p -k -b "000067" -f &
xfce-mcs-manager &
perlpanel &
openbox

that is my "old" .xinitrc. after that, I did a
Code:
chmod 755 openbox-start

so that I can execute the program.

I went back to /usr/share/xsessions, and did this with openbox.desktop:
Code:
[Desktop Entry]
Encoding=UTF-8
Name=Openbox
Comment=This session logs you into Openbox
Exec=openbox-start
TryExec=openbox-start
# no icon yet, only the top three are currently used
Icon=
Type=Application


instead of running only openbox, GDM now runs openbox-start, that contains all the other programs I need. Quite lame, actually :-)

this model is really simple to copy and use with other WM / DEs, it's as simple as changing a name here and there.

Good luck!

(edit: fixed some minor spelling issues)


It dosnt work for me... :/

Code:

root@b0rked xsessions # ls -la /usr/share/xsessions/
total 16
drwxr-xr-x    2 root root  144 Jul 11 06:06 .
drwxr-xr-x  103 root root 2704 Jul 11 05:19 ..
-rwxr-xr-x    1 root root  202 Jun 25 15:10 fluxbox.desktop
-rwxr-xr-x    1 root root 2919 Jun 25 15:53 gnome.desktop
-rwxr-xr-x    1 root root  195 Jul 11 05:32 xfce.desktop

Code:

root@b0rked xsessions # cat xfce.desktop
[Desktop Entry]
Encoding=UTF-8
Name=Xcfe4
Comment=This session logs you into XFCE4
Exec=startxfce4
TryExec=startxfce4
# no icon yet, only the top three are currently used
Icon=
Type=Application

but it only shows fluxbox and gnome... (and the failsafe and so)


ilon, din gamla räv! :P

if it doesn't work, you probably haven't done it right :)
_________________
Computer science is no more about computers than astronomy is about telescopes.
Back to top
View user's profile Send private message
frodoontop
Tux's lil' helper
Tux's lil' helper


Joined: 19 Jan 2004
Posts: 86

PostPosted: Wed Feb 02, 2005 8:43 am    Post subject: Reply with quote

Since latest kdm (3.4) also shows the same behaviour of using .desktop files from /usr/share/xsessions/. This was all very helpfull. Only it seems even more simple now. In the kde.desktop file I just executed /etc/X11/Sessions/kde-3.4 .
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum