LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   New to Debian, a few questions (https://www.linuxquestions.org/questions/linux-newbie-8/new-to-debian-a-few-questions-309922/)

MaTrIx709 04-05-2005 07:36 AM

New to Debian, a few questions
 
Hi all,

I'm getting pretty used to my debian installation, all I can say after having a casual interest in linux, I finally see why its so amazing. But I have a few small problems.

Question 1
If I start an application from a terminal, how can I seperate the two. What I mean is... If I run

Code:

$ gaim
The terminal cannot be used for anything else until I type controle-c, which also happens to kill gaim :(



Question 2
Also, If I have a script

Code:

#!/bin/sh
#gav's first shell script
#loads some programs on boot

#say hello
echo "Gav's startup script ran"

#startx server
echo "Starting X Server"
startx

#run gaim
echo "Starting Gaim"
gaim

1) Where can I put 'sh script.sh' so that I can run it at boot? or even better at login of user gav
2) When I run the script from a terminal
Code:

$ sh script.sh
I can get X to start, but gaim doesn't. What am I doing wrong?



Question 3

lastly, how can I flag 'ls' to show one page of results at a time, so it wont run over the top of the terminal


Question 4

How can I use a photo avatar with gaim

slackie1000 04-05-2005 07:43 AM

hi there,

concerning gaim, instead of ctrl-c you can use ctrl-z and the type "bg".
you put the job in the background. it is valid for any application called from the cli.

regards

slackie1000

MaTrIx709 04-05-2005 08:12 AM

Thanks for the reply.

Ctrl-z works a treat. I can now run other commands, and gaim stays as long as the terminal is not killed.
So we are half way there.

But.... when I type 'bg' the terminal returns [1]+ gaim &

but when I close the terminal, gaim is still up

slackie1000 04-05-2005 08:15 AM

Quote:

Originally posted by MaTrIx709
Thanks for the reply.

Ctrl-z works a treat. I can now run other commands, and gaim stays as long as the terminal is not killed.
So we are half way there.

But.... when I type 'bg' the terminal returns [1]+ gaim &

but when I close the terminal, gaim is still up

hi there,

exactly. that exact how it should work.

regards

slackie1000

audibel 04-05-2005 08:20 AM

I haven't used gaim before, but in respects to using the same terminal, if you issue your command like: gaim & it will startup in the background of the terminal.

With respects to what you are doing with that shell script, I don't know if it can be done exactly that way... If you want gaim to start after you enter you X environment, and you are using kde go into the ~/.kde/Autostart folder and put your script (minus the crap about startx) in there and it should run just peachy, without having to use the ampersand.

Your question about ls

ls | more

reflection666 04-05-2005 08:28 AM

1) ambersanq ('&') is used in order to push the proc in the bg ex.

foo@bar:~/>gaim & [enter]

starts gaim and send it to the background

2) ls | more or ls | less (more and less are like cat)

ex more text.txt shows contents of text.txt page by page (same keys and functions with vi or vim)

'|' the pipe sends one programms output to anothers input ex.

ls ~/pictures/ | grep .psd -> lists only the *.psd files in your pictures folder
ls -l ~/pictures/ | grep .psd | wc -l -> counts them (counts the lines of the output list)

as for starting services NOT when the machine boots BUT when you login (console or X) try editing ~/.bashrc or KDEs and GNOMEs options


linux is fun... but console is even more fun. Try learning the basic console tools like more, less, grep, ls, vi, cat cause nothing is easy without them.

MaTrIx709 04-05-2005 09:32 AM

Thanks all,

I pretty much consider the problems resolved.


Regards,
Gavin


All times are GMT -5. The time now is 04:37 PM.