Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Befehle beim X-Login ausführen
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
Vortex375
Veteran
Veteran


Joined: 03 Mar 2005
Posts: 1739
Location: Deutschland

PostPosted: Mon Feb 04, 2008 2:17 pm    Post subject: Befehle beim X-Login ausführen Reply with quote

Hallo zusammen.

Ich habe einige Kommandos, die jedesmal ausgeführt werden sollen, wenn ich mich am X anmelde (über kdm). Bisher hatte ich die einfach in .kde/Autostart drin. Das Problem ist, dass sie dort erst recht spät ausgeführt werden, also erst wenn mein KDE-Desktop bereits geladen ist.

Gibt es eine andere Möglichkeit, einen solchen Autorun sofort nach dem Login auszuführen? Also am besten noch bevor er KDE startet?
Back to top
View user's profile Send private message
69719
l33t
l33t


Joined: 20 Sep 2004
Posts: 865

PostPosted: Mon Feb 04, 2008 3:05 pm    Post subject: Reply with quote

Code:

echo -en '#!/bin/bash\nxterm&' > /etc/X11/xinit/xinitrc.d/xterm && chmod 755 /etc/X11/xinit/xinitrc.d/xterm
Back to top
View user's profile Send private message
ChrisJumper
Advocate
Advocate


Joined: 12 Mar 2005
Posts: 2403
Location: Germany

PostPosted: Tue Feb 05, 2008 4:24 pm    Post subject: Reply with quote

~/.xinitrc

Wie escor das schon so schön angedeutet hat :)

Das wird übrigens beim start jeder xsession ausgeführt, also auch wenn du z.B. nebenher noch Fluxbox, xfce oder so hast.
Back to top
View user's profile Send private message
69719
l33t
l33t


Joined: 20 Sep 2004
Posts: 865

PostPosted: Tue Feb 05, 2008 4:44 pm    Post subject: Reply with quote

~/.xinitrc

hat nie bei mir funktioniert.
Back to top
View user's profile Send private message
blice
Guru
Guru


Joined: 12 Feb 2005
Posts: 598
Location: D- 26188

PostPosted: Tue Feb 05, 2008 5:36 pm    Post subject: Reply with quote

als erstes muss ja auch der desktop gestartet werden ...

zb so
Code:

exec startxfce4
exec seamonkey-bin
exec pidgin

oder
exec /home/user/loginlogger



wobei aber jeder bessere Desktop wissen sollte was als letztes Lief
_________________
Gentoo seit 2004.3
Skype: bodokhan
SecondLife: Bodokhan Fall
Email: blice@gmx.de
Back to top
View user's profile Send private message
Vortex375
Veteran
Veteran


Joined: 03 Mar 2005
Posts: 1739
Location: Deutschland

PostPosted: Mon Feb 11, 2008 9:40 pm    Post subject: Reply with quote

Hallo, sorry dass ich mich erst so spät melde.

Die .xinitrc wird nur ausgeführt wenn man den X per xinit (oder auch startx ?) startet. Wenn ich mich aber über kdm anmelde, sind Einträge in dieser Datei wirkungslos.

Sonst noch Ideen? :)
Back to top
View user's profile Send private message
AnubisTheKing
Apprentice
Apprentice


Joined: 13 Oct 2002
Posts: 166

PostPosted: Tue Feb 12, 2008 6:29 am    Post subject: Reply with quote

Wenn du kdm/gdm oder so zum einloogen verwendest kannst du das ganze äquivalent über die .xsessionrc machen. In kdm dann einfach auswählen, dass du deine "custom" Session starten willst und nicht eine mit kde/gnome oder so. Dann führt kdm einfach nur die sachen in .xsessionrc aus.

Grüße
AnubisTheKing
_________________
http://www.volker-boehme.de
Back to top
View user's profile Send private message
hfk
n00b
n00b


Joined: 02 Nov 2007
Posts: 44
Location: Bremen, Germany

PostPosted: Wed Feb 13, 2008 9:03 am    Post subject: Reply with quote

Hallo,

ich hatte ein ähnliches Problem und habe es durch eine Änderung des Scripts
/usr/kde/3.5/bin/startkde gelöst. Die Änderung wird bei Updates von KDE
überschrieben.

Mit dem Patch wird das Script ~/.kde/UserPrestart.sh ausgeführt.
Es wird ausgeführt, wenn X bereits läuft aber der KDE noch nicht.
Dieses biegt bei mir die KDE-Konfiguration um, wenn ein zweiter Monitor
angeschlossen ist.

Code:
# Set the background to plain grey.
# The standard X background is nasty, causing moire effects and exploding
# people's heads. We use colours from the standard KDE palette for those with
# palettised displays.
if test -z "$XDM_MANAGED" || echo "$XDM_MANAGED" | grep ",auto" > /dev/null; then
  xsetroot -solid "#000000"
fi

# hfk's extension: start an initial script
if [ -x ${HOME}/.kde/UserPrestart.sh ]; then
   ${HOME}/.kde/UserPrestart.sh
fi
# end hfk

# we have to unset this for Darwin since it will screw up KDE's dynamic-loading
unset DYLD_FORCE_FLAT_NAMESPACE
Back to top
View user's profile Send private message
schachti
Advocate
Advocate


Joined: 28 Jul 2003
Posts: 3765
Location: Gifhorn, Germany

PostPosted: Wed Feb 13, 2008 9:25 am    Post subject: Reply with quote

hfk wrote:

ich hatte ein ähnliches Problem und habe es durch eine Änderung des Scripts
/usr/kde/3.5/bin/startkde gelöst. Die Änderung wird bei Updates von KDE
überschrieben.


Das läßt sich vermeiden, indem Du die Datei in CONFIG_PROTECT in Deine /etc/make.conf aufnimmst.
_________________
Never argue with an idiot. He brings you down to his level, then beats you with experience.

How-To: Daten verschlüsselt auf DVD speichern.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) 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