Tin nhắn: 24
Nội dung: English
darkweasel (Xem thông tin cá nhân) 20:07:43 Ngày 23 tháng 8 năm 2011
komenstanto (Xem thông tin cá nhân) 18:51:04 Ngày 24 tháng 8 năm 2011
darkweasel:Hm, I've now downloaded the Esperanto proverbs (fortunes-eo), but how do I get gnome-terminal to display one of them on each start?I dont know why they do this to Ubuntu users, but you have to add the line: /usr/games/fortune to your BASH configuration file. If you want to test this now, simply type /usr/games/fortune at your terminal prompt and hit enter. It should display an Esperanto Proverb!
But to make this automatic, we will have to add a line to a file called .bashrc. If you dont know, BASH is a the name probably of your UBUNTU terminal shell.
https://secure.wikimedia.org/wikipedia/en/wiki/Bou...
Just so you know, there are other shells like ZSH. Normal users generally have BASH as their terminal. I can tell you more about this if you are interested!
The .bashrc file begins with a '.'. In linux/UNIX, the period signifies the file as being "hidden" or invisible. "rc" means "runtime configuration". These files are in your user name folder and effect the startup of programs.
So if your name in your UBUNTU machine is DARKWEASEL, then these secret files are in that folder. So open up the file browser and go to the tool bar at the top and select "View" then in the drop down select "Show hidden files". Many files beginning with "." should appear! Edit .bashrc and add this line at the bottom: /usr/games/fortune and save it! Now when you start terminal, fortune appears!
This is real Linux fun.
darkweasel (Xem thông tin cá nhân) 19:04:55 Ngày 24 tháng 8 năm 2011
Since fortune is actually preinstalled on Ubuntu, just running the program will display a fortune from the standard database. After installing fortunes-eo, this command will however work:
fortune /usr/share/games/fortunes/eo/proverbaro
You may want to add this:
echo ""
Then there will be a line break between the proverb and the input prompt.
(BTW, I’m not a complete Linux beginner and I’m aware to some extent of hidden files, shells etc. )
komenstanto (Xem thông tin cá nhân) 19:22:18 Ngày 24 tháng 8 năm 2011
darkweasel:Thanks a lot, I hadn’t thought of .bashrc!Interesting about the echo newline.
Since fortune is actually preinstalled on Ubuntu, just running the program will display a fortune from the standard database. After installing fortunes-eo, this command will however work:
fortune /usr/share/games/fortunes/eo/proverbaro
You may want to add this:
echo ""
Then there will be a line break between the proverb and the input prompt.
(BTW, I’m not a complete Linux beginner and I’m aware to some extent of hidden files, shells etc. )
I didnt know your level. Just thought to be thorough, might help someone else. I dont have the standard fortunes installed, so for me I can just type "fortune" and it shows them in Esperanto. But yes, that .bashrc controls most everything, colors and aliases in the terminal, etc.
The terminal is really fun for everything, playing music, etc. I even use Music on Console for playing all music and radio.