Qt program ignores KDE theme and qtconfig theme - qt

When I run my Qt5 program as a superuser, the program completely ignores any system fonts, themes and icons and uses some bogus theme. See screenshot.
HOW to fix this programmatically or in any way possible??
It also ignores any KDE configs/qtconfig. This is driving me nuts.
Right is run as normal user, left is run as superuser.

Your config is being saved in your user's home. If you open app as root, it is working with root's settings. Easiest way to fix this would be graphical root login, than change settings to what you want and switch back to regular user. Root graphical login is disabled in most distros but you can still do it by using second terminal.
Press Alt+Ctrl+F2 to open a second terminal.
Login as root (password won't appear).
Type startx and press Enter, the GUI should start automatically.
Go for settings, set whatever theme you want, then log out.
Press Alt+Ctrl+F1 to go back to first terminal.
Everything should look nice from now on.

Related

user not able to launch firefox from unix- X11 error

Using MobaXTerm on RedHat, I am able to launch Firefox from my user profile and access browser GUI. However if I sudo to root and try to launch firefox I get an error:
X11 connection rejected because of wrong authentication.
I want to access CUPS in the browser with root access so that I can administer printers from GUI (not trying to browse as root!). I am aware that all of the administration can be done from command line, but sometimes the GUI is just easier.
How can I resolve this error so that I may launch firefox as root?
Under my user profile where firefox is working, run:
xauth list
The output will be something like:
servername/unix:11 MIT-MAGIC-COOKIE-1 256d99dc3f0f7acdf90190a2710d7042
servername/unix:11 MIT-MAGIC-COOKIE-2 61f888d3342b65f4f05f02fcb708f3d8
servername/unix:11 MIT-MAGIC-COOKIE-3 656d49dc3f0f7acdf96190a2710d7042
Copy the list of these entries.
Then sudo to root and run xauth list again. You will find a different list of cookies.
To repair the trouble, add each of the cookie under my user profile to root's profile via xauth add command:
xauth add servername/unix:11 MIT-MAGIC-COOKIE-1 256d99dc3f0f7acdf90190a2710d7042
As far as I know each cookie needs to be added one at a time, but someone jump in if they know of a bulk method.
After adding the cookies to root profile, Firefox can be launched from root.
Thanks to Byron for the help on this.

Finding the file path (server directory) from using Firebug

I am a super beginner and am learning as I go, so please be patient with me!
So here goes:
I am trying to make some edits on a Magento theme (removing buttons - Twitter, to be exact) and am using FireBug (Firefox Add-On) to locate the directory to remove the button.
Firebug will allow me to find the CSS directory in order to change certain things but does not show the file to make edits in to remove the button. From other similar questions, I have gathered that it is not possible to find server directory paths from apps like Firebug (or is it?); however, is there any advice or easier method to go about finding the location of the button?
Any information helps, thanks in advance.
Indeed, you cannot use firebug to find in which file that button is inserted. You have to go to magento admin, system- > configuration -> developer. Select your website in view top left. then in template path hints select yes. Now go into frontend and refresh. You will see a lot of red lines with the path to the folders where everything is. Do not do this in production as it is a negative experience for customers.
try saving the file locally by doing ctrl + s. That may give you the css file to make changes.
Check this step by step instruction:
Step 1: System >> Configuration >> Developer
your current configuration scope is set to “Default Config.” You cannot setup Magento Template Path Hints globally. You’ll need to set the Configuration Scope to a website or store configuration. When you do, you’ll see a screen like this:
Change Template Path Hints no to yes and save the configuration. Reload your front page.
For more info

How does one setup default programs for users on terminal servers using a login script.

Right now I have the default programs setup correctly but occasionally I am seeing users some how changing the defaults even though they do not have permissions. I can see they changed them by looking at their profile. My guess is they are opening a file and getting hit with the windows prompt to chose a default. To get around this I am thinking of setting the default programs in the log in script to ensure they are set. Any help is appreciated. I should point out that most of my users are using PNG, JPG, DOCX, and the rest of the normal image and document file types. I am currently using FoxIt, Irfanview, Wordpad, ect.

How to test changes to atom language grammars.

I'm looking to modify a language grammar in atom. However I'm not sure how to reload the grammar in order to test my changes. Do I need to quit and restart each time?
The grammar-live-reload was made for that purpose, so it's probably the most convenient way.
Reload automatically editors when grammars files (.cson) changes [...] Only editors that are affected by the selected language are reload[ed].
Otherwise, you can open the command-palette and run Window: Reload (this will also show its shortcut). You can do the same in from the developer tools' command-palette by running Reload Page or Hard Reload Page.

Can I make the download dialog box appear without "save" option?

I have a hyperlink to an executable like so: Run Now
I'm trying to make the download dialog box appear without the save function as it is to only run only on the user's computer.
Is there any way to manipulate the file download dialog box?
FYI: Running on Windows Server '03' - IIS.
Please no suggestions for a WCF program.
Okay I found it for anyone stumbling upon this conundrum in the future.
Add the following tag to your head section: <meta name="DownloadOptions" content="nosave" /> and the file download dialog box will not display the "save" option.
For the user to not open/run but save replace "nosave" with "noopen"
Not unless you have some control over a user's machine. If your application can run on limited resources, you might want to consider doing it in Silverlight.
IMO, having a website launching an executable is a pretty bad idea.... even worst if that website is open to the general public (not on intranet). I don't know what that app is doing but it sure is NOT, 1) cross browser, 2) cross platform, and 3) safe for your users.
If you are on intranet, you might get away with giving the full server path (on a shared drive) to the executable and change security settings on your in-house machines.
Other than that, you won't succeed in a open environment such as the Internet.
From your comments, if the user downloading the file is the issue, then there's no way to get around it, as they have to download the file in order to be able to run it.
There's any number of ways to get around whatever you could manage in browser, from proxies like Fiddler intercepting the data, or lower level things like packet sniffing. Or even simply going into the browser's temp/cache folder and copying the file out once it's running.
You could probably get around most laymen by having a program that they can download that registers a file extension with Windows. Then the file downloaded from this site would have the URL of the actual data obfuscated somehow (crypto/encoding/ROT-13/etc). The app would then go and grab the file. The initial program could even have whatever functionality provided by what you want to download, but it needs the downloaded key.
But this is moving into the area of DRM and security by obscurity. If an attacker wants your file, and it's on the Internet, they will get the file.

Resources