Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 28 Nov 2014, 20:24
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
Lobster Shell
Moderators: deshlab, Flash, GuestToo, Ian, JohnMurga, Lobster
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [12 Posts]  
Author Message
Lobster
Official Crustacean


Joined: 04 May 2005
Posts: 15117
Location: Paradox Realm

PostPosted: Mon 23 May 2005, 23:20    Post subject:  Lobster Shell  

Very Happy
Using the rute guide
http://wireless.ictp.trieste.it/school_2002/lectures/fonda/MoreLinux/rute/rute.html

was able to create the enclosed shell by hacking an existing wizard.

I store it in /usr/sbin with the name welcome.sh
drag it onto the desktop
seems to work OK on 1.0.2

Does it work on 1.0.1 of Puppy?

Gosh it was pretty easy to do - considering my first script was ech0 "hello world"

Hope it works OK

from the shell (rxvt)
chmod +x welcome.sh
Then you can start your script by typing: ./welcome.sh

Code:
#!/bin/sh

# Lobster May 2005 version 0.0.4 

export WelcomePuppy="
 <vbox>
  <hbox>
   <text>
    <label>OFF LINE SERVICES</label>
   </text>
  </hbox>
  <hbox>
   <text>
    <label>Wizards...</label>
   </text>
   <button>
    <input file>/usr/local/lib/X11/mini-icons/wizard16.xpm</input>
    <action>/usr/sbin/wizardwizard &</action>
   </button>
  </hbox>
  <hbox>
   <text>
    <label>Net Connect...</label>
   </text>
   <button>
    <input file>/usr/local/lib/X11/mini-icons/mini.netscape.xpm</input>
    <action>dillo /usr/share/doc/HOWTO_Internet.htm &</action>
   </button>
  </hbox>
  <hbox>
   <text>
    <label>Sound test...</label>
   </text>
   <button>
    <input file>/usr/local/lib/X11/mini-icons/mini.audiovol.xpm</input>
    <action>play /usr/share/audio/ivy.mp3 &</action>
   </button>
  </hbox>
<hbox>
   <text>
    <label>ON LINE SERVICES</label>
  </text>
  </hbox>
  <hbox>
   <text>
    <label>More Programs...</label>
   </text>
   <button>
    <input file>/usr/local/lib/X11/mini-icons/mini-diskette.xpm</input>
    <action>dillo http://www.goosee.com/puppy/wikka/DotPups &</action>
    <action> /usr/sbin/pupget &</action>
   </button>
  </hbox>
  <hbox>
   <text>
    <label>Tell a Friend...</label>
   </text>
   <button>
    <input file>/usr/local/lib/X11/mini-icons/mini-happy.xpm</input>
    <action>mozilla http://www.goosee.com/puppy/wikka/FriendEmail &</action>
    </button>
  </hbox>
  <hbox>
   <text>
    <label>Puppy Forum...</label>
   </text>
   <button>
    <input file>/usr/local/lib/X11/mini-icons/mini-dog.xpm</input>
    <action>mozilla http://www.murga.org/~puppy/ &</action>
   </button>
  </hbox>
  <hbox>
   <text>
    <label>Puppy IRC Chat...</label>
   </text>
   <button>
    <input file>/usr/local/lib/X11/mini-icons/chat16.xpm</input>
    <action>mozilla http://www.goosee.com/puppy/wikka/PuppyLinuxIRC &</action>
   </button>
  </hbox>
  <hbox>
   <text>
    <label>Latest News...</label>
   </text>
   <button>
    <input file>/usr/local/lib/X11/mini-icons/mini-news.xpm</input>
    <action>mozilla http://www.goosee.com/puppy/wikka/LatestNews &</action>
   </button>
  </hbox>

  <hbox>
   <button cancel></button>
  </hbox>
 </vbox>
"
gtkdialog --program WelcomePuppy

unset WelcomePuppy

_________________
Puppy WIKI

Last edited by Lobster on Thu 26 May 2005, 04:12; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website 
Pizzasgood


