You are not logged in.

#1 2016-12-09 22:22:01

Martin
Member
From: Stockholm, Sweden
Registered: 2015-10-01
Posts: 801
Website

dmenu vs command line

At work I have noticed something I have not seen ever before on Linux (I think): A program started using dmenu behaves different to when started from a command prompt in bash.

The program in this case is ANSYS Workbench and from inside Workbench Design Manager and Mechanical. These are expensive but capable programs so my employer pays.

Here is what happens:

  • dmenu

    1. Workbench fires up OK

    2. I can import existing projects OK

    3. If I fire up Design Manager (3D CAD) the GUI starts and it says it is reading and rendering the model but nothing happens apart from the cooling fan revving up. Same if I try Mechanical (structural and thermal caclulations).

  • cli

    1. Everything works the way it should despite the fact that I am running this on a Linux flavour that is not officially supported by ANSYS (som trickery related to graphics libraries needed after installation).

All this is on Ubuntu 14.04, or rather, a corporate tweak of Ubuntu 14.04.

What I am actually invoking is a one-line shell script starting Workbench with a set of parameters. Same script regardless of dmenu or cli case.

Does anyone know what might be going on here?

/Martin


"Problems worthy of attack
prove their worth by hitting back."
Piet Hein

Offline

#2 2016-12-10 07:50:12

iMBeCil
WAAAT?
From: Edrychwch o'ch cwmpas
Registered: 2015-09-29
Posts: 767

Re: dmenu vs command line

I suspect that bash i.e. cli sets certain variables, important for ANSYS, while dmenu doesn't necesarilly process .bashrc?!

You can try to create little script in $HOME/bin to test this ... see dmenu/gmrun/cli - check terminal for complete solution  wink


Postpone all your duties; if you die, you won't have to do them ..

Offline

#3 2016-12-10 09:43:00

Martin
Member
From: Stockholm, Sweden
Registered: 2015-10-01
Posts: 801
Website

Re: dmenu vs command line

Aha! Of course, that must be it.
I had to add a couple of lines to .baschrc to aid the running of ANSYS programs.

Thanks,

/Martin


"Problems worthy of attack
prove their worth by hitting back."
Piet Hein

Offline

#4 2016-12-10 10:54:34

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: dmenu vs command line

Would it be possible to post the added lines and perhaps your startup script as well?

It may prove useful for others who have this problem smile

EDIT: thread moved to Help & Support (Other)

Last edited by Head_on_a_Stick (2016-12-10 11:07:51)

Offline

#5 2016-12-10 15:05:18

iMBeCil
WAAAT?
From: Edrychwch o'ch cwmpas
Registered: 2015-09-29
Posts: 767

Re: dmenu vs command line

Martin wrote:

Aha! Of course, that must be it.
I had to add a couple of lines to .baschrc to aid the running of ANSYS programs.

Thanks,

/Martin

You're welcome.

But, I don't think that adding anything to .bashrc or similar will help, as cli version is working ok.

Rather, you should create bash script - to be started from dmenu - which will then start the program. (As per instruction in link I linked - just replace 'ranger' with your program name.)

Or I misunderstood what the problem is?


Postpone all your duties; if you die, you won't have to do them ..

Offline

#6 2016-12-10 15:23:52

Martin
Member
From: Stockholm, Sweden
Registered: 2015-10-01
Posts: 801
Website

Re: dmenu vs command line

@Head_on_a_stick: I am not at work so I can't post script and added lines to .bascrc -- I don't have that kind of memory.

@iMBeCil: The added lines I was mentioning are needed to make the ANSYS programs run at all.

I have followed these instructions.

/Martin


"Problems worthy of attack
prove their worth by hitting back."
Piet Hein

Offline

#7 2016-12-11 06:59:01

Snap
Member
Registered: 2015-10-02
Posts: 465

Re: dmenu vs command line

AFAIK, dmenu ignores bashrc or whatever login shell you are using. That makes sense for it to remain shell agnostic and keep working regardless of the shells. So (bash) defined aliases and functions don't work with dmenu. It can be annoying sometimes, but I guess it's the way it should be.

Last edited by Snap (2016-12-11 06:59:31)

Offline

#8 2016-12-11 08:49:42

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,668
Website

Re: dmenu vs command line

Snap wrote:

(bash) defined aliases and functions don't work with dmenu. It can be annoying sometimes, but I guess it's the way it should be.

The same applies to gmrun or commands launched from rc.xml, menu.xml, etc.
bash_aliases is only for the terminal.


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#9 2016-12-11 10:39:04

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Offline

#10 2016-12-11 15:07:59

Martin
Member
From: Stockholm, Sweden
Registered: 2015-10-01
Posts: 801
Website

Re: dmenu vs command line

Thanks guys, starting ANSYS programs from cli is OK for now.

My next ANSYS challenge is to install their Electromagnetics suite. This is something ANSYS got when buying a company called Ansoft. The electromagnetic tools are getting integrated with the rest but look-and-feel is still Ansoft rather than ANSYS and, the installation process is a little different. There is a shell script looking for Linux version and I need to fool it...

Searching the Internet I find nothing :-(

/Martin


"Problems worthy of attack
prove their worth by hitting back."
Piet Hein

Offline

#11 2016-12-11 15:43:07

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: dmenu vs command line

Martin wrote:

There is a shell script looking for Linux version and I need to fool it...

Try:

sudo apt purge bunsen-os-release

Once the script has run that package can be re-installed wink

Offline

#12 2016-12-11 18:11:39

Martin
Member
From: Stockholm, Sweden
Registered: 2015-10-01
Posts: 801
Website

Re: dmenu vs command line

Well, I doubt that would help much as I am using ANSYS programs on my work laptop which is running a tweaked Ubuntu 14.04 (tweaked to work in my employer's IT system). ANSYS only supports RedHat and Suse. I think there is a way to skip over the OS identification but since I am no good at bash scripting I haven't figured out how yet. It may be a simple as adding an 'ignore-OS' option to the script but right now I don't know.

Why do your employer go for a Linux flavour not supported by major CAE vendors? I hear you cry. My answer is I do not know and this is not the first time.

/Martin


"Problems worthy of attack
prove their worth by hitting back."
Piet Hein

Offline

#13 2016-12-11 18:15:14

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: dmenu vs command line

Martin wrote:

Well, I doubt that would help much as I am using ANSYS programs on my work laptop which is running a tweaked Ubuntu 14.04

D'oh! Yes, of course, I moved the thread myself. Ahem.  :8

Offline

Board footer

Powered by FluxBB