LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-21-2009, 06:35 PM   #16
jorisvt
LQ Newbie
 
Registered: Jul 2009
Posts: 8

Original Poster
Rep: Reputation: 0

I've done exactly what you describe, but it still doesn't work. It keeps shutting down after 2 seconds.

Here is the entire code, maybe you can see what's wrong.

Code:
#!/bin/sh

sudo /usr/bin/sessreg -d -l :0.0 -u /var/run/utmp user
xhost + si:localuser:root # Allow local user root only to access the diplay

if ! [ -f /home/user/.firstrundone ]; then
        sudo /usr/bin/sessreg -a -l :0.0 -u /var/run/utmp user 
        sudo /usr/bin/firstrunwizard
        if [ $? -eq 0 ]; then
                touch /home/user/.firstrundone
                sudo /bin/kill -USR1 1
        else
                sudo /bin/kill -USR2 1
        fi       
elif [ -f /tmp/kdesession -a ! -f /home/user/.easysession ]; then
        sudo /usr/bin/sessreg -a -l :0.0 -u /var/run/utmp user 
        if [ ! -d /home/user/Desktop ]; then
            if [ -d /home/.Desktop ]; then
                mv /home/user/.Desktop /home/user/Desktop
            fi
        fi
        [ -f /usr/bin/dispwatch ] && /usr/bin/dispwatch &
        for i in /sys/block/s[dr]?/uevent ; do
                 sudo /bin/sh -c "echo add > $i"
        done
        sudo rm -f /tmp/kdesession /tmp/nologin
        exec startkde
else
        sudo /usr/bin/sessreg -a -l :0.0 -u /var/run/utmp user 
        if [ -d /home/user/Desktop ]; then
            if [ -d /home/user/.Desktop.bak ]; then
                rm -rf /home/user/.Desktop.bak
            fi
            if [ -d /home/user/.Desktop ]; then
                mv /home/user/.Desktop /home/user/.Desktop.bak
            fi
            mv /home/user/Desktop /home/user/.Desktop
        fi
        if [ -f /home/user/.easysession ]; then
         # we are switching from full to easy mode
         for i in /sys/block/s[dr]?/uevent ; do
                 sudo /bin/sh -c "echo add > $i"
         done
        fi      
        /opt/xandros/bin/AsusLauncher &
        icewmtray &
        [ -n "$XIM_PROGRAM" ] && $XIM_PROGRAM &
        powermonitor &
        minimixer &
        networkmonitor ath0 eth0 &
        wapmonitor &
        smplayer "/home/user/my documents/my videos/film.avi" &
        (sleep 3; /usr/bin/keyboardstatus) &
        (sleep 8; /opt/xandros/bin/start_netserv) &
        (sleep 16; /usr/local/bin/asusosd) &
        sudo rm /tmp/nologin
        [ -f /usr/bin/dispwatch ] && /usr/bin/dispwatch &
        exec icewm
fi
 
Old 07-22-2009, 01:36 AM   #17
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
That file looks good to me, according to those WHOTOs.

But you say still doesn't work properly - one of the reasons I quit "Easy mode" and then xandros.

1] Something to check:
Does smplayer "/home/user/my documents/my videos/film.avi" &
play the file if you run it from a terminal? It should.

2] Try another way:
Take that command out of the file x-session-manager
and try following these instructions for putting it in
/home/user/.icewm/startup
Maybe that'll work better. You may need a sleep of more than 8 seconds, try it anyway.

3] Or yet another way:
Follow these instructions for installing the full KDE desktop and then use the
/home/user/.kde/Autostart/ mechanism (instructions on the same page as in [2] but further down)
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
video not run contineous girish.mtech Linux - Software 1 07-26-2007 12:03 PM
Why video files not run Naeem Shahzad Fedora 1 05-07-2007 10:58 AM
sign on invisible in gaim - NOT invi after sign on saravkrish Linux - Software 7 09-12-2005 10:55 PM
can i run two different video cards? sillyd Linux - Hardware 1 10-23-2004 10:45 PM
Re-run the video setup? mchitsquad Red Hat 6 09-13-2003 08:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration