Solved

A series of easy questions

Posted on 2000-04-08
6
280 Views
Last Modified: 2010-04-20
Hi, I have a few questions that should be pretty easy.

1.)  Under KDE, I have 2 desktops, how do I automatically start some programs (gkrellm, gtkicq, and another I can't recall right now) upon the startup of kde, but have them automagically started on desktop 2, and leave desktop 1 blank?

2.) When you press the "K" button on the kde bar, and you get a lot of menus like applications, internet, etc, how do you change the sub program names? how do you edit those, and how do you delete those?

3.)  I used a program to tell me my ram free and swap free.  It said I had 3 mb ram free (total of 128 mb) and that I had 133 mb out of 134 mb swap free.  Why do I have no ram free whatsoever, and how can I allocate some of those power hungry greedy programs to use swap space instead of ram?

4.)  Could you recommend some downloads I should get for every day use to make my linux life a little easier?  I'm using mandrake 7.0.

Thanks a million.
0
Comment
Question by:diothar
  • 3
  • 3
6 Comments
 

Author Comment

by:diothar
ID: 2696248
oh, one other thing.  how do I get a window to remember its size and location?  thanks
0
 
LVL 2

Expert Comment

by:modulus
ID: 2696494
W.r.t question 3. the operating system will try to keep any programs that you are running in ram instead of in swap.  This is because swapping in/out is a slow process that imposes an extra load.  When it becomes necessary to have those programs swapped out because you are running some other process then that will happen.  Meanwhile don't worry about it! I would assume that you have no ram free because you are using a program or programs that take up that amount of space!
0
 

Author Comment

by:diothar
ID: 2696859
I am not running anything that should take a lot of ram.  I run kppp, xmms, gkrellm, gtkicq, netscape, and sometimes pan.  I think I should easily have 30% of my ram free.
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 2

Accepted Solution

by:
modulus earned 200 total points
ID: 2696947
In order to see what processes are running and the %memory and %cpu that they take up you can run the command line program "ps".  If you type:
`ps -aux' on the command line you will see a complete list of the processes running on the system and can see exactly what is taking up the memory.  The left hand column tells you the owner of the process.  

To get the window to remember it's size and location you could use one of two options.  I will take the example of an xterm under the bash shell:
1. You can define an alias to popup an application window of a certain size at a certain position.  This alias normally will reside in the file `.bashrc'.  Look at point 2 below to see how to find this sort of "resource" file.  Edit it with your favourite editor (pico is pretty straightforward) to include these two lines:
# myterm - an xterm alias defined by me

alias myterm="xterm -display 80x40+300+300 -fg blue -bg lightgrey &"

Then at the shell prompt type:
`source .bashrc'

Then you can try:
`myterm'
and a window of 80 by 40 characters positioned 300 by 300 pixels from the top and left of the screen with blue characters on a lightgrey background.  To find out more about these specifications type `man X' and look at the section about Geometry specifications.  O'Reilly has a good 3 volume series on this too.

Note that you don't have to create that alias.  You could always laboriously type `xterm -geometry blah blah' each time you wanted it.  An alias is a handy way of storing commands and option combinations that you use frequently.



2.You can use the feature of the X windowing system known as Xresources.  You should already have a file called `.Xdefaults' in the top level of each user's directory (you can make sure that you are in the top level by typing `cd ~' or even just `cd', then check with `pwd' that you are somewhere like "/home/yourusername".  Look for the .Xdefaults by doing an `ls -a'. Edit this file so that it contains the line:

myxterm*Foreground blue
myxterm*Background grey
myxterm*Geometry 80x40+300+300


Then edit your `.xinitrc' file so that it contains the line:
xrdb -load $HOME/.Xdefaults

Note: if you wanted the xterm to appear every time you started a session or logged in you would add the line to this .xinitrc:
xterm -name "myxterm" &

After you have edited the .Xdefaults you should source the .xinitrc.  

As far as your KDE questions go usually there will be resource files stored somewhere for these things. There is a program called `kmenuedit' from what I remember that will allow you to edit the panel.  The question about launching applications in a different desktop is answered in the kde FAQ (www.kde.org/documentation/faq/kdefaq-6.html#ss6.10).

Recommended downloads for an easier life?. Depends what your life is, but one thing that I find invaluable for file transfer is the program `wget' from the FSF (www.gnu.org).  You may already have it - it makes transferring large files over slow lines a snap.  What do you intend to use your machine for?  Go checkout (www.freshmeat.net) and use the search for things you're interested in.
0
 

Author Comment

by:diothar
ID: 2696965
how do I find out how many pixels wide a window is and where it is positioned to?
thanks
0
 
LVL 2

Expert Comment

by:modulus
ID: 2697046
The size of the xterm is given in _characters_ .  Other types of applications will be in pixels.

In general typing:
"xwininfo" and then clicking the mouse left hand button on the window will give  you the info that you want.



 For the xterm the number of pixels in a character depends on the font used.  You specify the font by adding `-fn fontname' as a command argument/option.  You can choose the font by typing:
xfontel &
which brings up an interactive window that allows you to select fontfamily, fontname, size in pixels etc.  So multiply the number of characters across the xterm by the fontsize to get the width in pixels of the xterm.  
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now