vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Sorry to post here, but the linux.questions and .help forums are so full of spam... I normally start X manually from a console and use .bash_profile and .bash_logout to set up and clean up my environment. In particular, I use fuse for avfs and since it will not unmount without fusermount. I also have some local dmcrypt filesystems that need to be manually unmounted and the /dev/loop devices cleared. All this is fine in a console TTY. ..bash_profile ****blah ..bash_logout ****unblah However, if I use kdm/gdm or another graphical login manager, how do I clean up? If I use .xsession, can I just do something like this? ..xsession fusermount mount dmcrypt volume # then startx window manager # done fusermount UNMOUNT unmount dmcrypt and clear loop devices or won't that work. If there a standard for cleaning up user local stuff? TIA. -- Peter |
| |||
| Peter wrote: > However, if I use kdm/gdm or another graphical login manager, how do I > clean up? If I use .xsession, can I just do something like this? > > .xsession > fusermount > mount dmcrypt volume > # then > startx window manager > # done > fusermount UNMOUNT > unmount dmcrypt and clear loop devices > > or won't that work. > > If there a standard for cleaning up user local stuff? in case of kde tray ~/.kde/shutdown/your_script.sh no ideas for others sorry. |
| |||
| Peter <peter@localhost.com> skrev 2007-08-16: > Sorry to post here, but the linux.questions and .help forums are so full > of spam... > > I normally start X manually from a console and use .bash_profile > and .bash_logout to set up and clean up my environment. In particular, I > use fuse for avfs and since it will not unmount without fusermount. I also > have some local dmcrypt filesystems that need to be manually unmounted and > the /dev/loop devices cleared. > > All this is fine in a console TTY. > .bash_profile > ****blah > > .bash_logout > ****unblah > > However, if I use kdm/gdm or another graphical login manager, how do I > clean up? If I use .xsession, can I just do something like this? > > .xsession > fusermount > mount dmcrypt volume > # then > startx window manager > # done > fusermount UNMOUNT > unmount dmcrypt and clear loop devices > > or won't that work. > > If there a standard for cleaning up user local stuff? In /etc/X11/xdm You make two files: Xstartup (a #!/bin/sh file) to initialize those things and Xreset (also a #!/bin/sh file) you use to reset/clean up stuff. Those two scriptfiles are run as root, but if you f.ex. use the variable $USER you get the name of the person who login to the system. You can also setup things in the Xsession file in the same directory, but what you do in this file is run as the user, which is logging in. If you use kdm: Those files are also found in /opt/kde/share/config/kdm together with with kdmrc, and in this file you see7setup which x-setup files (Xreset, Xstartup Xsession) are used - those in /etc/X11/xdm or those in the kde directory. Enjoy -- Morten L |
| |||
| On Thu, 16 Aug 2007 16:10:55 +0000, Morten L wrote: snip... > In /etc/X11/xdm > > You make two files: > Xstartup (a #!/bin/sh file) to initialize those things and Xreset (also > a #!/bin/sh file) you use to reset/clean up stuff. > > Those two scriptfiles are run as root, but if you f.ex. use the variable > $USER you get the name of the person who login to the system. > > You can also setup things in the Xsession file in the same directory, > but what you do in this file is run as the user, which is logging in. > Thanks for the tip. This is the type of info I was looking for. First, I will play with .xsession in $HOME and take it from there. -- Peter |
| |||
| On Thu, 16 Aug 2007, Peter wrote: > I normally start X manually from a console and use .bash_profile > and .bash_logout to set up and clean up my environment. In particular, I > use fuse for avfs and since it will not unmount without fusermount. I also > have some local dmcrypt filesystems that need to be manually unmounted and > the /dev/loop devices cleared. [...] how aboout just writing it into a single script, which would first do your pre- session tasks, the startup your X session, then (after you're done with X), do your post- session tasks. maybe i'm missing something, but that seems simple enough. -- William Hunt, Portland Oregon USA |
| ||||
| On Thu, 16 Aug 2007 09:31:23 -0700, William Hunt wrote: > On Thu, 16 Aug 2007, Peter wrote: >> I normally start X manually from a console and use .bash_profile and >> .bash_logout to set up and clean up my environment. In particular, I >> use fuse for avfs and since it will not unmount without fusermount. I >> also have some local dmcrypt filesystems that need to be manually >> unmounted and the /dev/loop devices cleared. > [...] > > > how aboout just writing it into a single script, which would first do > your pre- session tasks, the startup your X session, then (after you're > done with X), do your post- session tasks. > > maybe i'm missing something, but that seems simple enough. That's what I'm going to try to do with .xsession. As long as I don't use exec window manager, I should be ok. We'll see. (sometimes I wonder why I'm doing this since for 16 years I just use a console to log in) -- Peter |