Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 322409 - dev-util/kdevelop-4.0.0: Editing .ini files is impossible
Summary: dev-util/kdevelop-4.0.0: Editing .ini files is impossible
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-01 21:21 UTC by lxg
Modified: 2021-01-06 06:46 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description lxg 2010-06-01 21:21:54 UTC
When I open a file with the .ini extension in kdevelop 4.0.0, I cannot enter any characters. When renaming the same file, and opening it again, I can edit without problems.

Reproducable on remote as well as on local files.

Reproducible: Always

Steps to Reproduce:
1. # echo "foo bar" > test.ini
2. open test.ini in kdevelop and try to edit the content
3. close the file 
4. # mv test.ini test.ini.txt
5. open test.ini.txt and edit the content
Comment 1 Maciej Mrozowski gentoo-dev 2010-06-05 20:10:59 UTC
Unable to reproduce.
Maybe the file you tried to open had inconsistent or unknown encoding.
Kate (KDE advanced text editor) part which is used in kdevelop expects files to be in encoding used in system, in most cases UTF-8.
When file encoding is unknown, it opens file in read-only mode, so that you don't accidentally break file encoding on file save.
You can manually select file encoding from kate part menu (Editor->Tools->Encoding) and disable read only mode (Editor->Tools->Read only mode).
Comment 2 lxg 2010-06-06 08:43:05 UTC
It is definitely not a charset issue.

1. In the steps to reproduce the problem, there is no charset relevant text. I can also create an empty file (touch foo.ini), the issue is still the same.

2. As I also wrote, as soon as I rename the file and open it again, I am suddenly able to edit the file.

By the way, the Editor and View menu items are empty when I'm editing a .ini file in kdevelop.
Comment 3 Maciej Mrozowski gentoo-dev 2010-06-29 05:47:37 UTC
No idea, works here.
Maybe if someone else encounters this issue, there will be some data to draw conclusions from.
Take a look at kdevelop console output. maybe you'll find some hints there. Also strace may help.
Comment 4 Jeremy Murphy 2010-12-26 03:17:00 UTC
Works here too, though I got a warning when I try to open an .ini file: 

  KDE could not find the editor for file 'foo.ini'.
  Do you want to open it as plain text?

