LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 08-02-2003, 05:48 PM   #1
jtX
Member
 
Registered: May 2003
Distribution: Gentoo (amd64 ppc x86)
Posts: 39

Rep: Reputation: 15
How do I have X-apps automatically execute on startup of the X-server?


I would like to have some apps automatically startup on login namely gnome-terminal and gkrellm. Supposedly I am to edit a file called .xinitrc or .xinit or .xsession? Well I created them all with execute permissions yet none of the specified apps are executing on startup of the X-server. Maybe I typed something wrong in the files:

Here's what they all say:
exec blackbox
exec gnome-terminal
exec gkrellm

It's really frustrating since all the sites I go to tell me to edit .xinitrc, .xinit, or .xsession and I just can't get anything to work. Well if i'm doing anything wrong someone please help.

Last edited by jtX; 08-02-2003 at 06:26 PM.
 
Old 08-02-2003, 06:25 PM   #2
jtX
Member
 
Registered: May 2003
Distribution: Gentoo (amd64 ppc x86)
Posts: 39

Original Poster
Rep: Reputation: 15
Nevermind, I figured out another way to do it that gets the job done.
$HOME/.xinitrc

!#/bin/sh
blackbox |
gnome-terminal |
gkrellm
 
Old 08-02-2003, 06:37 PM   #3
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
The way I do it is to edit /etc/xinit/xinitrc.foo (which makes it global)

adding

gkrellm &
gnome-terminal &
exec blackbox

If you want them to load in a certain order, sometimes adding 'sleep 1' to the end will help. (Think I've got the right syntax on that, as I haven't done that particular bit in awhile.)

Anyway - then I do xwmconfig and that becomes my default ~/.xinitrc. If you want to just edit the file for that user's account, edit ~/.xinitrc directly.

And you shouldn't really need to create them. They're in /etc/xinit and xwmconfig copies 'em over.
 
Old 08-02-2003, 11:38 PM   #4
dalek
Senior Member
 
Registered: Jul 2003
Location: Mississippi USA
Distribution: Gentoo
Posts: 2,058
Blog Entries: 2

Rep: Reputation: 65
Lightbulb This is neat.

how do you tell it what desktop to put it on? Example, I would like to have Mozilla on desktop 1, Kmail on desktop 2, and KPPP on desktop3 etc. What command would I put for that.

I been wondering how to do this. Great post IMHO.

 
Old 08-04-2003, 04:39 PM   #5
zeppelin
Member
 
Registered: Apr 2003
Location: Athens, Greece
Distribution: Arch
Posts: 182

Rep: Reputation: 30
hello guys, i have a problem with a simple solution (that I cannot find):

I use KDE, but i wanna tell to startkde (after the server was loaded) to do this:

gnome-font-properties
killall -9 gnome-font-properties

this is because in Slack 9.0 gnome-font-properties should be run once you boot, in order GTK based apps to see the font settings..

any ideas where should I put those two commands (that of course should be executed after xserver has being loaded)
thank you

ps. I added them to xinitrc.kde (but that didn't work as expected)
 
Old 08-05-2003, 07:11 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,005
Blog Entries: 11

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
How about rolling both into a script
(preferably with a little wait between
them) and launching that from KDE's
auto-start folder? :)

Cheers,
Tink

P.S.: You should start a new thread
for stuff like this ...
 
Old 08-06-2003, 08:26 AM   #7
zeppelin
Member
 
Registered: Apr 2003
Location: Athens, Greece
Distribution: Arch
Posts: 182

Rep: Reputation: 30
where is that autofolder you mention?
maybe that is the problem, I should have a delay between the two commands..

the only way to do this I know is to make a
for
without commands..

any ideas, I think that adding a delay in Shell Scripting?
Perhaps I should add to /etc/X11/xinit/xinitrc.kde

