LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   remove OS4 terminal greeting, version and copyright (https://www.linuxquestions.org/questions/linux-general-1/remove-os4-terminal-greeting-version-and-copyright-4175470349/)

ejames82 07-20-2013 09:49 PM

remove OS4 terminal greeting, version and copyright
 
Hello,

I have a previous version of os4 on another computer. it's a great OS.
when I open a terminal with that computer, the very first line has the prompt. just the way I like it.
I installed the latest version on this computer. when I opened up a terminal there was a nice (and unneeded) encouraging message called a 'fortune' and this:


Welcome to OpenDesktop

OS4 Release 13 Update 3 (32 bit)

Copyright (C) 2008, Roberto J. Dohnert


I removed the 'fortune' after some investigation, but have not found a way to get rid of the rest (seen above). it's nine lines of wasted space every time I open a terminal.

would somebody please help me remove this?

I am seriously considering reinstalling the same older version that I have on the other computer.

I would have asked my question at the OS4 forum, if there was one.

thanks.

druuna 07-21-2013 03:54 AM

Did you check the following files?

- /etc/motd
- /etc/issue
- /etc/issue.net

These are typically used for login messages.

ejames82 07-21-2013 06:27 AM

hello druuna,



here is the contents of /etc/motd

Linux 3.2.0-38-generic (ed-MSIbox) 07/21/13 _i686_ (1 CPU)

avg-cpu: %user %nice %system %iowait %steal %idle
3.33 0.00 9.11 46.88 0.00 40.68

Device: tps kB_read/s kB_wrtn/s kB_read kB_wrtn
fd0 0.03 0.12 0.00 4 0
sda 110.85 6438.46 0.00 210666 0



here is the contents of /etc/issue

OS4 OpenDesktop 13 Update 3 (32 bit)



here is the contents of /etc/issue.net

OS4 OpenDesktop 13 Update 3 (32 bit)



now should I just delete the /etc/issue and /etc/issue.net files? or maybe rename or move them?

now you've given me an idea. maybe I should check each of these text files in the /etc directory
still havent fount the welcome or the copyright files.

thanks.

ejames82 07-21-2013 06:34 AM

I forgot to mention how I got rid of the 'fortune'. I put a # in front of the word fortune in the /etc/bash.bashrc file. I show it below:



# System-wide .bashrc file for interactive bash(1) shells.

# To enable the settings / commands in this file for login shells as well,
# this file has to be sourced in /etc/profile.

# If not running interactively, don't do anything
[ -z "$PS1" ] && return

# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize

# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi

# set a fancy prompt (non-color, overwrite the one in /etc/profile)
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '

# Commented out, don't overwrite xterm -T "title" -n "icontitle" by default.
# If this is an xterm set the title to user@host:dir
#case "$TERM" in
#xterm*|rxvt*)
# PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
# ;;
#*)
# ;;
#esac

# enable bash completion in interactive shells
#if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
# . /etc/bash_completion
#fi

# sudo hint
if [ ! -e "$HOME/.sudo_as_admin_successful" ] && [ ! -e "$HOME/.hushlogin" ] ; then
case " $(groups) " in *\ admin\ *)
if [ -x /usr/bin/sudo ]; then
cat <<-EOF
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

EOF
fi
esac
fi

# if the command-not-found package is installed, use it
if [ -x /usr/lib/command-not-found -o -x /usr/share/command-not-found/command-not-found ]; then
function command_not_found_handle {
# check because c-n-f could've been removed in the meantime
if [ -x /usr/lib/command-not-found ]; then
/usr/bin/python /usr/lib/command-not-found -- "$1"
return $?
elif [ -x /usr/share/command-not-found/command-not-found ]; then
/usr/bin/python /usr/share/command-not-found/command-not-found -- "$1"
return $?
else
printf "%s: command not found\n" "$1" >&2
return 127
fi
}
fi
cat /etc/shell
#fortune
cat /etc/blank

druuna 07-21-2013 06:44 AM

Quote:

Originally Posted by ejames82 (Post 4994100)
now should I just delete the /etc/issue and /etc/issue.net files? or maybe rename or move them?

I wouldn't remove the files, if you do not want/need the info then make them empty. Example:
Code:

> /etc/issue
Quote:

now you've given me an idea. maybe I should check each of these text files in the /etc directory
still havent fount the welcome or the copyright files.
There could be other files where this is stored, first that comes to mind (for Debian based systems): /etc/motd.tail

You can always do a search:
Code:

cd /etc
grep -l "Copyright (C) 2008, Roberto J. Dohnert" *

The above will return file names that contain the string.

ejames82 07-21-2013 07:52 AM

I agree that removing any file would be a bad idea.

I found the file to change. it is /etc/shell

I went in as sudo and backspaced over the text, making the file blank, then saved and rebooted

there is no longer any text, however there is three lines of blank space above the prompt at the top.

I can easily live with this. I consider this problem solved. if you have any suggestions, I welcome them. I have to work in a little while, but I will keep an eye on the thread when I can.

thanks.

druuna 07-21-2013 07:59 AM

If I look at this part:
Quote:

cat /etc/shell
#fortune
cat /etc/blank
Then it could be that there are blank lines in /etc/blank.

You can empty the /etc/blank file or comment out the entry in your /etc/bash.bashrc file (I would prefer the second option).

You might even want to comment out the whole block (then there's no need to edit /etc/shell and/or /etc/blank.

jefro 07-21-2013 04:13 PM

Wonder what exactly he is claiming a copyright to?

ejames82 07-22-2013 04:28 PM

druuna,

it's funny, I actually checked that file before, saw the blank page/file, and thought nothing of it.

after your suggestion I went back as sudo and examined that file/blank page, and noticed I could highlight one line and delete it, then save. so that file provided a sort-of blank line possibly to the terminal only, it appears.

it did some good. when I first open the terminal, there are two blank lines above the prompt. this is satisfactory. if I am in a session entering commands, there are no spaces between, where there would be three lines before. if I use something like gedit, then exit gedit, there will be two blank lines above the prompt. I actually like this. this is no longer bothersome.

thanks



jefro,

I don't know, but I do know that I like his OS.

ejames82 07-22-2013 04:33 PM

druuna,

I just realized what you meant by commenting out lines in bash.bashrc

put a # in front of
cat /etc/shell
cat /etc/blank

I will go see if I can and what it does and report back

thanks

ejames82 07-22-2013 04:39 PM

druuna,

I don't want to call you a genius just yet, but I did what you suggested and the prompt is on the top line of the terminal. :)

I will reboot and see if it still is.

ejames82 07-22-2013 04:47 PM

druuna,

success. prompt right at the top of the terminal after rebooting.

you're a genius. :)

thanks.

druuna 07-23-2013 01:50 AM

You're welcome :)

ejames82 08-21-2013 03:10 PM

I just wanted to clarify the solution while I have it simplified.


the idea is to put a

#

in front of

cat /etc/shell
fortune
cat /etc/blank


they are at the bottom of /etc/bash.bashrc

I used
gedit /etc/bash.bashrc
after editing, click on 'save'
I used sudo, but it may not be necessary

druuna 08-22-2013 03:31 AM

Quote:

Originally Posted by ejames82 (Post 5013324)
I just wanted to clarify the solution while I have it simplified.

the idea is to put a

#

in front of

cat /etc/shell
fortune
cat /etc/blank


they are at the bottom of /etc/bash.bashrc

I used
gedit /etc/bash.bashrc
after editing, click on 'save'
I used sudo, but it may not be necessary

The bash related entries in /etc are only writeable by root and not by normal users (they only have read permissions).

So, you need root privileges to edit those files and using sudo is one way.

Hope this clarifies your doubts.


All times are GMT -5. The time now is 01:07 PM.