LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 07-20-2013, 09:49 PM   #1
ejames82
Member
 
Registered: Jun 2009
Posts: 93

Rep: Reputation: 15
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.
 
Old 07-21-2013, 03:54 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Did you check the following files?

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

These are typically used for login messages.
 
Old 07-21-2013, 06:27 AM   #3
ejames82
Member
 
Registered: Jun 2009
Posts: 93

Original Poster
Rep: Reputation: 15
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.
 
Old 07-21-2013, 06:34 AM   #4
ejames82
Member
 
Registered: Jun 2009
Posts: 93

Original Poster
Rep: Reputation: 15
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
 
Old 07-21-2013, 06:44 AM   #5
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Quote:
Originally Posted by ejames82 View Post
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.
 
Old 07-21-2013, 07:52 AM   #6
ejames82
Member
 
Registered: Jun 2009
Posts: 93

Original Poster
Rep: Reputation: 15
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.
 
Old 07-21-2013, 07:59 AM   #7
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
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.
 
1 members found this post helpful.
Old 07-21-2013, 04:13 PM   #8
jefro
Guru
 
Registered: Mar 2008
Posts: 11,781

Rep: Reputation: 1448Reputation: 1448Reputation: 1448Reputation: 1448Reputation: 1448Reputation: 1448Reputation: 1448Reputation: 1448Reputation: 1448Reputation: 1448
Wonder what exactly he is claiming a copyright to?
 
Old 07-22-2013, 04:28 PM   #9
ejames82
Member
 
Registered: Jun 2009
Posts: 93

Original Poster
Rep: Reputation: 15
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.
 
Old 07-22-2013, 04:33 PM   #10
ejames82
Member
 
Registered: Jun 2009
Posts: 93

Original Poster
Rep: Reputation: 15
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
 
Old 07-22-2013, 04:39 PM   #11
ejames82
Member
 
Registered: Jun 2009
Posts: 93

Original Poster
Rep: Reputation: 15
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.
 
Old 07-22-2013, 04:47 PM   #12
ejames82
Member
 
Registered: Jun 2009
Posts: 93

Original Poster
Rep: Reputation: 15
druuna,

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

you're a genius.

thanks.
 
Old 07-23-2013, 01:50 AM   #13
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
You're welcome
 
Old 08-21-2013, 03:10 PM   #14
ejames82
Member
 
Registered: Jun 2009
Posts: 93

Original Poster
Rep: Reputation: 15
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
 
Old 08-22-2013, 03:31 AM   #15
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Quote:
Originally Posted by ejames82 View Post
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: OS4 13.2 Screenshot Tour LXer Syndicated Linux News 0 01-10-2013 09:30 AM
LXer: Why Copyright Shouldn't Be Considered Property... And Why A Return To 1790 Copyright May Be De LXer Syndicated Linux News 1 12-06-2012 04:01 PM
LXer: Fixing Copyright: Is Copyright A Part Of Free Market Capitalism? LXer Syndicated Linux News 0 12-05-2012 11:10 AM
LXer: Question Copyright's "Minute Memes" challenge copyright rhetoric LXer Syndicated Linux News 0 01-19-2010 05:00 AM
LXer: [Video] Why Copyright? Canadian Voices on Copyright Law LXer Syndicated Linux News 0 12-04-2008 05:00 PM


All times are GMT -5. The time now is 12:10 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration