[Solved] vim, indent and hash

I know this isn't strictly a programming problem, but bear with me...
To make a long story short, I have a Perl file in which some comment lines start with the hash(#) as the first character of the line, i.e. before the # there's nothing, not even spaces. The problem is that trying to indent this line with == does not work. Now, with my current vim setup, when *insert* a new line that starts with an #, indentation is done properly. Also, if there is space before the #, but the indentation is wrong, == correctly indents it. The problem is when the # is the very first character of the line, and (it goes without saying) the indentation is wrong, == does nothing.
I've googled and read all about disabling smartindent, cindent, and whatnot, and nothing seems to work. I'm really grasping at the straws with this one, so all ideas are welcome...
Last edited by gauthma (2010-10-26 16:22:11)

For future reference of whomever might encouter this problem... the file /usr/share/vim/vim73/indent/perl.vim has, in line 55 and following, the, erm, following:
" Don't reindent coments on first column
if cline =~ '^#.'
return 0
endif
Commenting those out solved the problem. Of course I now wonder why would those lines be there in the first place, but I digress...

Similar Messages

  • [solved] Vim: console and urxvt have different colors

    Well, as you can see, vim in console (vc/1) and in urxvt has different colors:
    I'd like to have the same colors of console in urxvt (and not the opposite), is there a way?
    I don't know from where the colors of urxvt come from. That blue with which is written '#include' and that green/cyan with which is written 'int' aren't even in my .Xdefaults.
    TIA
    Last edited by andre.ramaciotti (2009-03-08 12:17:16)

    andre.ramaciotti wrote:Is there a way to trick vim so it thinks that urxvt is only 16-colours capable? A $parameter or an option I can set in .vimrc?
    set t_Co=16

  • SOLVED Vim indent (Groovy)

    Hi people!
    I try to use this script http://www.vim.org/scripts/script.php?script_id=2961 . I copy this file in /usr/share/vim/vim73/indent
    but I have this error when open a file *.groovy
    Error detected while processing /usr/share/vim/vim73/indent/groovy.vim:
    line    5:
    E492: Not an editor command: ^M
    line    7:
    E15: Invalid expression: exists("b:did_indent")^M
    line  164:
    E171: Missing :endif
    Press ENTER or type command to continue
    The script looks ok. I can't figure out what's going on.
    Thanks in advance.
    Last edited by Horris (2010-09-30 02:08:59)

    '^M' are end-of-line marks for dos - remove them: http://www.tech-recipes.com/rx/150/remo … nes-in-vi/
    Last edited by karol (2010-09-30 02:02:04)

  • [Solved][VIM] E484: Can't open file syntax.vim

    Hi all,
    I've installed Archlinux few days ago on my netbook and yesterday i decided to configure Vim using plugins.
    During plugins configuration, i messed up and i decided to revome all Vim files in my ~ folder in order to restart configuration.
    However, since I've executed the `rm -R .vim .vimrc .viminfo` command, I can't re-activate Vim's syntax coloration using `syntax on` into my .vimrc file nor into Vim directly.
    Here is the error message when I start Vim :
    Error detected while processing /home/romain/.vimrc:
    line 1:
    E484: Can't open file /home/romain/.vim/syntax/syntax.vim
    Press ENTER or type command to continue
    I've found this topic on BBS which seems to be the same problem as me but reinstalling vim or vi doesn't solve this problem.
    I've tried to copy this syntax.vim file from /usr/share/vim/vim73/syntax/syntax.vim but it doesn't solve the problem and I want a clean solution without hacking my ~ folder ; moreover, this bug also appears being root while I haven't configured vim with the root account so it may be a problem into Vim's installation folders or something.
    Thanks for your help and sorry I my english contains mistakes,
    MicroJoe.
    Last edited by MicroJoe (2012-06-14 16:16:45)

    This is the output :
    VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Jun 7 2012 00:41:40)
    Rustines incluses : 1-547
    Compilé par ArchLinux
    Grosse version sans interface graphique.
    Fonctionnalités incluses (+) ou non (-) :
    +arabic +autocmd -balloon_eval -browse ++builtin_terms +byte_offset +cindent
    -clientserver -clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments
    +conceal +cryptv +cscope +cursorbind +cursorshape +dialog_con +diff +digraphs
    -dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path
    +find_in_path +float +folding -footer +fork() +gettext -hangul_input +iconv
    +insert_expand +jumplist +keymap +langmap +libcall +linebreak +lispindent
    +listcmds +localmap -lua +menu +mksession +modify_fname +mouse -mouseshape
    +mouse_dec +mouse_gpm -mouse_jsbterm +mouse_netterm -mouse_sysmouse
    +mouse_xterm +mouse_urxvt +multi_byte +multi_lang -mzscheme -netbeans_intg
    +path_extra +perl +persistent_undo +postscript +printer -profile -python
    -python3 +quickfix +reltime +rightleft -ruby +scrollbind +signs +smartindent
    -sniff +startuptime +statusline -sun_workshop +syntax +tag_binary
    +tag_old_static -tag_any_white -tcl +terminfo +termresponse +textobjects +title
    -toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo
    +vreplace +wildignore +wildmenu +windows +writebackup -X11 -xfontset -xim -xsmp
    -xterm_clipboard -xterm_save
    fichier vimrc système : "/etc/vimrc"
    fichier vimrc utilisateur : "$HOME/.vimrc"
    fichier exrc utilisateur : "$HOME/.exrc"
    $VIM par défaut : "/usr/share/vim"
    Compilation : gcc -c -I. -Iproto -DHAVE_CONFIG_H -I/usr/local/include -march=i686 -mtune=generic -pipe -fstack-protector --param=ssp-buffer-size=4 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
    Édition de liens : gcc -Wl,-E -Wl,-rpath,/usr/lib/perl5/core_perl/CORE -Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu -L/usr/local/lib -Wl,--as-needed -o vim -lm -lncurses -lacl -lattr -lgpm -ldl -Wl,-E -Wl,-rpath,/usr/lib/perl5/core_perl/CORE -Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu -fstack-protector -L/usr/local/lib -L/usr/lib/perl5/core_perl/CORE -lperl -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
    (I've noticed that some part were in French but I hope that it'll not be a problem).

  • [solved] vim ftplugin vim-latexsuite doesn't load changes with chars

    Hello!
    I'd like to use some european characters and I found this thread.
    Unfortunately I still get "/mathbf{}" when I type the ã. (My problem is the ö but I think if I manage to have the ã it will work with ö...)
    The second problem is that I have to press escape twice to go to normal mode in a .tex file.
    (In the other files one press is enough.)
    All these troubles happen only on my x86_64 desktop.
    I have vim-latexsuit-svn 1106-1 on both laptop and desktop from the AUR.
    On my i686 laptop everything works fine with the 'default' .vimrc advised in the vim-latexsuite-manual.
    There is also a different mapleader for compiling by default. (Which is not as annoying as the ö problem.)
    I also get the ö-trouble when I log in from the laptop to my desktop.
    Why are there so much differences?
    I only remember having put some "set winaltkeys=no" in the wrong files on my laptop before I understood where is the right place.
    (Where everything works fine.)
    Here's my .vimrc
    1 set tabstop=2
    2 set number
    3
    4 syntax on
    5 filetype plugin on
    6 filetype indent on
    7 set grepprg=grep\ -nH\ $*
    8 let g:tex_flavor = "latex"
    9 set runtimepath=~/.vim,/usr/share/vim/vimfiles,/usr/share/vim/vim72,/usr/share/vim/vimfiles/after,~/.vim/after
    10 "To solve the propleme with vim-latexsuite has with ã and â
    11 imap <buffer> <silent> <M-C> <Plug>Tex_MathCal
    12 imap <buffer> <silent> <M-B> <Plug>Tex_MathBF
    13 imap <buffer> <leader>it <Plug>Tex_InsertItemOnThisLine
    14 imap <buffer> <silent> <M-A> <Plug>Tex_InsertItem
    15 "imap <buffer> <silent> <M-E> <Plug>Tex_InsertItem
    16 "imap <buffer> <silent> <M-e> <Plug>Tex_InsertItemOnThisLine
    17 imap <buffer> <silent> <Plug>Traditional <Plug>Traditional
    18 map <buffer> <silent> é é
    19 map <buffer> <silent> á á
    20 map <buffer> <silent> ã ã
    21 "imap ã <Plug>Tex_MathCal
    22 "imap é <Plug>Traditional
    ~/.vim/ftplugin/tex.vim
    1 set winaltkeys=no
    2
    3 let g:Tex_AdvancedMath = 0
    4 let g:Tex_SmartKeyQuote = 0
    5 let g:Tex_SmartKeyQuote = 0
    6
    7 imap <C-b> <Plug>Tex_MathBF
    8 imap <C-c> <Plug>Tex_MathCal
    9 imap <C-l> <Plug>Tex_LeftRight
    ~/.vim/after/ftplugin/tex.vim
    (The macros of call IMAP work well. When I type `ö I also get a \mathbf)
    1 call IMAP('`w', '\omega', 'tex')
    2 call IMAP('`j', '\cdot', 'tex')
    3 call IMAP('`A', '\forall', 'tex')
    4 call IMAP('`E', '\exists', 'tex')
    5 call IMAP('`ö', 'ö', 'tex')
    6
    7 let g:Tex_AdvancedMath = 0
    8 imap <C-b> <Plug>Tex_MathBF
    9 imap <C-c> <Plug>Tex_MathCal
    10 imap <C-l> <Plug>Tex_LeftRight
    runtimepath:
    runtimepath=~/.vim,/usr/share/vim/vimfiles,/usr/share/vim/vim72,/usr/share/vim/vimfiles/after,~/.vim/after
    Last edited by Maximalminimalist (2010-05-30 17:00:03)

    I just removed vim, vim-auctex (didn't remember there was this...) and vim-latexsuite and reinstalled vim and vim-latexsuite.
    I was obviously using a vim-auctex macro and I didn't know it... (This was a memorable lesson for removing packages you don't need. )
    I realized that the Esc-issue happens if a placeholder is still active. Is it possible to change this behaviour? (I won't really care about that. => [solved])
    Last edited by Maximalminimalist (2010-05-30 16:59:32)

  • [self-SOLVED]vim + lilypond syntax highlighting

    I'm trying to get vim to use syntax highlighting in lilypond files. Apparently lilypond comes with the necessary files, but I have not been able to make vim find them (?). I am not very experienced with vi(m), so there might be something wrong with my setup.
    I have, of course, both vim and lilypond installed. The files for lilypond syntax highlighting are in subdirectories of /usr/share/lilypond/2.12.3/vim/. Vim syntax highlighting works for other files, such as C++, HTML, etc., so no problem there. My ~/.vimrc file contains
    set runtimepath+=/usr/share/lilypond/2.12.3/vim/
    as per instruction given in http://lilypond.org/doc/v2.12/Documenta … m/Vim-mode (and the path is correctly modified). But when I open a lilypond file (with the correct .ly suffix) all I get is black and white. What's the problem?
    [EDIT: Oh heck, nevermind! Apparently I was getting too tired to read instructions properly. Was missing the ~/.vim/filetype.vim file described in the above link.]
    Last edited by lotuskip (2010-04-12 18:33:42)

    You're right about it being overridden.  This change should be able to be placed in ~/.vimrc though.
    Well  that was foolish - I should have read the comments right below in that file.  It says exactly how to set it in vimrc.  I've now added the following to my ~/.vimrc and this is completely solved without modifying the /usr/... file.
    let g:tex_flavor = "tex"
    Last edited by Trilby (2013-03-29 16:11:26)

  • [Solved] Vim ignoring modelines

    This line is at the end of a load of my bash scripts, but none of the settings are getting applied (for the several files I've tried).
    It's the last line in my file.
    # vim:set ts=4 sw=4 ft=sh et:
    I've got no modeline setting in my vimrc, so no idea why it's being ignored unless there's one. I've read though the vim help and have done a quick internet search, but can't find anything obvious.
    Any ideas?
    Last edited by skanky (2012-07-11 09:32:43)

    JackH79 wrote:
    I think the expandoption shouldn't have a colon. What happens if you try:
    # vim: ts=4 sw=4 ft=sh et
    That doesn't change behaviour, and  I think it goes against what the help says.
    However, it looks like the issue is elsewhere, as looking at the settings, the modeline isn't getting ignored, it's the behaviour isn't as I expect from those settings. This could be user error, but whatever it is, it isn't modelines getting ignored. So I'll mark this as solved and look into the behaviour issue.
    Many thanks for your replies.

  • [SOLVED] vim: newlines when pasting block selection

    Hi there!
    When pasting a block selection im Vim, the pasted lines are added to the existing lines. That definitely has it's uses, but usually I'd like to paste the lines onto blank lines. For this, I first have to generate a buch of empty lines, and only then can I paste the block. Is there a way to automatically generate new lines when pasting blocks?
    Here's a small example in Fortran. I'd like to get the list of REALs by block-selecting the variables and copying them between the REAL and the INTEGER block.
    REAL :: &
    real1 (2,2) , &
    real2 (5,2) , &
    real3 (1,2)
    INTEGER :: &
    int1 ,&
    int2
    If I just block-select it and paste it onto the line between the REAL and INTEGER blocks, I end up with this:
    REAL :: &
    real1 (2,2) , &
    real2 (5,2) , &
    real3 (1,2)
    real1
    real2INTEGER :: &
    real3 int1 ,&
    int2
    What I'd like to end up with, though, is this:
    REAL :: &
    real1 (2,2) , &
    real2 (5,2) , &
    real3 (1,2)
    real1
    real2
    real3
    INTEGER :: &
    int1 ,&
    int2
    Without manually inserting blank lines, that is!
    PS: I'm not really sure whether that's the correct subforum, but as the questions mostly addresses Programmers/Coders, I guess it should be fine here.
    Last edited by cryptkeeper (2013-11-07 08:16:32)

    karol wrote:http://vim.wikia.com/wiki/Unconditional … wise_paste
    '\cp' seems to do what you want.
    I haven't tried it yet, but it looks exactly what I need! What I do after pasting the selected block is often joining the lines to a single line with the variables delimited by commas or \\|| (for further use in vim regexes), and it looks like this plugin can do exactly this.
    Thanks! I'll mark it SOLVED then (and hope I'll get around to actually try it soon enough).
    Trilby wrote:Karol's answer seems like a more direct solution, but I'd personally go with a combination of simpler commands like "3yy3jPw Ctrl-v 3j$d"
    The problem with this is that you know the exact number of lines, i.e. 3 in this case, which is usually not the case in the code I work with as the variable lists are much longer.
    But what I've become accustomed to in the meantime is memorizing the number of lines that vim shows when I yank the block and inserting that number of new lines before pasting, e.g. for a 24 line block
    24o<ESC>j
    24k
    p
    I doubt that using 24o<ESC>j is the best way to insert the 24 blank lines, but it works well enough.

  • [Solved] Vim breaks TTY output

    Everything works fine in my TTY until I use vim, then all further input is unreadable gibberish until next boot.  I have tested other commands and applications (pstree, canto, iptraf).  None of these cause any problems.  Only vim.
    This is the output from ":language" in vim:
    Current language:
    "LC_CTYPE=en_US.UTF-8;
    LC_NUMERIC=C;
    LC_TIME=en_US.UTF-8;
    LC_COLLATE=C;
    LC_MONETARY=en_US.UTF-8;
    LC_MESSAGES=en_US.UTF-8;
    LC_PAPER=en_US.UTF-8;
    LC_NAME=en_US.UTF-8;
    LC_ADDRESS=en_US.UTF-8;
    LC_TELEPHONE=en_US.UTF8;LC_MEASUREMENT=en_US.UTF-8;
    LC_IDENTIFICATION=en_US.UTF-8"
    locale:
    LANG=en_US.UTF-8
    LC_CTYPE="en_US.UTF-8"
    LC_NUMERIC="en_US.UTF-8"
    LC_TIME="en_US.UTF-8"
    LC_COLLATE=C
    LC_MONETARY="en_US.UTF-8"
    LC_MESSAGES="en_US.UTF-8"
    LC_PAPER="en_US.UTF-8"
    LC_NAME="en_US.UTF-8"
    LC_ADDRESS="en_US.UTF-8"
    LC_TELEPHONE="en_US.UTF-8"
    LC_MEASUREMENT="en_US.UTF-8"
    LC_IDENTIFICATION="en_US.UTF-8"
    LC_ALL=
    locale -a
    C
    POSIX
    en_US
    en_US.iso88591
    en_US.utf8
    Last edited by the sad clown (2013-02-04 13:24:21)

    I don't have a complex .vimrc:
    " All system-wide defaults are set in $VIMRUNTIME/archlinux.vim (usually just
    " /usr/share/vim/vimfiles/archlinux.vim) and sourced by the call to :runtime
    " you can find below. If you wish to change any of those settings, you should
    " do it in this file (/etc/vimrc), since archlinux.vim will be overwritten
    " everytime an upgrade of the vim packages is performed. It is recommended to
    " make changes after sourcing archlinux.vim since it alters the value of the
    " 'compatible' option.
    " This line should not be removed as it ensures that various options are
    " properly set to work with the Vim-related packages.
    runtime! archlinux.vim
    " If you prefer the old-style vim functionalty, add 'runtime! vimrc_example.vim'
    " Or better yet, read /usr/share/vim/vim73/vimrc_example.vim or the vim manual
    " and configure vim to your own liking!
    filetype plugin indent on
    syntax on

  • I have a annual plan, it supposed must be used in two terminals, but i haven´t been able to install any app in a second computer, it always says that the app is only available as a trial download. What can I do to solve this issue, and be able to use my p

    I have a annual plan, it supposed must be used in two terminals, but i haven´t been able to install any app in a second computer, it always says that the app is only available as a trial download. What can I do to solve this issue, and be able to use my paid plan in two computers?

    Hi Susan,
    Please refer to the help document to fix this issue:
    Creative Cloud applications unexpectedly revert to trial mode | CS6, CCM
    You may also refer to the thread as below:
    creative cloud software says my free trial has expired, but I have a paid subscription
    Regards,
    Sheena

  • How to achieve Indenting and Issuing of raw materials in Oracle 11i

    Hi
    We have an issue with indenting and issuing of raw materials between stores and shop floor.
    Business Process is:
    1) Shop Floor should send a requisition of raw material to stores department i.e., (Indenting) with authorization of Production Manager.
    2) Then based on the requisition, stores needs to issue the raw material to Shop floor with Stores Manager authorization in report format.
    Work around:
    we have created Flexi Fields (DFF) in the Batches window under context value,
    through which we can indent quantity of that item datewise required.
    But the trouble is, it is time consuming and data entry is more.
    Also we have RM Pick List report, which is not useful for us for this process.
    Can any one please give me any idea how to do this process with minimal data entry in optimal time without new customization.
    Thanks in advance for your valuable ideas
    Prem.

    Hi Gordon,
    My SBO version is 8.8 PL 10, Indian Database. I want to see the "Raw Material" G/L Account's opening balance in the Opening Balance Column of Trial Balance or similar report of SBO. The technical problem behind this is - the mentioned reports shows the the amounts in OB column if that amount is entered by the OB Transactions (in Administration -> System Initialization). But how to manage the Raw Material / Inventory G/L through this concept, as the OB amount for this is entered through Inventory Initial Quantity. We can do the entry one day before the expected starting date of the financial period, is that can be a standard practice? For. e.g. entering the opening balance for 1-1-06 on 31-12-05.

  • Problem with solver DLL load and Excel 2010

    Since upgrading from Office 2007 to Office 2010 we've started to experience a problem with the solver addin when our own analytics addins is also loaded. I have found a solution, but I think it may highlight a problem with the latest version of the solver
    addin for Excel 2010.
    Firstly, to describe the problem - the solver addin seems to load normally when Excel 2010 starts up, however when a "Solve" is performed we are seeing a "File not found: Solver32.dll" error at the final "Keep Solver Solution" stage. This only happens our
    own analytics addin is loaded. We've been careful to make sure that our own addin does not change the working directory and also that it has been built against the correct Excel 2010 SDK libraries. We do not see this error with any other versions of Excel
    running on the same PC or any other environment.
    After some searching we found other people were having similar problems and after a bit more probing I found a solution that works - but that I'm not very happy with.
    If I copy the Solver32.dll from:
      C:\Program Files (x86)\Microsoft Office\Office14\Library\SOLVER
        (where it was installed)
    into :
      C:\Windows\SysWOW64 
        (where Windows 7 keeps its 32 bit system DLLs)
    then the problem goes away.
    This seems to indicate that somehow Office 2010 has a problem that causes it to search in the wrong folder for the Solver32.dll when another addin is loaded in between the original Solver32.XLAM at start up and the use of the Solver in the sheet (which eventually
    requires this DLL to be loaded). Oddly, this only happens after a solution is found and "Keep Solver Solution" is selected - and I'm not sure why it's not looking for Solver32.dll any earlier.
    This is not a problem with any earlier versions of Excel and I suspect is a bug in the Office14/LIBRARY/SOLVER implementation. Is there any way to get this followed up?
    Thanks,
    Andy

    I'm facing the same issue. With an Excel VSTO add-in we're building. When the add-in is enabled the assembly solver32.dll can't be found. With our add-in disabled the DLL is resolved as (Sysinternals Process Monitor trace):
    EXCEL.EXE CreateFile
    C:\Program Files (x86)\Microsoft Office\Office14\Solver32.dll
    EXCEL.EXE CreateFile
    C:\Windows\SysWOW64\Solver32.dll
    EXCEL.EXE CreateFile
    C:\Windows\system\Solver32.dll
    EXCEL.EXE CreateFile
    C:\Windows\Solver32.dll
    EXCEL.EXE CreateFile
    C:\Program Files (x86)\Microsoft Office\Office14\Library\SOLVER\SOLVER32.DLL
    and with our add-in enabled the following locations are tried, but solver32.dll won't be found:
    excel.exe CreateFile
    C:\Program Files (x86)\Microsoft Office\Office14\Solver32.dll
    excel.exe CreateFile
    C:\ArcGIS\______path to our add-in install location_____________\Solver32.dll
    excel.exe CreateFile
    C:\Windows\SysWOW64\Solver32.dll
    excel.exe CreateFile
    C:\Windows\system\Solver32.dll
    excel.exe CreateFile
    C:\Windows\Solver32.dll
    excel.exe CreateFile
    C:\Program Files\Common Files\Microsoft Shared\Windows Live\Solver32.dll
    excel.exe CreateFile
    C:\Program Files (x86)\Common Files\microsoft shared\Windows Live\Solver32.dll
    excel.exe CreateFile
    C:\Windows\SysWOW64\Solver32.dll
    excel.exe CreateFile
    C:\Windows\Solver32.dll
    excel.exe CreateFile
    C:\Windows\SysWOW64\wbem\Solver32.dll
    etc...

  • HT3910 I face problems with the Nvidia 8800 GS on my iMac 24'' 3.06Ghz intel core duo. OS 10.06.08. What can I do to solve the problem and if you recommend upgrade to mountain Lion

    I  face problems with the Nvidia 8800 GS on my iMac 24'' 3.06Ghz intel core duo. OS 10.06.08. What can I do to solve the problem and if you recommend upgrade to mountain Lion

    If you want to sync it to the iPad from that Mac, you need to upgrade it to at least 10.5.8.
    If you want to copy the music to another Mac, you don't. Move the iTunes folder of the item in the Finder's sidebar over as you would any other folder. If you put it somewhere other than the Music folder, launch iTunes with the Option key held down and point it to that location.
    (61713)

  • HT201401 I had restored my iPhone 4 but after restore my camera can't function well after take picture from the camera it's didn't display in the Photo Gallery even can't take a video record,how to solve this?and i had tried to restore again,still the sam

    I had restored my iPhone 4 but after restore my camera can't function well after take picture from the camera it's didn't display in the Photo Gallery even can't take a video record,how to solve this?and i had tried to restore again,still the same
    kindly reply and fix this for me
    reply to my email,tq

    Most likely you have Office 2004 which are PPC-only applications and will not work in Lion. Upgrade to Office 2011. Other alternatives are:
    Apple's iWork suite (Pages, Numbers, and Keynote.)
    Open Office (Office 2007-like suite compatible with OS X.)
    NeoOffice (similar to Open Office.)
    LibreOffice (a new direction for the Open Office suite.)

  • [SOLVED] Arch64, Opera and plugins library problem

    I have Arch64 with Opera 64-bit as default browser. I have succesfully installed 32-bit flashplugin and it works nicely. The only problem is that fonts cannot be read from the flash player context menu and Open File dialog opened from flash player. The problem is that flashplugin tries to load 64-bit GTK from /usr/lib/gtk-2.0/2.10.0/ and it fails. 32-bit version is installed and it's located in /opt/lib32/usr/lib/gtk-2.0/2.10.0/.
    Gtk-WARNING **: /usr/lib/gtk-2.0/2.10.0/engines/libmurrine.so: wrong ELF class: ELFCLASS64
    Gtk-WARNING **: /usr/lib/gtk-2.0/2.10.0/engines/libpixmap.so: wrong ELF class: ELFCLASS64
    Also I have library loading problem with totem-plugin. It cannot find libxul.so and libxpcom.so, but both library files are located in /usr/lib/xulrunner-1.9.0.1/. The plugin loads fine if I create links to both files in /usr/lib/. But that doesn't seem like right solution to me.
    $ ldd libtotem-mully-plugin.so
    libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x00007f94e19d9000)
    libtotem-plparser-mini.so.10 => /usr/lib/libtotem-plparser-mini.so.10 (0x00007f94e17d6000)
    libxul.so => not found
    libxpcom.so => not found
    libplds4.so => /usr/lib/libplds4.so (0x00007f94e15d2000)
    What would be a most elegant way of solving these two library loading problems?
    I think that symbolic links and moving files are not the most elegant way to solve the problem. Maybe some environment variable or some configuration setting would solve the problem (LDPATH comes to mind, but it seems that it doesn't work).
    EDIT: I wasn't sure in which section to post this question, so feel free to move it if necessary.
    Last edited by SnapShot (2008-09-12 02:50:01)

    I have solved my problem and I will post my solution because it can be usefull to others.
    First the problem with flashplugin and GTK library path. Opera uses operapluginwrapper scirpt to detect if the plugin is 32-bit or 64-bit and after detection it uses operapluiginwrapper-ia32-linux for 32-bit or operapluginwrapper-native for 64-bit plugins. operapluiginwrapper-ia32-linux loads the 32-bit flashplugin in my case which requires GTK, but it incorectly tries to load it form /usr/lib/gtk-2.0/ where 64-bit version of GTK resides.
    The solution is to set the GTK_PATH environment variable to point to /opt/lib32/usr/lib/gtk-2.0/ where 32-bit version resides. But if you set it globaly it will result in problems with other 64-bit applications. So the correct solution is to add following lines on the bottom of the operapluginwrapper script above the exec line:
    case "$wrapper" in
    *ia32*)
    export GTK_PATH="/opt/lib32/usr/lib/gtk-2.0"
    export PANGO_RC_FILE="/opt/lib32/config/pango/pangorc"
    esac
    In this way the 32-bit paths will be active only for operapluginwrapper-ia32-linux process.
    I have solved the other problem with totem-plugin requesting libxul.so and libxpcom.so, but the solution idoesn't matter because, although totem-plugin loads coreclty it doesn't work in opera. I have installed mplayer-plugin which works as it should. Also gecko-mediaplayer works correctly with opera, I have tested them both. Install one of the two plugins that work, and you will be fine.

