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 Tue 02 Sep 2014, 05:34
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
Solved-Use alias & join commands?
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [5 Posts]  
Author Message
Jasper


Joined: 25 Apr 2010
Posts: 1111
Location: England

PostPosted: Tue 14 Feb 2012, 13:33    Post subject:  Solved-Use alias & join commands?  

Hi,

Using Slacko 5.3.1 Main/JWM and typing "fx" in a urxvt terminal then pressing Enter works if I insert into /root/.bashrc the line:
Code:
alias fx=fixmenus


I would like to add into the same command after running fixmenus - "jwm -restart" and "exit" so as to close the terminal automatically after running both commands from the single "fx" alias.

It's not important, but I'd be very happy to be educated.

My regards

Last edited by Jasper on Thu 16 Feb 2012, 20:20; edited 1 time in total
Back to top
View user's profile Send private message 
duke93535


Joined: 05 May 2005
Posts: 194
Location: California , High Desert

PostPosted: Tue 14 Feb 2012, 15:51    Post subject:  

Sounds to me like you want to Refresh Menus in one step as was done in Puppy 421? Just add refreshmenus to /usr/bin.

You can add it to the menu by editing the /etc/xdg/templates/_root_jwmrc with this line below the <Program label="Help”..... line.

Code:
<Program label="Refresh Menus” icon="refresh24.png">exec /usr/bin/refreshmenus</Program>


You need to add the icon to /usr/local/lib/X11/pixmaps. To unzip left click and say yes in popup.

You will have to do a fixmenus and a jwm -restart in terminal so it will show up in the menu.

duke
refresh24.png.gz
Description 
gz

 Download 
Filename  refresh24.png.gz 
Filesize  1.82 KB 
Downloaded  77 Time(s) 
refreshmenus.gz
Description 
gz

 Download 
Filename  refreshmenus.gz 
Filesize  377 Bytes 
Downloaded  70 Time(s) 
Back to top
View user's profile Send private message 
Jasper


Joined: 25 Apr 2010
Posts: 1111
Location: England

PostPosted: Tue 14 Feb 2012, 19:31    Post subject:  

Hi duke93535,

Thank you so much for your clear and excellent help and I am pleased to tell you that I am now using "refreshmenus" which works very well and I like the elegant message and progress bar.

The refreshmenus script was too complicated [for me] to copy the style and to use it to combine more commands. However, I successfully managed multiple [albeit simple] commands with the "xdotool" when I used Lupu 5.1.

My regards and appreciation
Back to top
View user's profile Send private message 
stu90


Joined: 25 Feb 2010
Posts: 1401
Location: England. Dell Inspiron 1501. Dpup

PostPosted: Wed 15 Feb 2012, 03:03    Post subject:  

Hello Jasper,
Sounds like you are sorted now but for your original question - you could try adding to your .bashrc:
alias fx="fixmenus && jwm -restart && exit"
the && lets you run one command after another but only when the command before it has finished.
exmaple: geany && mtpaint - you have to finish / close geany before mtpaint opens.
a single & will let you run the commands at the same time.
example: geany & mtpaint & - both geany and mtpaint will open at the same time.
The exit command at the end will close the terminal.
Back to top
View user's profile Send private message 
Jasper


Joined: 25 Apr 2010
Posts: 1111
Location: England

PostPosted: Wed 15 Feb 2012, 04:43    Post subject:  

Hi stu90,

Thank you too. You are also a star writer. Your solution will help with other alias' (to save typing and improve speed) in executing command line actions.

My regards

Note for any less experienced readers [like me] - I tried &&, but it failed because I had the inverted commas in wrong positions.

It seems vital that if there is any space in the full text of the joined commands [except around &&] they should start and end with inverted commas e.g. "command 1 && command 2" or if using the alias feature e.g. alias "command 1 && command 2 && exit"
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [5 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
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.0588s ][ Queries: 12 (0.0092s) ][ GZIP on ]