Kate - opening unwritable files in read-only mode.
scotbicknel at cox.net
Mon Apr 14 22:47:02 BST 2008
On Monday 14 April 2008 1:07:41 pm RW wrote:
> Is it possible to have Kate automatically open files in
> read-only mode when I don't have write permission on them?
Since the permissions set on the file will determine what kate
(as you) can do with the file, trying to save changes to it will
cause an error.
> Alternately is it possible to select read-only mode from the
> command line?
This question is partly answered with kate --help at the shell.
You could use a shell script to change permissions on the file
before opening it:
if [[ -w file ]]; then
chmod -w file
This will fail if you are unable to change permissions on the
file, such as when you don't own it.
Linux user #: 246504
This message is from the kde mailing list.
Account management: https://mail.kde.org/mailman/listinfo/kde.
More info: http://www.kde.org/faq.html.
More information about the kde