SlackwareThis Forum is for the discussion of Slackware Linux.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I'm having a problem with starting applications from the commandline
(= terminal on KDE). For example: I enter 'Konqueror' but it says 'command not found'. The same with commands like 'KFloppy' and 'Mozilla'.
I really need to start them from the command line, otherwise, if I want to run them as root, I have to log out, than log in again as root and than run the program.
I thought that maybe the path is set up in a wrong way, however I don't know how to change it (if that is the problem, of course).
They are all uncapitalized. If it still doesn't work, then they might not be in your PATH (compare the output of 'echo $PATH' in regular user and root). You can just type the full path to the program in that case (try looking in /opt/kde/bin, /usr/bin, /usr/local/bin (they should be in the PATH)).
Also, if you get 'cannot connect to screen :0.0', try running 'xhost +local:' as regular user first.
If you're feeling lazy, you could just make your terminals open a new login shell. For a GNOME terminal, click on Edit -> Current Profile -> Title and Command -> Run command as a login shell. I'm not sure about Konsole or xterm, but I imagine it's something similar. This way, /etc/profile gets run each time a new terminal is opened, so you should get the correct path, prompt etc without having to mess about with .bashrc . This is arguably not the 'proper' way to do it, but it is a lot easier than trying to write a .bashrc with everything you need in it, and it's never caused me any problems.
Last edited by AxelFendersson; 06-18-2004 at 02:40 PM.
Quoth Error1312 Where can you find the file /.bashrc?
It's ~/.bashrc you're looking for, not /.bashrc, and it doesn't exist yet. By default, Slackware doesn't create a .bashrc for new users. Do NOT try to modify /bin/bash - that's the shell program that interprets your commands. Break that and your system is seriously screwed (unless you're using an alternative shell, but let's not go into that).
Essentially there are two startup scripts for new shells, .bashrc and .bash_profile . When you start a new shell, then bash will run the .bashrc script in your home folder. If that doesn't exist, it will look for a global alternative at /etc/bashrc . A new login shell, however will try to run .bash_profile (again from your home folder) instead, and if that doesn't exist, it will look for /etc/profile . By default in Slackware, the only one of these four files that exists is /etc/profile . What this means is that login shells will all use /etc/profile , and will have a sensible prompt, path and so on, but regular shells will use the default prompt for bash, and have nothing in the path. You can try to create your own .bashrc , maybe using /etc/profile as a guide to what to put in it (this is the 'right' way of doing it), or you can just make sure that all new shells are login shells (which is significantly easier).
Last edited by AxelFendersson; 06-18-2004 at 03:03 PM.
BTW, in Konsole (KDE terminal emulator) you can make sure you always get a login shell by clicking on Settings -> Configure Konsole... -> Session
Then select 'Shell' from the list, and enter "bash -l" in the Execute field near the top.
Click Ok, then Save.
Also, I notice that your profile says you're running Mandrake and Fedora. I think that Mandrake automatically creates a .bashrc , and Fedora probably does, too. If so, you could copy it over to your home folder on any other distro and it would would probably work fine, so you wouldn't have to mess around with login prompts. Give it a try and see.
Last edited by AxelFendersson; 06-18-2004 at 03:41 PM.