Maybe you are looking for

  • Blank page when trying to go to login from alliance-leicester site

    blank page when trying to login from alliance&leicester site == URL of affected sites == http://alliance-leicester.co.uk

  • Built it!! Now, some more questions . . .

    I put my new computer together this evening: K8N Neo Platinum 2 x 512 Crucial PC3200 RAM 120 GB WD SATA hard drive Lite-on CD-RW Floppy by Sony Antec Performance Plus 1080 AMG case with 430W Antec TruePower supply (includes 2 power supply fans, 2 rea

  • Oracle Tablespace issue

    Hi, I am having problem with one of our tablespace. I receive a error message saying unable to extent tablespace very often, even though we have enough space in tablespace, And i also observerd that max(bytes) in dba_free_Space is decreasing everyday

  • Running '3D Toolkit' from a Command Line (in Windows)

    I have found the knowledgebase article "Running Acrobat 4.0 or Later from a Command Line in Windows" (http://www.adobe.com/support/techdocs/321090.html). Is there any way to run the '3D Toolkit' from Command Line, too?

  • Hi Email Campaign Management without automation.

    Hi, I am working on Email Campaign management. Where we have created a survey ,Mail form, and a campaign. This Survey goes to the customer via email in form of URL. How we can capture the responses of the customer. Based on which leads can be created