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 Sun 31 Aug 2014, 00:26
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 Posts_count  
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

Edited_time_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:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


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