LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-12-2009, 02:52 PM   #1
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Rep: Reputation: 49
LXDE - Auto start two programs


I have just started using LXDE in Debian 5.0.

I have a a.txt file and a a.sh file that I need to auto start as soon as the user logs into the environment.

So far I have been able to auto start just one file (either the a.txt or a.sh) file by placing the following file in /root/.config/autostart/mystart.desktop:
Code:
[Desktop Entry]
Encoding=UTF-8
Version=0.9.4
Type=Application
Name=nitrogen
Comment=
Exec=lxterminal --command "./a.sh"
StartupNotify=false
Terminal=false
Hidden=false
However if I try to modify the Exce line above to first launch the a.txt file and then the a.sh file like this:
Code:
lxterminal --command "less ./a.sh" && lxterminal --command "./a.sh"
it does not work.

Earlier I use to use fluxbox in that I use to achieve the same with something like this in the .fluxbox/apps file:
Code:
xterm -e "less /root/README.TXT" && xterm -e "/root/a.sh"
Basically a.txt is a README like file and a.sh is a shell script.

Any ideas?
 
Old 08-12-2009, 03:04 PM   #2
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
Can you just create a new script called b.sh and have it start a.sh and a.txt?
 
Old 08-12-2009, 03:18 PM   #3
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 49
Quote:
Originally Posted by pljvaldez View Post
Can you just create a new script called b.sh and have it start a.sh and a.txt?
I thought about that but then I would like not to create and track another file. Ideally I would just like to achieve through one command line. Another option might be to embed a.txt file in a.sh?

Last edited by kushalkoolwal; 08-12-2009 at 03:21 PM.
 
Old 08-12-2009, 03:28 PM   #4
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
That should also work. Although I agree it's a bit of an ugly hack if the two files are not related.
 
Old 08-12-2009, 03:34 PM   #5
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
A quick google turned up that there should be two articles on their wiki that would help you:
http://lxde.org/wiki/LXSession
http://wiki.lxde.org/en/Autostart

Unfortunately, their website is down (again...) and google tried to cache it recently, so the cache page is also worthless.

Another thread I saw basically said to start two things, you should create two mystart.desktop items like a.sh.desktop and a.txt.desktop and configure each independently.

The ArchWiki entry for LXDE had this to say.

Again, I'm speculating off of what I've found on google.

Last edited by pljvaldez; 08-12-2009 at 03:38 PM.
 
Old 08-12-2009, 03:42 PM   #6
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 49
Quote:
Originally Posted by pljvaldez View Post
Another thread I saw basically said to start two things, you should create two mystart.desktop items like a.sh.desktop and a.txt.desktop and configure each independently.
Before posting I already tried placing two *.desktop files. There were two problems with that:

1. Only .desktop file for a.sh got executed. I also saw another terminal window (may be for a.txt) but it disappeared in a split second.

2. The main problem is that I would like to execute a.txt first and when the user quits that file (through "less"), b.sh should get executed next. By placing two .desktop files I don;t think I can achieve the sequential order of execution.

Last edited by kushalkoolwal; 08-12-2009 at 03:56 PM.
 
Old 08-12-2009, 03:52 PM   #7
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
Since you desire the sequential order, I would probably go ahead and embed the a.txt into the a.sh file.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Auto-start Programs eggoz Linux - Software 5 06-12-2006 02:10 AM
How do I make my programs auto start on login? martinr Fedora 2 04-11-2006 10:00 AM
Auto Start Programs for Any X LinuxGeek Linux - Software 4 01-04-2005 07:44 AM
programs auto-start with GRUB? Michele Spinolo Linux - General 2 01-02-2005 11:47 AM
Startx auto start of programs (With Fluxbox) jimdaworm Slackware 4 12-03-2003 05:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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