- Thread: Reset background color for bash dialog?
- Reset background color for bash dialog?
- Re: Reset background color for bash dialog?
- Re: Reset background color for bash dialog?
- Re: Reset background color for bash dialog?
- Re: Reset background color for bash dialog?
- Re: Reset background color for bash dialog?
- Re: Reset background color for bash dialog?
- Re: Reset background color for bash dialog?
- Re: Reset background color for bash dialog?
- Re: Reset background color for bash dialog?
- wxWidgets Discussion Forum
- Dialog background color on Gnome (Ubuntu) Topic is solved
- Dialog background color on Gnome (Ubuntu)
Thread: Reset background color for bash dialog?
A Carafe of Ubuntu
Reset background color for bash dialog?
I got some script where i’m useing dialog command.
#!/bin/bash tmpfile=$(mktemp tmp.XXXXXXX --tmpdir=/tmp 2>/dev/null) || tmpfile=/tmp/test$$ dialog --backtitle "Конфигурация сервера" \ --title "Установка" \ --clear \ --checklist "Список заданий" 15 50 4 \ 1 "Install LAMP" on \ 2 "Setup IPTABLES" on 2> $ if [ "$?" -eq "0" ]; then grep -o 1 $tmpfile > /dev/null 2>&1 if [ "$?" -eq "0" ]; then echo 123 fi grep -o 2 $tmpfile > /dev/null 2>&1 if [ "$?" -eq "0" ]; then echo 123 fi else echo "Interrupted" fi
Is there any way to reset background and font colours back to default black\white after filling dialog «form»? I tried to use «clear» but it’s no use.
Geek
Re: Reset background color for bash dialog?
Background color of the dialog or the terminal after the dialog/script exits?
And running your script, selections are both pre-filled. Both chosen.
A Carafe of Ubuntu
Re: Reset background color for bash dialog?
I’m talking about blue BG color. For example, i want to see some output after running dialog and this blue BG a little bit noisy
Is there any way after close dialog form itself reset this colours back to default?
Attached Images
- 2016-06-18_014002.jpg (16.1 KB, 5 views)
Ubuntu addict and loving it
Join Date Jan 2010 Location Wheeling WV USA Beans 2,003 —> Beans 2,003 Distro Xubuntu 20.04 Focal Fossa
Re: Reset background color for bash dialog?
what did the clear command do? the dialog man page says that is what to do. maybe your terminal was not set to the default colors. try clear by itself and tell us what happens. what terminal are you running? maybe setterm can do what you need.
Mask wearer, Social distancer, System Administrator, Programmer, Linux advocate, Command Line user, Ham radio operator (KA9WGN/8, tech), Photographer (hobby), occasional tweeter
Geek
Re: Reset background color for bash dialog?
A Carafe of Ubuntu
Re: Reset background color for bash dialog?
Yeah. I know about clear, but some strange way when I run this script in ssh session it looks for me like this. If i run this script in real terminal — all works just fine. So what wrong with ssh session or what?
Attached Images
- 2016-06-20_061620.jpg (43.9 KB, 3 views)
A Carafe of Ubuntu
Re: Reset background color for bash dialog?
Originally Posted by Skaperen
How can I check what terminal i’m running? Sorry i’m still not so good with linux Are you talking about that?
I tried use setterm with —default and —reset but this didn’t helped me
Ubuntu addict and loving it
Join Date Jan 2010 Location Wheeling WV USA Beans 2,003 —> Beans 2,003 Distro Xubuntu 20.04 Focal Fossa
Re: Reset background color for bash dialog?
it look like you are running putty. maybe it is emulating a terminal wrong. install ubuntu (in a virtual machine) and use that
Mask wearer, Social distancer, System Administrator, Programmer, Linux advocate, Command Line user, Ham radio operator (KA9WGN/8, tech), Photographer (hobby), occasional tweeter
A Carafe of Ubuntu
Re: Reset background color for bash dialog?
I’m running «Xshell». This is too ssh client for windows PCs. And as I already told — when I’m running this script in «real» terminal (yeah, on virtual machine) — all works fine. So maybe some one have any idea what setting for ssh client I should look for?
Ubuntu addict and loving it
Join Date Jan 2010 Location Wheeling WV USA Beans 2,003 —> Beans 2,003 Distro Xubuntu 20.04 Focal Fossa
Re: Reset background color for bash dialog?
Mask wearer, Social distancer, System Administrator, Programmer, Linux advocate, Command Line user, Ham radio operator (KA9WGN/8, tech), Photographer (hobby), occasional tweeter
- Site Areas
- Settings
- Private Messages
- Subscriptions
- Who’s Online
- Search Forums
- Forums Home
- Forums
- The Ubuntu Forum Community
- Ubuntu Official Flavours Support
- New to Ubuntu
- General Help
- Installation & Upgrades
- Hardware
- Desktop Environments
- Networking & Wireless
- Multimedia Software
- Ubuntu Specialised Support
- Ubuntu Development Version
- Security
- Virtualisation
- Ubuntu Servers, Cloud and Juju
- Server Platforms
- Ubuntu Cloud and Juju
- Gaming & Leisure
- Emulators
- Wine
- Development & Programming
- Packaging and Compiling Programs
- Development CD/DVD Image Testing
- Ubuntu Application Development
- Ubuntu Dev Link Forum
- Programming Talk
- Repositories & Backports
- Ubuntu Backports
- Bug Reports / Support
- Ubuntu Backports
- System76 Support
- Apple Hardware Users
- Ubuntu Community Discussions
- Ubuntu, Linux and OS Chat
- Recurring Discussions
- Full Circle Magazine
- The Cafe
- Cafe Games
- Market
- Mobile Technology Discussions (CLOSED)
- Announcements & News
- Weekly Newsletter
- Membership Applications
- The Fridge Discussions
- Forum Council Agenda
- Forum Feedback & Help
- Request a LoCo forum
- Resolution Centre
- Ubuntu, Linux and OS Chat
- Other Discussion and Support
- Other OS Support and Projects
- Other Operating Systems
- Ubuntu/Debian BASED
- Debian
- MINT
- Arch and derivatives
- Fedora/RedHat and derivatives
- Mandriva/Mageia
- Slackware and derivatives
- openSUSE and SUSE Linux Enterprise
- Mac OSX
- PCLinuxOS
- Gentoo and derivatives
- Windows
- BSD
- Any Other OS
- Other Operating Systems
- Assistive Technology & Accessibility
- Art & Design
- Education & Science
- Documentation and Community Wiki Discussions
- Tutorials
- Outdated Tutorials & Tips
- Ubuntu Women
- Ubuntu LoCo Team Forums
- Americas LoCo Teams
- Argentina Team
- Software
- Hardware
- Comunidad
- Arizona Team — US
- Arkansas Team — US
- Brazil Team
- California Team — US
- Canada Team
- Centroamerica Team
- Chile Team
- Comunidad
- Hardware
- Software
- Instalaci�n y Actualizaci�n
- Colombia Team — Colombia
- Georgia Team — US
- Illinois Team
- Indiana — US
- Kentucky Team — US
- Maine Team — US
- Minnesota Team — US
- Mississippi Team — US
- Nebraska Team — US
- New Mexico Team — US
- New York — US
- North Carolina Team — US
- Ohio Team — US
- Oklahoma Team — US
- Oregon Team — US
- Pennsylvania Team — US
- Peru Team
- Texas Team — US
- Uruguay Team
- Utah Team — US
- Virginia Team — US
- West Virginia Team — US
- Argentina Team
- Asia and Oceania LoCo Teams
- Australia Team
- Bangladesh Team
- Hong Kong Team
- Myanmar Team
- Philippine Team
- Singapore Team
- Europe, Middle East, and African (EMEA) LoCo Teams
- Albania Team
- Catalan Team
- Portugal Team
- Egypt Team
- Georgia Team
- Ireland Team — Ireland
- Kenyan Team — Kenya
- Kurdish Team — Kurdistan
- Lebanon Team
- Morocco Team
- Saudi Arabia Team
- Sudan Team
- Tunisia Team
- Other Forums & Teams
- LoCo Archive
- Afghanistan Team
- Alabama Team — US
- Alaska Team — US
- Algerian Team
- Andhra Pradesh Team — India
- Austria Team
- Bangalore Team
- Bolivia Team
- Cameroon Team
- Colorado Team — US
- Connecticut Team
- Costa Rica Team
- Delhi Team
- Ecuador Team
- El Salvador Team
- Florida Team — US
- Galician LoCo Team
- Greek team
- Hawaii Team — US
- Honduras Team
- Idaho Team — US
- Iowa Team — US
- Jordan Team
- Kansas Team — US
- Libya Team
- Louisiana Team — US
- Maryland Team — US
- Massachusetts Team
- Michigan Team — US
- Missouri Team — US
- Montana Team — US
- Namibia Team
- Nevada Team — US
- New Hampshire Team — US
- New Jersey Team — US
- Northeastern Team — US
- Panama Team
- Paraguay Team
- Qatar Team
- Quebec Team
- Rhode Island Team — US
- Senegal Team
- South Carolina Team — US
- South Dakota Team — US
- Switzerland Team
- Tamil Team — India
- Tennessee Team — US
- Trinidad & Tobago Team
- Uganda Team
- United Kingdom Team
- US LoCo Teams
- Venezuela Team
- Wales Team
- Washington DC Team — US
- Washington State Team — US
- Wisconsin Team
- Yemen Team
- Za Team — South Africa
- Zimbabwe Team
- Americas LoCo Teams
- Other OS Support and Projects
- Ubuntu Official Flavours Support
wxWidgets Discussion Forum
Dialog background color on Gnome (Ubuntu) Topic is solved
Do you have a typical platform dependent issue you’re battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Dialog background color on Gnome (Ubuntu)
Post by razoredge » Thu Jul 09, 2009 8:13 pm
On Windows XP I used the following code to get the background color of a dialog for a self drawn control:
wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE)
But on Gnome I get a color which is darker than the dialog background color. I tried a lot of the enums for GetColour(), but I can’t find one with the right color.
Which enum defines the dialog background color ?
Post by razoredge » Sun Jul 12, 2009 1:09 pm
From wxSystemSettings I get the color 230 / 224 / 218 (RGB) instead of 239 / 235 / 231 (RGB).
I am using Ubuntu 9.04. (I am new at Linux)
Auria Site Admin
Posts: 6695 Joined: Thu Sep 28, 2006 12:23 am Contact:
Post by Auria » Sun Jul 12, 2009 2:45 pm
Sorry, I don’t know; but asking the question differently : do you really need to know it? Can’t you just not draw on areas where you want to see the background?
Post by razoredge » Sun Jul 12, 2009 2:57 pm
Maybe I don’t understand your question right, but:
I have a self written control which is derived from wxWindow.
Inside the OnPaint handler I want to draw / clear the background of the control. Then I draw my own content .
(I use wxBufferedPaintDC inside OnPaint)
The background of the control should have the same color as the background of the wxPanel which contain the control.
And I don’t want to set the color of the self written control manually on fixed values.
Auria Site Admin
Posts: 6695 Joined: Thu Sep 28, 2006 12:23 am Contact:
Post by Auria » Sun Jul 12, 2009 5:01 pm
This code does no clear of the DC, it just renders over the existing background (I tried to make the text move, the previous render didn’t stay under). However I only tested this with wxMac, I can’t guarantee it work on wxGTK/others
Post by razoredge » Sun Jul 12, 2009 5:36 pm
I have found a reason / solution:
My control was derived from wxWindow.
If I use wxControl as base class the background color is the right one !
Is that behavior normal ?
Should I always use wxControl as base for «user widgets» ?
Auria Site Admin
Posts: 6695 Joined: Thu Sep 28, 2006 12:23 am Contact:
Post by Auria » Sun Jul 12, 2009 6:13 pm
I’d even recommend wxPanel; wxWindow is almost an abstract base class, it doesn’t do much on its own. It’s just a common interface to all subwidgets. Unless you know wx internals I wouldn’t recommend deriving from wxWindow
- About The Forum
- ↳ Forum Announcements
- ↳ General Forum Issues
- wxWidgets Programming Forums
- ↳ C++ Development
- ↳ Component Writing
- ↳ Compiler / Linking / IDE Related
- ↳ Platform Related Issues
- wxWidgets Specialized Forums
- ↳ wxDev-C++
- ↳ wx.NET
- ↳ The Code Dump
- ↳ wxCode
- General Forums
- ↳ General Development
- ↳ Announcements and Discoveries
- ↳ Open Discussion
- ↳ Database Related
- International Forums
- ↳ wxWidgets Development (French)
- ↳ wxWidgets Development (Chinese)
- ↳ wxWidgets Development (Russian)
Powered by phpBB® Forum Software © phpBB Limited