Kate - opening unwritable files in read-only mode.
Scott
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
fi
kate file
This will fail if you are unable to change permissions on the
file, such as when you don't own it.
--
Scott
Linux user #: 246504
___________________________________________________
This message is from the kde mailing list.
Account management: https://mail.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.
More information about the kde
mailing list