|
||||||
| Forums FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| ARCHIVES - Desktop Environments KDE, GNOME, FVWM, etc.. all those window manager related questions get in here. |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
This is from a really green newbie. If I want to set up a user so that when they login they go right into an application, what file do I modify? Where is the last file executed after login? Then if I want to set it up so that once they leave that application they are automatically logged out, where to I do that?
|
|
|||
|
just drag & drop the program start to /home/username/.Kde/Autostart It's a hidden file BTW, that's if you are using Kde. Dunno about when logging off, that's a different kettle of fish
Andy |
|
|||
|
Regarding the second bit I would of thought you would need a script running checking the pid. Or using inotify perhaps, not sure you'll find anything standard.
Also this would need to be a root thing, as if user, then it could be modified. Also think you would need to start the other program via other means to, as any check by root would perhaps fail before even getting to the users DE. http://inotify-tools.sourceforge.net/api/i...fytools_8h.html http://packages.opensuse-community.org/ind...rchTerm=inotify I maybe barking up the wrong tree but think you would need a root script that checks for a user logged in, then checks to see if said app is running. |
|
|||
|
There is a difference if you want a user to just execute an application/program on login (in the GUI or the CLI?) or if you want them to login normaly in KDE/Gnome and then start an application inside KDE/Gnome.
As I understand your question, you do not want them to offer any other program that last solution is not enough. You could look into Kiosk (on the KDE documentation website). When you do not use the KDE/Gnome but have a complete (maybe GUI) closed application that makes it easier I think, but as you state it above there are to many options open. |
|
|||
|
A little example that will run as user and check for konsole and logout if not running in kde using a dcop call. Will get a fair bit more complicated to make it run from say boot.local as root.
Code:
konsole & while logged=$(who -u) do if [ $(pidof konsole) ] then echo $(pidof konsole) else dcop ksmserver ksmserver logout 0 0 0 fi done Added konsole & to code This does actually work from autostart what I did was call the app first changed permissions so the group could only execute it and root owned it. Now I have a konsole window open when I log in, but if I close it I get logged out. Of course with session management you need to take into consideration it maybe remembered but believe you can turn this off some where. Also that above example has a useless echo in it ![]() Edit 2 this is far from finished I had another one open when shut down and ended up getting logged in out even though I had konsoles open it's just a start. |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|