Joined: 04 May 2005
Posts: 6270
Location: Knoxville, TN, USA

PostPosted: Mon 23 May 2005, 23:42    Post subject:  

I didn't test all the buttons, but the ones I clicked (tell a friend, sound test, more programs) all worked in 1.0.1.
_________________
Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib

Back to top
View user's profile Send private message Visit poster's website 
Lobster
Official Crustacean


Joined: 04 May 2005
Posts: 15117
Location: Paradox Realm

PostPosted: Tue 24 May 2005, 02:30    Post subject:  

Thanks Pizzasgood,
Smile

Glad to hear it.
It is an easy and useful one to hack as it allows us to set up a customised menu for a relative, a relative beginner or a beginner relative - I even use it myself.

If you are not sure how to run it please ask. All you need is a text file called welcome.sh saved in usr/sbin

I always knew shells were good.

One of the things that threw me was trying to implement a function. Well the rute guide is for Bash and I know that Barry is thinking seriously (hopefully for 1.0.3) of using Bash.

Cool

_________________
Puppy WIKI
Back to top
View user's profile Send private message Visit poster's website 
GuestToo
Puppy Master

Joined: 04 May 2005
Posts: 4078

PostPosted: Tue 24 May 2005, 03:14    Post subject:  

you can use bash right now
just download the bash unleashed package from ibiblio and unzip it
put bash somewhere convenient ... for example, /root/bash

if you change the first line in your script to
#!/root/bash
it will run the script using bash instead of sh

if you put this line in /etc/profile:
export SHELL=/root/bash
then bash will be used automatically when you open an rxvt window

most scripts will still run /bin/sh
if you copy /root/bash to /bin/sh, then sh will be bash

or you can copy bash to /bin and symlink /bin/sh to /bin/bash ... that's what i do, i do it in rc.local ... i run a script something like this:

#!/root/bash
cp -f /root/bash /bin
ln -sf /bin/bash /bin/sh

again, some bash scripts still won't work right, because the gnu-utils are still busybox replacements
Back to top
View user's profile Send private message 
Lobster
Official Crustacean


Joined: 04 May 2005
Posts: 15117
Location: Paradox Realm

PostPosted: Tue 24 May 2005, 03:35    Post subject: Having a bash  

Thanks G2,

I did download Bash but did not know how to make it work - now I have a chance to use the most widely used Shell in Puppy. Hooray.

I did read somewhere (probably the back of a Tux Box - like an X box but with 24 Cell processors and a secret fish stash) that the real power of Linux is in the Shell (we cructaceans have a similar knowing)

Cool I am gonna do it by hand (no innuendo from Ian and the lewd lurkers) - I am keen - but perhaps a Dotpup?

I feel like I have been Born again and the big Puppy in the sky has . . .

[rambles off into the distance . . .]

_________________
Puppy WIKI
Back to top
View user's profile Send private message Visit poster's website 
GuestToo
Puppy Master

Joined: 04 May 2005
Posts: 4078

PostPosted: Tue 24 May 2005, 15:30    Post subject:  

i thought about a dotpup to automatically setup bash to replacee /bin/sh when Puppy boots, but if things don't work right, Puppy may not boot at all ... the only way to fix it is to mount pup001 in another distro and edit rc.local and comment or remove the line that replaces /bin/sh with bash

i figured it would be easier for someone to fix the problem if they set it up themselves in the first place

on the other hand, if you can copy bash to /bin (using rox or the command line) and it copies ok, then there really should be no problem ... all you need to do to make /bin/bash your shell is symlink /bin/sh to /bin/bash

since /bin is in ram, you have to do this every time you boot ... i have a couple of lines in rc.local

if you have an option 2 install, all you have to do is copy bash to /bin and symlink bash to sh, and bash will be your shell and will still be your shell after a reboot
Back to top
View user's profile Send private message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7084
Location: Perth, Western Australia

PostPosted: Tue 24 May 2005, 20:36    Post subject:  