So I altered the file association for *.ini files in the KDE System Settings and now they open without warning.  (I had some crusty association for *.ini files with Wine's notepad.)

Maybe you should check your file associations?
Comment 5 Theo Chatzimichos (RETIRED) archtester gentoo-dev Security 2011-01-13 01:24:06 UTC
it works here as well, kdevelop 4.1.1
I'll close as NEEDINFO, please reopen when you have some more helpful data (what Maciej asked) in order to try to reproduce
Comment 6 David Zaslavsky 2021-01-05 01:38:13 UTC
I'm actually having the same issue: Kdevelop opens all .ini files in readonly mode, or at least all that I've tested. This includes an empty file and pure-ASCII text content, and in every other respect the symptoms I'm seeing are the same as the original report.

Even though it's 10 years later, I think this has been an issue for as long as I can remember, so it could be the same underlying cause. I just discovered this bug report and it would be nice to get a solution on record here, or at least definitively establish that it's not Gentoo-related if that is the case.

emerge --info output follows:

$ emerge --info kdevelop
Portage 3.0.12 (python 3.8.6-final-0, default/linux/amd64/17.0/desktop/plasma, gcc-9.3.0, glibc-2.32-r6, 5.10.4-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.10.4-gentoo-x86_64-AMD_Ryzen_7_2700X_Eight-Core_Processor-with-glibc2.2.5
KiB Mem:    65890492 total,  43653608 free
KiB Swap:    8388604 total,   8388604 free
Timestamp of repository gentoo: Mon, 04 Jan 2021 02:00:01 +0000
Head commit of repository gentoo: 43f0ce2ce780ea7664d7ad03428cd71972a167fa
Timestamp of repository steam-overlay: Mon, 28 Dec 2020 10:27:44 +0000
Head commit of repository steam-overlay: 9adf6273bedb2dd25d80b943c70e640dbacb48dc

sh bash 5.1_p4
ld GNU ld (Gentoo 2.34 p6) 2.34.0
app-shells/bash:          5.1_p4::gentoo
dev-java/java-config:     2.3.1::gentoo
dev-lang/perl:            5.32.0-r1::gentoo
dev-lang/python:          2.7.18-r5::gentoo, 3.6.12-r1::gentoo, 3.7.9-r1::gentoo, 3.8.6::gentoo, 3.9.1::gentoo
dev-util/cmake:           3.19.2::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.7-r1::gentoo
sys-apps/openrc:          0.42.1::gentoo
sys-apps/sandbox:         2.20::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.16.3-r1::gentoo
sys-devel/binutils:       2.34-r2::gentoo, 2.35.1-r1::gentoo
sys-devel/gcc:            9.3.0-r2::gentoo, 10.2.0-r5::gentoo
sys-devel/gcc-config:     2.3.2-r1::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.10::gentoo (virtual/os-headers)
sys-libs/glibc:           2.32-r6::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-metamanifest: yes
    sync-rsync-extra-opts: 
    sync-rsync-verify-jobs: 1

acetylene09_local
    location: /usr/local/portage
    masters: gentoo

steam-overlay
    location: /var/db/repos/steam-overlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/steam-overlay.git
    masters: gentoo

crossdev
    location: /var/db/repos/localrepo-crossdev
    masters: gentoo
    priority: 10

Installed sets: @local-active
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--quiet --ask-enter-invalid --keep-going --verbose-conflicts"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirror.sjc02.svwh.net/gentoo/ https://mirrors.evowise.com/gentoo/ http://mirrors.evowise.com/gentoo/ https://mirror.sjc02.svwh.net/gentoo/ http://gentoo.mirrors.easynews.com/linux/gentoo/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j15"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp/portage"
USE="X a52 aac aacs acl acpi activities alsa amd64 bash-completion berkdb branding bzip2 cairo caps cdda cdr cjk cli crypt cups dbus declarative dri dts dvd dvdr editorconfig elogind emboss encode exif flac fortran gdbm gif git gpm gui iconv icu ipv6 jpeg kde kerberos kipi kwallet lcms libglvnd libnotify libtirpc lm_sensors mad mng mp3 mp4 mpeg multilib ncurses networkmanager nls nptl ogg opengl openmp opus pam pango pcre pdf phonon plasma png policykit ppds pulseaudio qalculate qml qt5 readline sdl seccomp semantic-desktop smp spell split-usr ssl startup-notification svg tcpd threads tiff truetype udev udisks unicode upower usb vlc vorbis widgets wxwidgets x264 xattr xcb xml xv xvid yubikey zlib" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sha sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev roccat_konextd" KERNEL="linux" L10N="en-US" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2 php7-3 php7-4" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_8" PYTHON_TARGETS="python3_7 python3_8" RUBY_TARGETS="ruby26 ruby27" USERLAND="GNU" VIDEO_CARDS="amdgpu radeonsi" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

dev-util/kdevelop-5.6.1::gentoo was built with the following:
USE="debug gdbui handbook plasma qmake -hex -reviewboard -subversion -test" ABI_X86="(64)"
FEATURES="userpriv assume-digests pid-sandbox config-protect-if-modified unknown-features-warn news protect-owned parallel-fetch xattr ipc-sandbox usersync sandbox distlocks multilib-strict userfetch merge-sync unmerge-orphans qa-unresolved-soname-deps binpkg-dostrip usersandbox strict network-sandbox preserve-libs binpkg-docompress ebuild-locks binpkg-logs sfperms fixlafiles unmerge-logs"
Comment 7 David Zaslavsky 2021-01-05 01:42:24 UTC
Whoops, I forgot, here is the complete console output from starting kdevelop, opening a .ini file, attempting to type some characters into it (unsuccessfully), and closing the program. None of this seems particularly useful to me, but maybe someone else can find something useful in it.

$ kdevelop -s '{eac37b41-1e87-4511-9052-f081334117ef}'
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
created new snippet repo "/home/diazona/.local/share/ktexteditor_snippets/data/Terrier.xml" SnippetRepository(0x5631f088a070)
Cyclic dependency detected between "file:///usr/lib64/qt5/qml/org/kde/kirigami.2/styles/org.kde.desktop.plasma/Units.qml" and "file:///usr/lib64/qt5/qml/org/kde/kirigami.2/styles/org.kde.desktop.plasma/Units.qml"
qrc:/qml/Develop.qml:139:21: QML Heading: Binding loop detected for property "font.pointSize"
qrc:/qml/area_code.qml:87:9: QML Heading: Binding loop detected for property "font.pointSize"
qrc:/qml/area_code.qml:63:9: QML Heading: Binding loop detected for property "font.pointSize"
qrc:/qml/storage.js:24: TypeError: Cannot call method 'openDatabaseSync' of undefined
qrc:/qml/storage.js:24: TypeError: Cannot call method 'openDatabaseSync' of undefined
kf.sonnet.core: No language dictionaries for the language: "en_US" trying to load en_US as default
kf.sonnet.core: No language dictionaries for the language: "en_US"
kf.sonnet.core: No language dictionaries for the language: "en_US" trying to load en_US as default
kf.sonnet.core: No language dictionaries for the language: "en_US"
kf.sonnet.core: No language dictionaries for the language: "en_US" trying to load en_US as default
kf.sonnet.core: No language dictionaries for the language: "en_US"
kf.sonnet.core: No language dictionaries for the language: "en_US" trying to load en_US as default
kf.sonnet.core: No language dictionaries for the language: "en_US"
QWidget::insertAction: Attempt to insert null action
QWidget::insertAction: Attempt to insert null action
kf.sonnet.core: No language dictionaries for the language: "en_US" trying to load en_US as default
kf.sonnet.core: No language dictionaries for the language: "en_US"
Comment 8 David Zaslavsky 2021-01-06 06:46:08 UTC
I had a lucky break and figured this out: on my system, .ini files were associated with the MIME type application/x-wine-extension-ini because of some old file associations left over from when I used to have wine installed. I suspect KDevelop was seeing the application/* type and opening the file read-only because of that.

I removed the wine file associations by following instructions at https://wiki.winehq.org/FAQ#How_do_I_clean_the_Open_With_List.3F, added the filename pattern *.ini to the text/plain MIME type in KDE's System Settings, removed the cache at .local/share/applications/mimeinfo.cache, and now KDevelop can open .ini files normally. All the necessary changes were made in my home directory, so I believe that proves there's nothing Gentoo-related about the issue as I experienced it.