when i run in console under a graphical session, it will always show graphical dialogs event console based #15
Replies: 4 comments 3 replies
-
|
Hi @mckaygerhard ! Your need is legitimate, but is not general. I'm explaining better... Many linux programs are launched from Start menu or terminal (say: xterm ) and have same graphical aspect. Nevertheless, several script I have in my PC have: because I want, in those programs, that focus stay all the time in the bare terminal (not even with dialog ). Without "supermode" setting, EBG program should act just like, say Firefox... with no difference where you called it (Start menu or xterm ). |
Beta Was this translation helpful? Give feedback.
-
|
ok i made a test.. and now git that if you dont have a proper desktop with env variables will not work (and this is normal, the path of EBG is not set and cannot sourced the file), i used jgmenu for the test cos other will not show me what is really happened without using stupid fucking dbus and SHItstemd after set a full path the script works perfect.. but full path.. so an desktop entry will need env and paths present already! .. (edit) if we wants to use and be sure that EBG sync with the kind of widget for your window manager (QT vs GTK) you must autodetect in your script your desktop and set real or fake console will not be autodetected. if i invoke the program fronm the menu will lauch always the available widget.. inclusive if i set "terminal" in the desktop file.. same happened in the debian root menu or the openbox root menu.. no matter if the menu entry is a console with command (ex: |
Beta Was this translation helpful? Give feedback.
-
|
Hi Lenz!
I’m trying to understand the “problem” here (seriously). So… il I launch
“Firefox” from the Start menu, I’ll have a graphical app; if I open a
terminal, type “firefox” and press <Enter>, I’ll still have a graphical
app.
Now, let’s come back to a EBG app: if I wrote a script for, let’s say, a
brightness adjust, I probably want same “Firefox behavior” seen before, as
launching my app from Start menu, as from terminal.
I said “probably” ‘cause I could be a terminal-like apps keen and I prefere
bare terminal widget: in that case I use “supermode=none”.
Scripter could even check in his app has been launched from console or an
xterm: if Xorg is not running, it’s the first case; otherwise you can use
“-t” operator in “if” statement. So scripter could set the “supermode”
variable according to those checks I said before…
Il giorno gio 27 giu 2024 alle 18:31 Герхард PICCORO Lenz McKAY <
***@***.***> ha scritto:
… ok i made a test.. and now git that if you dont have a proper desktop with
env variables will not work (*and this is normal*, the path of EBG is not
set and cannot sourced the file), i used jgmenu for the test cos other will
not show me what is really happened without using stupid fucking dbus and
SHItstemd
info: created 3 symlinks in /home/general/.cache/jgmenu/icons
/home/general/bin/launchtest: line 34: vendor/easybashgui/src/easybashgui: No such file or directory
/home/general/bin/launchtest: line 35: message: command not found
after set a full path the script works perfect.. but full path.. *so an
desktop entry will need env and paths present already!* ..
—
Reply to this email directly, view it on GitHub
<#15 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABDFPQ6KBXCC4ZJ3VVSJQH3ZJQ45DAVCNFSM6AAAAABDI3EX7GVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TQOJWGQ3DM>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
|
On the contrary, when you are in real console terminal (say: without Xorg
running, headless system) then the content of “wich_terminal” variable
should be = “init”.
Il giorno ven 28 giu 2024 alle 22:21 Герхард PICCORO Lenz McKAY <
***@***.***> ha scritto:
… nono .. i read the message
easybashgui.lib used to know wich terminal launched the script:
which_terminal="$(ps -o comm= -p $(ps -o ppid= -p $$ ))"
[[ ${which_terminal} == *"sh" ]] && which_terminal="$(ps -o comm= -p $(ps -o ppid= -p $(ps -o ppid= -p $$ )))"
=> the terminal name, then, is in “which_terminal” variable…
but this does not determines if the env was lauched froma pseudo terminal
or real terminal.. cos some distros assumed "xterm" for real tty terminals..
right now i dont have the code.. but i will provide the way.,. please wait
for me!
—
Reply to this email directly, view it on GitHub
<#15 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABDFPQ3AVKFW5UACVAN4VWLZJXATPAVCNFSM6AAAAABDI3EX7GVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TSMBYGY2TA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
author response to me partiality cos i was not enough clear about my question:
noted that if i am using console but under a desktop/x11 session always raised GTK/QT/KDE gui's event the console dialog/whiptail etc.. i have some trick to set the console "mode" ..
HE answered as is:
VERY easy:
but this is not the things i wants to .. what i means is that although I am running everything in the console (which is within the graphical session) easybashgui detects the graphical session, but it is the console that I am using.
This means that this is not a real console, and easybashgui is looking at the environment variables according to what I see in the code... this is wrong because it does not know that the console is "fake"..
the "export supermode=dialog" forces an existing predefined but i wants to autodetect if was launched from command line or from a desktop file that provided fake env (when you clicked the script or launch from menu)
so then we can made detection if users runs from command line invocation or from a menu item
Beta Was this translation helpful? Give feedback.
All reactions