Lobster, it is probably a good idea if we take another look at what the developer of gtkdialog is doing... we did try his latest sometime ago, and it was slightly broken.
...a problem with environment variables I think.
Back to top
View user's profile Send private message Visit poster's website 
Rich

Joined: 04 May 2005
Posts: 278
Location: Middlesbrough - UK

PostPosted: Wed 25 May 2005, 16:23    Post subject:  

Good Work Lobster.

For new users, something like this would be fantastic to get started with Puppy, without the need to instantly learn to navigate the pup001 file, as well as figure out what all the packages do !

Rich
Back to top
View user's profile Send private message 
gelias
Guest


PostPosted: Thu 26 May 2005, 13:08    Post subject: about BASH  

GuestToo wrote:
you can use bash right now
just download the bash unleashed package from ibiblio and unzip it
put bash somewhere convenient ... for example, /root/bash

if you change the first line in your script to
#!/root/bash
it will run the script using bash instead of sh

if you put this line in /etc/profile:
export SHELL=/root/bash
then bash will be used automatically when you open an rxvt window

most scripts will still run /bin/sh
if you copy /root/bash to /bin/sh, then sh will be bash

or you can copy bash to /bin and symlink /bin/sh to /bin/bash ... that's what i do, i do it in rc.local ... i run a script something like this:

#!/root/bash
cp -f /root/bash /bin
ln -sf /bin/bash /bin/sh

again, some bash scripts still won't work right, because the gnu-utils are still busybox replacements


Hello GuestToo

I downloaded and copied bash in my-applications/bin
It works well, but the history file doesn't exist.

I copied a .bash_history in /root to keep track of the commands, and aliases I usually use but bash does not read it.

Where should I put this file?

thanks in advance
Back to top
GuestToo
Puppy Master

Joined: 04 May 2005
Posts: 4078

PostPosted: Thu 26 May 2005, 16:18    Post subject:  

bash sets up a history file automatically in $HOME (/root for Puppy)

if you run bash as sh, bash behaves differently ... it pretends to be sh ... sh does not use .bashrc for example

i put SHELL=/bin/bash in /etc/profile ... so when i open an rxvt window, it automatically runs /bin/bash ... which means it's running as bash, so it will use .bashrc, and a history file too

i made a /root/.bashrc file:

#. /etc/profile
export HISTFILESIZE=2000
export HISTCONTROL=ignoredups

this keeps 2000 lines in your history files, and doesn't add duplicates lines

i have bash setup a little differently to the way i had it before, and i noticed if i killed X and restarted it, my LD_LIBRAY path wasn't set right, so i put . /etc/profile in .bashrc, which fixed it ... but it shouldn't do that, it should be runing bash as sh, and should automatically use /etc/profile ... so i'm not sure about that ... which is why i didn't make an upload a bash package yet ... you have to get all this stuff working perfectly before you upload your package

actually, . /etc/profile probably belongs in .bash_profile

you can put other stuff in .bashrc too ... aliases, prompts, ascii art

anyway, bash history does work, if bash is started as bash and not as sh ... try opening an rxvt window, and typing bash ... see if the prompt changes ... it does keep it's files in /root ... anything you put in /root/.bashrc should execute ... try putting an line like echo 'bashrc executing' in .bashrc
Back to top
View user's profile Send private message 
gelias
Guest


PostPosted: Thu 26 May 2005, 19:30    Post subject: bash-3.00  

Ok GuestToo.

It works....when rxvt starts, I can read:

bashrc executing
bash-3.00#


thanks
Back to top
Guest
Guest


PostPosted: Thu 02 Jun 2005, 16:09    Post subject:  

BarryK wrote:
Lobster, it is probably a good idea if we take another look at what the developer of gtkdialog is doing... we did try his latest sometime ago, and it was slightly broken.
...a problem with environment variables I think.


I did download the latest and Ian tried compiling it. No success so far. I am trying to compile things in gcc in vector - so far it seems pretty straightforward so may have another look at this.
Back to top
Display posts from previous:   Sort by:   
Page 1 of 1 [12 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0916s ][ Queries: 12 (0.0065s) ][ GZIP on ]