I appear to be having a very common problem with KDE Plasma with Nvidia Graphics cards. after hibernation, the text on my folders is distorted beyond comprehension. \
I have found what i believe to be a solution. which is: \
Adding:
[QtQuickRendererSettings]
GraphicsResetNotifications=true
to ~/.config/plasmashellrc
problem is.... that directory seems to not exist on my system. or maybe i just cant find it? any and all help would be appreciated!
It might be named differently on you version of KDE or it might be controlled by something else in another file or in a different location.
2 potential ways around this are:
Simply run find ~/ -name plasmashellrc
If this doesn't display the file anywhere else then it may be controlled by something like YaST and have a file elsewhere.
create the file with just that entry in if it breaks the system simply delete the file again.
Related
I am trying to debug an application that is cross-compiled on a Windows host for a Linux target.
The problem:
Because the initial compilation is in windows the stored source file paths in the binary is of the form C:\Users\foo\project\.... On the Linux target I have put the source files under \home\foo\project\.... By default gdb does not find the source file because of the different path.
What I have tried so far:
Use "directory" command in gdb to give an exact path for the .c source file in the target Linux system where the app is being debugged. This works but unfortunately there are literally hundreds of files so this solution is unrealistic.
Use the set substitute-path C:\\Users\\foo\\project /home/foo/project command to have gdb substitute all prefixes. Note that the \\ seems necessary such that show substitute-path registers the right string. This unfortunately does not work. My guess is that the substitute-path command does not handle ms-dos style paths.
Tried separating the debug info out into a separate .debug file (see How to generate gcc debug symbol outside the build target?) and then using debugedit to change the paths with the command debugedit --base-dir=C:\Users\foo --dest-dir=/home/foo project.debug. Unfortunately this does not work either. debugedit seems to work fine if the existing path is all UNIX/Linux like but doesn't seem to work with ms-dos style paths.
I have looked around stackoverflow and while there are similar topics I can't find anything that will help me. Would really appreciate any suggestions/help. I realize that cross compiling from Windows is a very roundabout way but can't avoid that for the moment.
Thanks
Although it's rather old question, I did encountered the same problem. I managed to resolve it but using sed on binary executable... (yeah, a 'bit' hack-ish, but did not found another way). With sed I've managed to replace symbols paths right inside the executable, the trick is that new path's length should be the same as the old one.
sed -i "s#C:/srcpath#/srcpath/.#g" ./executable
Be sure to make new path the same length, otherwise the executable will brake.
I also have this same problem. Your option 1 isn't as bad as you think because you can script creating all the 'directory' commands with something like this python code:
def get_directory_paths():
return_array = list()
unix_path = os.path.join('my','unix','path')
for root, dirs, files in os.walk(unix_path):
for dir in dirs:
full_unix_path = os.path.join(root,dir)
escaped_unix_path = re.sub("\s", "\\\\ ", full_unix_path)
return_array.insert(0, "directory " + escaped_unix_path)
return '\n'.join(return_array)
The downside is that if you have two source files with the same name in different directories, I don't think gcc can pick the right one. That worries me, but in my particular situation, I think I'm safe.
For option 2 (which I suspect would fix the aliasing condition from #1), I think the problem is that the substitutions are not ending with a "file separator" according to the linux so they aren't applied:
To avoid unexpected substitution results, a rule is applied only if the from part of the directory name ends at a directory separator. For instance, a rule substituting /usr/source into /mnt/cross will be applied to /usr/source/foo-1.0 but not to /usr/sourceware/foo-2.0. And because the substitution is applied only at the beginning of the directory name, this rule will not be applied to /root/usr/source/baz.c either." (from https://sourceware.org/gdb/current/onlinedocs/gdb/Source-Path.html#index-set-substitute_002dpath )
I haven't tried anything like your #3 and I also considered something like #dragn suggestion, but in my situation the paths are not even close to the same length, so that will be an issue.
I think I'm stuck with #1 and a script, but if anyone has other suggestions, I'm interested options :-)
i'm using linux and i created a symbolic link in my directory from another file. now, i want to print the records shown in that file in alphabetical order. i tried to do lp and lpr [symbolic file name] within the directory it is located, but kept getting a error with something along the following:
The program 'lpr' can be found in the following packages:
any ideas for how to do this? i feel like this is basic, but i cant find anywhere how to do this even though i have been searching.
thanks for any insight.
You have to use yum or whatever software update/install program your system has - to install lpr.
You may already have cups, which does the same things lpr does. As #janos already mentioned links are not the problem, your system software does not match your expectations about what is there.
This question really belongs on superuser.com
I want gnuplot to load an initialization file on startup. According to the manual, in Windows systems, it is called GNUPLOT.INI. (It shouldn't matter if I call it gnuplot.ini, right? I tried both, though.)
According to answers like here: gnuplot configuration file
I'm supposed to put a file called gnuplot.ini in my HOME directory, and then everything should work. (Alternatively, see the manual at http://www.gnuplot.info/docs_4.6/gnuplot.pdf, page 38.)
1) What is a "HOME" directory in Windows? Where is it in Windows 7?
2) The manual mentions that I could change this default directory by changing the environment variable GNUPLOT. But it doesn't explain how to change environment variables in gnuplot, or even really what they are.
Basically, everyone refers me to the section in the manual, which I don't understand.
Furthermore, also from the manual: "When gnuplot is run, it first looks for a system-wide initialization file named gnuplotrc. The location of this file is determined when the program is built and is reported by show loadpath."
If I run "show loadpath" in gnuplot, it says:
"loadpath from GNUPLOT_LIB is "C:\Program Files (x86)\gnuplot\demo"
gnuplotrc is read from share"
1) There is no file called gnuplotrc in that folder.
2) No file ending is specified. Does the manual refer to x.gnuplotrc or gnuplotrc.x or something else?
3) Also, what does "read from share" mean?
I appreciate your help.
I finally managed to solve the problem above. Maybe this solution can help someone else. So:
1) The HOME directory of your OS can be found here: http://en.wikipedia.org/wiki/Home_directory.
2) Even after putting a file called gnuplot.ini into my HOME directory, gnuplot didn't consistently initialize with it. In fact, it only did it once, and I still don't know why.
3) The cryptic message "gnuplotrc is read from share" actually means that gnuplot searches for the initialization file "gnuplotrc" (without file ending) in the folder (install directory of gnuplot) \ share .
4) Placing the file called "gnuplotrc" into the folder (install directory of gnuplot) \share\ finally worked. Now gnuplot initializes from this file every time I restart gnuplot.
An update:
Other non-Linux users may be as unaware of what the "home directory" of an OS is as myself. Wikipedia finally gave me the answer here: http://en.wikipedia.org/wiki/Home_directory
So the Home directory in Windows 7 was (root) \Users\ (username).
Then I placed my gnuplot.ini in that folder, and when I started wgnuplot.exe and typed "plot sin(x)", it finally had the settings I wanted.
I thought I had finally solved my problem. I closed gnuplot. Then I changed a line in gnuplot.ini, saved it, and afterwards started gnuplot again. gnuplot was wholly unaffected by my change in gnuplot.ini. (I verified this with the option "show all".)
So as far as I can tell, I managed to correctly initialize gnuplot ONCE, but it doesn't properly intialize via gnuplot.ini every time?! What gives?
On windows, add the following line at the end of gnuplotrc:
load "C:\\Users\\username\\GNUPLOT.INI"
(replacing "username" with your user name, and with doubled backslashes !)
then you can put your GNUPLOT.INI file in your home directory
I'm working on an application primary targeted for Linux, which use a TTF font. I need the font's file name and path, because I have to load it with SDL function TTF_OpenFont(char *file, ...). The problem is that there are a lot of different directories for TTF fonts on different distribution. Which is the best way to deal with this problem? I've came up some solutution, but each of them seems suboptimal for me:
pack the font along with the application, and install it to the application's own /usr/share/ directory.
check the font path with fc-list : file.
hardcode every path variation to the application and try them out when load the file.
Your first and second solutions are quite good, except it may be better to call FcFontList function. Third one is quite unreliable, but it highly depends on application type (it can be ok in some cases, if you have this path configurable by user).
It looks like this:
I'm not sure but I think it started to happen when I reinstalled LAMP (Ubuntu).
All the files used to look like the ones below (no bold and no asterisk).
Any suggestions?
NERDTree uses the asterisk to indicate an item is executable, I believe. At least for me, it shows up on all my .bat and .exe files.
That looks like NERDTree. Maybe there is a NERDTree setting regarding it.
Suggestions:
See if the permissions or settings (do they have chmod +x) are different on the files that show an asterisk versus the ones that do not. Have you noticed a pattern between which files are bold and asterisk'd?