Getting screenfetch to autorun in terminal(openSUSE 13.2 KDE edition) aka how to edit bashrc file

Hi!

Screenfetch runs upon typing the command, and I’ve gotten it working several times before, but that was a few months ago, and I’ve looked through my bookmarks to see if I could find the info that way and failed. How do I configure it to run automatically when I open a new terminal? It’s fine otherwise. Thanks!

(I guess I should stress that I do know I need to edit bashrc, and am having a hard time finding it. On other distros I seem to locate it in the same way, more or less.)

Hi
You mean something like;


vi ~/.bashrc

[Then add..]

if  -f ~/bin/screenfetch ]; then screenfetch; fi

Related: Did you know screenfetch comes up in two different places in the openSUSE search, at two different URLs?

http://software.opensuse.org/search?q=screenfet&baseproject=openSUSE%3A13.1&search_devel=false&search_unsupported=false

Gives:

http://software.opensuse.org/package/screenfetch

and

http://software.opensuse.org/package/screenFetch

Only difference in path are uppercase F and lowercase f, results are different.

Who to notify for consolidation? Or, are there differences (I think not), and then which is the better choice?

On Mon 08 Dec 2014 05:06:03 AM CST, Fraser Bell wrote:

Related: Did you know screenfetch comes up in two different places in
the openSUSE search, -at two different URLs-?

Search

Gives:

openSUSE Software

and

openSUSE Software

Only difference in path are uppercase F and lowercase f, results are
different.

Who to notify for consolidation? Or, are there differences (I think
not), and then which is the better choice?

Hi
On searched always check which is the development repository for
Tumbleweed (aka Factory) a second choice would be a non home repo.

In this case it would be the utilities repository, the others are
‘home’.

So maybe query the utilities maintainer of screenFetch?


Cheers Malcolm °¿° LFCS, SUSE Knowledge Partner (Linux Counter #276890)
SUSE Linux Enterprise Desktop 12 GNOME 3.10.1 Kernel 3.12.28-4-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

Well, in Mint, for example, I type "gedit ~/.bashrc or something similar to that, and can edit the file in a text editor. I always add the following to the bottom to get Screenfetch to run automatically:

Screenfetch

screenfetch

I’m trying to figure out how to do that same thing in the text editor in openSUSE, and half my problem is that I don’t seem able to locate .bashrc in the first place on version 13.2. I know I had it working before in 13.1.

Thanks for the reply.

On Fri 12 Dec 2014 04:06:02 AM CST, Hunson wrote:

malcolmlewis;2681487 Wrote:
> Hi
> You mean something like;
> >
Code:

> >
> vi ~/.bashrc
>
> [Then add…]
>
> if -f ~/bin/screenfetch ]; then screenfetch; fi
>

> >

Well, in Mint, for example, I type "gedit ~/.bashrc or something similar
to that, and can edit the file in a text editor. I always add the
following to the bottom to get Screenfetch to run automatically:

Screenfetch

screenfetch

I’m trying to figure out how to do that same thing in the text editor in
openSUSE, and half my problem is that I don’t seem able to locate
…bashrc in the first place on version 13.2. I know I had it working
before in 13.1.

Thanks for the reply.

Hi
Open a terminal;


cd
ls -la .bashrc

Does it exist?

Since your using KDE, gedit doesn’t exist, use AFAIK kate instead…


