LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-09-2008, 12:54 PM   #1
knobby67
Member
 
Registered: Mar 2006
Posts: 627

Rep: Reputation: 43
startx from within shell script problem


Hi all,
hope someone can help me out with this. I'm running a min install of Debian on an embedded board. I've only installed xorg as I use graphics. So from a start up script I call startx then my software. Whatever I did I couldn't get my software to start from the start up script. However after some inversigation I've found that when x starts my software keeps running (or rather crashes) in another run level. Level 3 I think? When I call startx my runlevel changes (think to 5), however my software still runs in 3, as no x is running in three it crashes.

Does anyone know a work round for this? Can I change run level in my start script first or can I make x run from the same level as startup?

I'm using Debian. Thanks in advance
 
Old 11-09-2008, 10:53 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
I think you use the init or telinit cmd as in

telinit 5

to switch to runlevel 5
 
Old 11-09-2008, 10:58 PM   #3
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
Try to describe what are you exactly trying to do, post code. You are making some strange assumptions there.

It's not a matter of runlevels. If X programs can't find a valid $DISPLAY they will fail to load. But that's nothing to do with a runlevel or another.
 
  


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
Shell Script Problem Anirban.Adhikary Linux - General 1 04-30-2007 02:47 AM
problem with C shell script stoneman Programming 2 12-22-2005 08:39 AM
shell script problem, want to use shell script auto update IP~! singying304 Programming 4 11-29-2005 05:32 PM
shell script problem. chooi Programming 7 03-26-2005 05:16 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:41 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