Workspace Manager Menus - dtwmrc file


 
Thread Tools Search this Thread
Operating Systems Solaris Workspace Manager Menus - dtwmrc file
# 1  
Old 01-26-2015
Workspace Manager Menus - dtwmrc file

When I execute this command:
Code:
exec xterm –e $SHELL –c “sed –n 4p /folder1/folder2/folder3/file.dat; $SHELL”

I have the expecting result: It opens an new terminal, it shows the 4th line of the file and the terminal window stays open  perfect.

So I tried to write it in the dtwmrc file to have an extra line in the Workspace Manager Menus to execute this command. I add this line in the dtwmrc file:
Code:
“The 4th line is” f.exec xterm –e $SHELL –c “sed –n 4p /folder1/folder2/folder3/file.dat; $SHELL”

But the problem is when I click on the menu “The 4th line is”, it opens a terminal and shows nothing.

I expected to have:
Code:
“content of the 4th line”
WkOps: /export/home/user $ _

But I only have
Code:
WkOps: /export/home/user $ _

I work on Solaris 10

Damien

Last edited by rbatte1; 01-26-2015 at 08:18 AM.. Reason: Added CODE tags
# 2  
Old 01-26-2015
The CDE dtwmrc wants word f.exec word
If you have multi-word you must put normal quotes around them "w1 w2" f.exec "w3 w4".
Now you have the problem of quotes inside quotes.
Fortunately the shell accepts single-quotes, and in this case you can use them as well.
Code:
"The 4th line is" f.exec "xterm -e $SHELL -c 'sed -n 4p /folder1/folder2/folder3/file.dat; $SHELL'"

Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. Solaris

Solaris dtwmrc help

Hi everyone... At work, on our Solaris OS, we have a custom sys.dtwmrc file that controls a custom right-click menu that launches a Java program. I need to edit the dtwmrc file to launch the Java program only if the program is not already running. If the program is already running, I need the... (12 Replies)
Discussion started by: bitnix
12 Replies

2. UNIX for Dummies Questions & Answers

opening programs in a different workspace

Hello, I have been searching for a way to spawn new processes in a different workspace with no luck. Does anyone know how to do this at the command prompt. I wish to do something like this. >vi a.txt & | workspace 2 is there any way to do this? (3 Replies)
Discussion started by: ineedhelp#1
3 Replies

3. UNIX for Dummies Questions & Answers

Script file menus and coding

I am very new to Unix and don't know much about it. I've been trying to create a menu and what I don't understand is how to execute a command once a user makes a selection. I have the menu set up. In fact, the following is the code that I have thus far: #! /bin/csh # This is the UNIX menu... (0 Replies)
Discussion started by: sinjin
0 Replies

4. UNIX for Dummies Questions & Answers

Creating menus in script file

I'm very new to Unix and know the simplest of its commands. I am trying to write a script file that has a menu with the following options showing: 1) Display all files in a user's home directory. 2) Welcome yourself to the program 3) Display System Information 4) Exit to Windows I am able... (6 Replies)
Discussion started by: sinjin
6 Replies

5. HP-UX

printer in the workspace

Experts, How to configure to add the printer icon in the workspace. I compared with C3700 and C8000 machine the C3700 have it but in C8000 didnt appeared. they are both running hpux 11.11. apprciate your inputs. Thanks (0 Replies)
Discussion started by: eykyn17
0 Replies

6. UNIX for Dummies Questions & Answers

Copying file from Unix workspace to Windows Network

Hi All, I am new for Unix, and facing one problem I wanted to copy some of files from my Unix workarea to Window network drive. I am not able to use copy or move command for this, as this only works within workarea. Please let me know, how it can be done. (2 Replies)
Discussion started by: ashwanis
2 Replies

7. Programming

ncurses -> the best way to use menus

hello there, i'm exploring the curses lib and i'm having some trouble with "defining a style". to clarify: i'm creating a menu driven app and i've been thinking what's the best way to use menus: make global vars (not my favourite), creating a function which designs the menu and returns the... (2 Replies)
Discussion started by: crashnburn
2 Replies
Login or Register to Ask a Question