LinuxQuestions.org
Visit Jeremy's Blog.
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 05-23-2011, 01:11 AM   #1
GardarS
Member
 
Registered: Jun 2005
Location: Reykjavik,Iceland
Distribution: Centos 5.6 and Arch
Posts: 64

Rep: Reputation: 17
Problem with Autostart


Well I'm sure this belongs here, I'm simply trying to add applications to autostart after I start the window environment.

I've been using CentOS for quite awhile and I decided to try something new for my new laptop. So I decided to try Arch Linux, loving it so far, but I have this issue with autostarting the applications in fluxbox, I know of the startup file in the ~/.fluxbox directory, I've tried listing them there, but that requires the
Code:
 exec startfluxbox
command to execute properly in .xinitrc file, but when I use that command it just dies and respawns another login screen.
The login manager I'm using is Slim.

Here's my .xinitrc file
Code:
 
exec fluxbox
exec gkrellm & 
exec setxkbmap -laout is
I've tried many variations I've seen in examples on different forums, and it looks as if it's quite simple. I just want to change my keyboard layout automatically and for future applications I might want to start on boot.

Last edited by GardarS; 05-24-2011 at 04:48 PM. Reason: [Solved]
 
Old 05-23-2011, 08:35 AM   #2
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
Does "slim" use the .xinitrc file?

Quote:
Originally Posted by GardarS View Post
Code:
exec setxkbmap -laout is
If that's copied and pasted from the acual config file, that's wrong. You missed the "y" in "layout".
 
Old 05-23-2011, 01:32 PM   #3
GardarS
Member
 
Registered: Jun 2005
Location: Reykjavik,Iceland
Distribution: Centos 5.6 and Arch
Posts: 64

Original Poster
Rep: Reputation: 17
Seems so, fluxbox wouldn't start without the first line
Code:
exec fluxbox
, nah it was just a type'o

I have the line in slim.conf
Code:
 login_cmd     exec /bin/bash -login ~/.xinitrc %session
So I'm quite sure it fetches the .xinitrc script to start up.
 
Old 05-23-2011, 01:37 PM   #4
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
The "exec" command replaces the shell with the new command. So in this script:

Code:
exec fluxbox
exec gkrellm & 
exec setxkbmap -laout is
, the shell is replaced by fluxbox and doesn't exist anymore before it even gets to the "exec gkrellm" line. If you want your session to end when Fluxbox exits or is killed, use this:

Code:
exec setxkbmap -layout is # we don't even need the "&" here since this command hardly takes any time to execute
gkrellm &
exec fluxbox
 
1 members found this post helpful.
Old 05-24-2011, 04:47 PM   #5
GardarS
Member
 
Registered: Jun 2005
Location: Reykjavik,Iceland
Distribution: Centos 5.6 and Arch
Posts: 64

Original Poster
Rep: Reputation: 17
Thanks, It worked, if I removed the exec command for everything I wanted to start before the window manager
 
  


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
httpd autostart problem. m3phisto Linux - Software 26 09-04-2011 06:34 AM
KDE 4 Autostart Program Bash Script to Write Autostart Bash Scripts for You! jdmcdaniel3 SUSE / openSUSE 1 05-03-2010 06:17 AM
tomboy autostart in xfce, though not on autostart list zlya Linux - Desktop 2 11-10-2009 10:49 AM
Fetchmail autostart problem gugabaga Linux - Software 2 03-09-2006 09:08 AM
problem with autostart rhotzenplotz Linux - Newbie 2 01-04-2003 03:22 AM

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

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