Cheers Malcolm °¿° LFCS, SUSE Knowledge Partner (Linux Counter #276890)
SUSE Linux Enterprise Desktop 12 GNOME 3.10.1 Kernel 3.12.28-4-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

Here’s what it says when I enter that command:

-rw-r–r-- 1 [username] users 1177 Nov 21 00:01 .bashrc

When I tried typing “kate,” it gave me that “if kate is not a typo” message.

Hi
Well at least it exists, I’m a GNOME user, have no idea what KDE uses for a gui text editor…you might have to install it…

Yeah? I do use GNOME on Fedora, but haven’t had issues on the KDE version of openSUSE before. There must be something I’m not doing that could be done in the terminal. Manjaro and all Ubuntu flavors work fine with it. I’m not against a GUI program that would allow me to fix this, but it’s strange that I’m having the issue now.

I think you have to install kate. kedit should be available by default

Hi, and thanks for the response.

I’m getting a “command not found” when trying to use kedit. Anything else that might be the default text editor on the KDE edition of 13.2?

Daaaa! meant kwrite lol

Also I think either joe or nano is default simple command line editors also there is midnight commander but you need to install that. Then there is always vi if you are daring.

ed & joe

Those are included in the install.

There are several more you can choose to install, as well.

… such as, ktubering, a "Potato drawing editor"lol!

Hi,

I always use the builtin command for that kind of stuff.

if command -v screenfetch >/dev/null; then command screenfetch; fi

That code will make sure it finds screenfetch if it is in your PATH and it will run the executable screenfetch within your PATH.
Second the builtin command is POSIX according to this site

http://pubs.opengroup.org/onlinepubs/007904975/utilities/command.html

On 2014-12-08 06:06, Fraser Bell wrote:

> Only difference in path are uppercase F and lowercase f, results are
> different.

My guess is that Mr Rethil amd Mr verthrix changed the name,
intentionally or accidentally. The search is working correctly, it is
case sensitive.

> Who to notify for consolidation? Or, are there differences (I think
> not), and then which is the better choice?

Those two users, my guess.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

On 2014-12-12 23:46, gogalthorp wrote:
>
> Daaaa! meant kwrite lol
>
> Also I think either joe or nano is default simple command line editors
> also there is midnight commander but you need to install that. Then
> there is always vi if you are daring.

joe should be available in all installs, even on the rescue modes of the
installation dvd. We asked for that years ago, as “vi” was difficult for
us msdos/windows émigrés. :wink:

joe is peculiar in that it can be called in several guises: joe, jstar,
jmacs, jpico… so that it behaves differently on each, similar to those
editors.

There appears not to be a jvi, though :-p

mcedit is the editor of midnight commander, and it is very simple to
use, with evident help keys and menus. Midnight commander (mc) can be a
very useful tool to have when forced to work in text mode for rescue
ops, so it is something I always add at the first chance, during install.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

Hi,

Looked at this thread again after a few weeks of holiday lunacy, and I’m still a bit confused. I may need a step-by-step walkthrough to fix this problem, because I know openSUSE less than any other distro I use, and I’m very new to Linux in general. The bottom line seems to be that while I can locate the .bashrc file in other distros, I’m having trouble figuring out how to do so in this one. Not sure why, and it’s probably just due to confusion.

Are there some instructions I could use for the KDE edition that would tell me how to edit the proper file to put the Screenfetch line in so it’d automatically run upon opening a terminal? Am I better off installing a different text editor to do this with?

Sorry if I’m not entirely clear right now. I’m a bit out of it, but I don’t quite get what my best option would be between all the suggestions. My attempts at locating that file for purposes of editing it are fruitless for some reason.

Hi,

the .bashrc file is in your home directory and it starts with a dot which by default is not shown by any GUI file manager.

echo ~/.bashrc

and

echo "$HOME/.bashrc"

Should show you the absolute path where that file is. There should be an option for file managers to show files that starts with a dot aka “dot-files”.

kwrite ~/.bashrc

or

kwrite "$HOME/.bashrc"

should work for KDE since kwrite is installed by default. You should be able to edit and save that file.

On 2015-01-01 08:06, Hunson wrote:
>
> Hi,
>
> Looked at this thread again after a few weeks of holiday lunacy, and I’m
> still a bit confused. I may need a step-by-step walkthrough to fix this
> problem, because I know openSUSE less than any other distro I use, and
> I’m very new to Linux in general. The bottom line seems to be that while
> I can locate the .bashrc file in other distros, I’m having trouble
> figuring out how to do so in this one. Not sure why, and it’s probably
> just due to confusion.

It is a hidden file.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

… in KDE, Dolphin=>View=>Show Hidden Files