You are not logged in.
Pages: 1
I used to play music clips when I logged in and out of X. I can't explain WHY I want to do this, it just makes me happy. My method for getting it to work on startup, putting it in the autostarted application list in XFCE, still works fine. But my method for having it play after I log out (not actually logging me *out* till the clip is done of course) suddenly stopped working. The command itself is definitely valid and typed right--I copied it and tried it. I tried putting it in my .xinitrc file as so:
# This is to make the Print Screen key work
xmodmap -e "keycode 111 = F13"
xbindkeys
# This is to start SCIM with X
scim -d
# This is for the SCIM frontend
export XMODIFIERS=@im=SCIM
export GTK_IM_MODULE=scim
export QT_IM_MODULE=scim
# XIM=SCIM
# XIM_PROGRAM=SCIM
# xinput=scim
# This is uim only
# export XMODIFIERS=@im=uim
# export GTK_IM_MODULE=uim
# export QT_IM_MODULE=uim
# This is so XFce will be started automatically
exec startxfce4
# Play music on logout
aplay Desktop/Megan\'s\ Stuff/Computer\ Sounds/Alone\ Again.wav
So now the last line doesn't seem to be making it execute the command aplay when I log out of XFCE.
Does anyone know of any other method I could use to do the same thing?
I know it's kind of stupid, it's just one of those things that make me happy is all.
Oh, I don't know if this makes a difference, but I never set the default runlevel as GUI. I log in in the terminal, type startx to log into X, then when I log out of X, I have just stopped X but am still logged in as a user. I prefer it this way.
Last edited by violagirl23 (2008-02-19 02:03:43)
"You can't just ask to borrow somebody else's lampshade. It's AWKWARD!"
Offline
Gah! Linux did it to me again! It just started working again... after I changed my desktop background. *raises eyebrow* I can't even BEGIN to puzzle that one out.
If anyone has any alternate ideas to do this in case this happens again I'd appreciate it, but otherwise, it's working again! (thank goodness!)
Edit: Oh nope, it's not working again now. I guess my question is generally broader than original... it won't run any programs when I close X if I put them in the final line after the exec startxfce4, not just music, except on random intervals, like it suddenly working again today. I'm not sure why. I need to figure out how to do this. Is there perhaps a shell script that would take care of this?
Last edited by violagirl23 (2008-02-19 02:03:19)
"You can't just ask to borrow somebody else's lampshade. It's AWKWARD!"
Offline
Pull out the "exec" part of the line.
...
# This is so XFce will be started automatically
# exec startxfce4
# exec was removed to allow music at logout
startxfce4
# Play music on logout
aplay Desktop/Megan\'s\ Stuff/Computer\ Sounds/Alone\ Again.wav
What exec does is it turns your bash shell (such as the script) into the real command. For example open a terminal and run "cat" then type stuff and hit control D or control C when done and notice you are returned to bash. Now run "exec cat" and notice that when you quit the terminal closes. That's because bash turned itself into cat and doesn't exist anymore.
Last edited by gorn (2008-02-19 04:14:18)
Offline
Pages: 1