after startkde
sth like
gnome-font-properties
(here there should be a delay, cause I doesn't work else.)
and this delay will delay the system a bit..
killall -9 gnome-font-properties

I don't know shell scripting, yet the easiest way to do the delay is to add a for command (that will cound up to a number)

yet I don't know the syntax of a for 'command' in shell scripting..
anyone, any ideas?
 
Old 08-06-2003, 04:10 PM   #8
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,005
Blog Entries: 11

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
Quote:
Originally posted by zeppelin
where is that autofolder you mention?
~/.kde/Autostart

Quote:
yet I don't know the syntax of a for 'command' in shell scripting..
anyone, any ideas?
kwrite ~/.kde/Autostart/gnome_f.sh
Code:
#!/bin/bash
gnome-font-properties
wait 10
skill gnome-font-properties
Cheers,
Tink
 
Old 08-06-2003, 05:22 PM   #9
zeppelin
Member
 
Registered: Apr 2003
Location: Athens, Greece
Distribution: Arch
Posts: 182

Rep: Reputation: 30
thanks Tinkster
that wait is in seconds (I suppose) [and will make my system wait for 10 sec (i still suppose) [?] <-- now I ask (LOL)

man skill says skill, snice report process status
don't we need to killall -9 gnome-font-properties (or skill does it in a magic way.. [magic = i don't understand]

Last edited by zeppelin; 08-06-2003 at 05:29 PM.
 
Old 08-07-2003, 12:36 AM   #10
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,005
Blog Entries: 11

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
Quote:
Originally posted by zeppelin
that wait is in seconds (I suppose) [and will make my system wait for 10 sec (i still suppose) [?] <-- now I ask (LOL)
Yep :) and yep ...

Quote:
man skill says skill, snice report process status
(or skill does it in a magic way.. [magic = i don't understand]
Read the man page again, look at the parameter
list, and the examples ...

;)

Cheers,
Tink
 
Old 08-07-2003, 06:50 AM   #11
zeppelin
Member
 
Registered: Apr 2003
Location: Athens, Greece
Distribution: Arch
Posts: 182

Rep: Reputation: 30
does not work for me as expected. Did it work for you/other person?
 
Old 08-07-2003, 05:08 PM   #12
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,005
Blog Entries: 11

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
I don't use KDE, nor do I use
gnome-font-thingmajick ...

What exactly doesn't work?

Do you get the expected result if you
run the script from a command line?

Did you
chmod u+x ~/.kde/Autostart/gnome_f.sh
?

Cheers,
Tink
 
Old 08-07-2003, 07:05 PM   #13
zeppelin
Member
 
Registered: Apr 2003
Location: Athens, Greece
Distribution: Arch
Posts: 182

Rep: Reputation: 30
while running the script, I get pid 10 is not a child of this shell

i should mention that this happen also with killall -9 gnome-font-properties (which is the command i prefer to use when killing)

how Can I kill the gnome-font-properties (either being child or not)
how do I demand it to be child of the shell that runs the scipt..
thanks in advance

Last edited by zeppelin; 08-07-2003 at 07:49 PM.
 
Old 08-07-2003, 07:23 PM   #14
lfur
Member
 
Registered: Jul 2003
Location: Slovenia
Distribution: Slackware & FreeBSD
Posts: 209

Rep: Reputation: 30
This one is for dalek

If you want to put different apps to different workspaces and you use BlackBox (as I have noticed), you can use one of the bb tools, called bbappconf
(http://bbtools.thelinuxcommunity.org...html#bbappconf)

Don't know if there is any other way to do it (??)
 
  


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
Execute an application automatically after startx gilan Debian 6 03-24-2005 11:34 PM
CRON Process Won't Execute Automatically Transition Linux - General 5 01-14-2005 04:51 PM
i need to write a program it has to execute automatically ykirankumar Linux - Software 5 08-31-2004 01:34 AM
execute php script automatically? brandnewbie Linux - Newbie 1 08-14-2004 06:42 AM
how to execute automatically a program/script after login mule Linux - General 8 12-13-2003 03:44 PM


All times are GMT -5. The time now is 09:05 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration