boatman9 Posted December 18, 2009 Report Share Posted December 18, 2009 (edited) According to this tutorial for Debian, scripts in /etc/X11/Xsession.d/ will be run when X starts. I tried this with Mandriva but it didn't work. Where in Mandriva 2010.0 should I place a script to be run when X starts? Edited December 21, 2009 by boatman9 Quote Link to comment Share on other sites More sharing options...
scarecrow Posted December 22, 2009 Report Share Posted December 22, 2009 (edited) ~/.xinitrc or, in some cases, ~/.bashrc Or, if you are using a DE with startup manager (KDE4, Gnome, XFCE4...) you can put them right there. Edited December 22, 2009 by scarecrow Quote Link to comment Share on other sites More sharing options...
daniewicz Posted December 23, 2009 Report Share Posted December 23, 2009 If you are using KDE, place scripts here for execution during startup: ~/.kde/Autostart/ Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted December 23, 2009 Report Share Posted December 23, 2009 In Gnome, System --> Preferences --> Sessions or Startup Applications name varies from versioning of Gnome, previously was Sessions, but in Mandriva 2010 I see Startup Applications. Quote Link to comment Share on other sites More sharing options...
boatman9 Posted December 23, 2009 Author Report Share Posted December 23, 2009 Thanks for the advice. I am using Gnome but probably will be using KDE4 soon. I had put my xrandr commands in .bash_profile where it seems to be doing OK. I would prefer not to have the script in user's space, but someplace that will apply to all users, as it does in the Debian example. Quote Link to comment Share on other sites More sharing options...
scarecrow Posted December 23, 2009 Report Share Posted December 23, 2009 (edited) In Archlinux the appropriate file for that is /etc/rc.local I don't really know if this is the right place for Debian- Arch may be a regular Linux distro, but it does have a few peculiarities: No init runlevels (just runlevel 3 and runlevel 5) and the initscripts use BSD-like hierarchy rather than Linux one. Edited December 23, 2009 by scarecrow Quote Link to comment Share on other sites More sharing options...
daniewicz Posted December 24, 2009 Report Share Posted December 24, 2009 In Archlinux the appropriate file for that is /etc/rc.local In Mandriva: /etc/rc.d/rc.local Quote Link to comment Share on other sites More sharing options...
pindakoe Posted December 24, 2009 Report Share Posted December 24, 2009 In Mandriva: /etc/rc.d/rc.local rc.local runs directly after rc.sysinit and all other scripts in /etc/init.d/, but this will usually be well before anybody has logged in apart from root and a few daemons. Thus putting commands here to play with X may be less useful. The following scripts are sourced from your own ~/.bash_profile or ~/.bashrc, but cannot be touched by mere mortals: /etc/profile.d/ or /etc/bashrc. The .bash_profile (and for Mandriva by extension also /etc/profile.d/*) is executed after every logon and also calls .bashrc. In addition .bashrc (by extension /etc/bashrc) is executed after start of every terminal session (so additional KTerm, rxvt, Gnome-terminal etc that you start after logging in). This also means that they are executed when you log into a (non-X) console. I have put my X-related 'after-logon' activities in ~/.config/xfce4/xinitrc, but I do not know how this would translate from my DE (XFce4) to Gnome, KDE or other DE's. I have also found a bunch of scripts in /etc/X11/xinit.d/ that looks like they are /etc/bashrc and /etc/profile.d/ equivalents, i.e. executed after start of X on system level. This is an assumption; I am not certain of that... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.