Go Back   openSUSE Forums > Archives > SLS Archives > ARCHIVES - SuSE Linux > ARCHIVES - Desktop Environments
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
  #1 (permalink)  
Old 30-May-2008, 10:27
james.wendell
Guest
 
Posts: n/a
Default

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?
  #2 (permalink)  
Old 30-May-2008, 10:35
deltaflyer
Guest
 
Posts: n/a
Default

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
  #3 (permalink)  
Old 30-May-2008, 10:44
FeatherMonkey
Guest
 
Posts: n/a
Default

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.
  #4 (permalink)  
Old 30-May-2008, 10:47
hcvv
Guest
 
Posts: n/a
Default

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.
  #5 (permalink)  
Old 30-May-2008, 11:42
FeatherMonkey
Guest
 
Posts: n/a
Default

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
Edit
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.
  #6 (permalink)  
Old 30-May-2008, 14:46
zippe
Guest
 
Posts: n/a
Default

Forgive me if this is waaay off base but couldnt you just edit the .profile to do this


vi .profile of the user


#Profile of user Johndoe

/usr/local/sbin/aplication

exit



 

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




 

Search Engine Friendly URLs by vBSEO 3.3.0 RC2