506 reputation
710
bio website
location Czech Republic
age
visits member for 2 years, 6 months
seen 7 hours ago

Dec
12
awarded  Announcer
Dec
9
comment Sudoers file, enable NOPASSWD for user, all commands
@DanielAlder: The specification line from the question nicholsonjf ALL=NOPASSWD: ALL is correct. It was just at a wrong place as I explained in the answer. ------ The Runas specification — in your case (ALL) — is optional. If you omit the specification you can run the commands as root and you cannot use -u and -g options of sudo.
Dec
9
revised Sudoers file, enable NOPASSWD for user, all commands
explicitly answer what happened at the begining
Dec
1
comment Delete all files apart from pdf files in a directory
I understand that you meant the solution as an "interactive" process with multiple manual iterations but the checks will be hardly usable for long lists of files and the problems mentioned above could bring easy to overlook mistakes.
Dec
1
comment Delete all files apart from pdf files in a directory
I noticed three problems here: a) It will exclude any file containing pdf anywhere in its name. --- b) It will delete PDF files if any of the letter in the suffix are upper case. --- c) It is not a good idea to use output of ls. It will not work with file names containing newlines. Some implementations of ls replace special characters e.g. tab by ?. --- It is better to use: find -maxdepth 1 -print0. (not so short as ls :) ----- To resolve a) and b) use grep -vi '\.pdf$' --- complete (but GNU only) solution: find -maxdepth 1 -print0 | grep -viz '\.pdf$' | xargs -0 rm
Nov
29
accepted GNOME Image Viewer opens its window 2 pixels shorter and distorts the image by resampling
Nov
29
comment GNOME Image Viewer opens its window 2 pixels shorter and distorts the image by resampling
Thank you! --- I totally forgot about the second name of the application. I am tired of that. In the about pop-up I see: "The GNOME image viewer", no mention of "Eye of GNOME". --- I have found other bug reports of the same problem (or a problem with the same symptoms). I will add more information later. --- It is not considered to be a good habit to ask for accepting an answer. I normally accept answers few days later and you can see that I accept answers. :)
Nov
28
awarded  Civic Duty
Nov
27
asked GNOME Image Viewer opens its window 2 pixels shorter and distorts the image by resampling
Nov
1
comment How to run an alias in a shell script?
In the point 2 you do not set an alias but a variable.
Oct
30
comment folder inside the same folder error
Without write access you cannot delete or modify the problematic directory. ------ Could you please send ls -ld of it?
Oct
14
comment “Could not open moddep file '/lib/modules/3.XX-generic/modules.dep.bin'” when mounting using a loop
I had the same problem after the battery in my notebook failed during boot. mo‌​dules.dep.bin was empty. (computer shut off probably right during rebuild or something?) The mentioned reinstall solved the problem. Thanks! After further study I think it would probably suffice to run depmod to regenerate the file.
Oct
7
comment Why wouldn't `which` command work for `cd`? Can't find the executable `cd` too!
Ok, you are right. Sorry, I did not follow the link to the cd documentation‌​.
Oct
7
comment Why wouldn't `which` command work for `cd`? Can't find the executable `cd` too!
The linked description from the POSIX specification does not explicitly say that cd must be as shell built-in ... but based on how process properties and their transfer work in UNIX cd as a shell built-in is the only straightforward implementation. See the reply of Volker Siegel.
Sep
4
comment How to select (& copy) only a part (in the middle) of a linked text?
For me Alt + AltGr + drag works too.
Jul
29
revised What are Unity's keyboard and mouse shortcuts?
Alt+mouse click shortcuts inside a window
Jul
19
comment cannot start graphical programs with sudo
This problem appeared when I partially renamed an Ubuntu 14.04 machine: I only edited /etc/hosts and run hostname thenewname. After editing /etc/hostname and rebooting everything started to work correctly again.
Jul
2
comment Is it possible to make writing to .bash_history immediate?
@artfulrobot: This command is a bash built-in so it is described in man bash. You can also use help history.
Jun
29
comment apt-get: No space left on device (12.04)
Please consider participating on the bug reports with low activity: Bug #1089195 linux-headers will eat your inodes on LTS., Bug #690911 Installation without formatting fails to remove old kernels
Jun
29
comment apt-get: No space left on device (12.04)
I had the same problem caused by kernel updates which do not remove old kernels automatically. Linux headers of every kernel update occupy a considerable number of inodes! --- My "safe" solution was to move two kernel headers directories to a different filesystem: cd /usr/src ; cp -a linux-headers-3.2.0-3{2,3}* /home/tmp-hdr ; rm -r linux-headers-3.2.0-3{2,3}*, apt-get-install -f, remove some other headers the right way: apt-get purge linux-headers-..., move the headers from the tmp back: cd /usr/src ; cp -a /home/tmp-hdr/* .. Remove more of the old kernels using apt-get purge.