SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
Thanks for your help aaa. I managed to start konqueror by typing:
/opt/kde/bin/konqueror from the command line.
Now I was wondering if there is a way to store the full path in a file (so it can be found by PATH), so I don't have to type the full path before the command.
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 01:40 PM.
Where can you find the file /.bashrc? I found a file called 'bash' in the
/bin directory, but gedit says it can't open it because there are some strange characters in it.
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 02: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 02:41 PM.
Thanks for your help guys. I haven't found the time to try it all yet, but I try to check it out before the end of the day.
By the way, AlexFendersson, I apologize for my wrong profile. It dates back a few weeks ago. Now I'm running Slackware, and it runs smoother than anything else before.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.