LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   How do I have X-apps automatically execute on startup of the X-server? (https://www.linuxquestions.org/questions/slackware-14/how-do-i-have-x-apps-automatically-execute-on-startup-of-the-x-server-78407/)

jtX 08-02-2003 04:48 PM

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.

jtX 08-02-2003 05:25 PM

Nevermind, I figured out another way to do it that gets the job done.
$HOME/.xinitrc

!#/bin/sh
blackbox |
gnome-terminal |
gkrellm

slakmagik 08-02-2003 05:37 PM

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.

dalek 08-02-2003 10:38 PM

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.

:D :D :D

zeppelin 08-04-2003 03:39 PM

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)

Tinkster 08-05-2003 06:11 PM

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 ...

zeppelin 08-06-2003 07:26 AM

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.. :D

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?

Tinkster 08-06-2003 03:10 PM

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

zeppelin 08-06-2003 04:22 PM

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]

Tinkster 08-06-2003 11:36 PM

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

zeppelin 08-07-2003 05:50 AM

does not work for me as expected. Did it work for you/other person?

Tinkster 08-07-2003 04:08 PM

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

zeppelin 08-07-2003 06:05 PM

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

lfur 08-07-2003 06:23 PM

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 (??)


All times are GMT -5. The time now is 01:38 PM.