Jump to content

Running KDM from CTRL-ALT-F1?


Guest cid
 Share

Recommended Posts

I happen to notice, when I logout of Mdk 9.0, that I get a quick flash of the Virtual Console, right before KDM comes up and asks me who I want to log in as.

 

How does MDK do this?

 

I have been working on a script to auto-launch startx for people when they log into the Virtual Console, figuring out what session to run, and printing a reminder of who's session can be reached where (i.e what session CTRL-ALT-F7/8/9 point to)

 

But when I logged out and saw the VC flash up before KDM, I'm thinking, there must be someway I can tell my system to do the same when I try to go to CTRL-ALT-F1, right?

 

Anyone have any idea of how to do this?

 

D

Link to comment
Share on other sites

I don't know much about this, but I do know that when an x session is started, a /tmp/.X*-lock file is created with the pid inside where * is the display number and the file's group is the user who started the x session. For example, my :0 is Ctrl-Alt-F9 . Maybe you could use sed to determine what number the display is for each user? Example:

 

$ls -l /tmp/.X* | grep omar 

-r--r--r--    1 root     omar           11 Feb 20 23:50 /tmp/.X0-lock

srwxrwxrwx    1 root     omar            0 Feb 20 23:50 X0=

 

Then you could use sed to extract the number after .X of the filename. I'm no bash scripter.

Link to comment
Share on other sites

That will be much easier than the way I am currently doing it...

 

Basically looking at who and cutting down to the user, and removing multiple entries.

 

Lots of loops to do this.

 

That /tmp/.X* will absolutely rock!

 

D

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...