LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 03-27-2008, 08:56 AM   #1
Caesar Tjalbo
Member
 
Registered: Aug 2006
Location: Enschede, The Netherlands
Distribution: sidux
Posts: 91

Rep: Reputation: 16
Question How to change 'Compress As' default in Konqueror servicemenu?


This has bugged me in different KDE versions across different distro's. I have Ark installed and tools (kdeaddons) to integrate it with Konqueror.

What I do:
- select a file in Konqueror,
- right-click, the service menu opens,
- select option 'Compress',
- a submenu opens with several options, including 'Compress as xxxx.tar.gz' where xxxx is the filename.

Screenshot:
http://img206.imageshack.us/img206/5...pressasfy0.png

I'm using zip almost exclusively and in the 'Compress As' sub-sub-menu (the option below 'Compress as xxxx.tar.gz'), I find it together with compress as bzip2, tar.bz2, etc. However, I'd like the first option in the 'Compress' servicemenu to be 'Compress as xxxx.zip' in stead of 'Compress as xxxx.tar.gz'.

Does anyone know how/ where to change that?
 
Old 03-27-2008, 10:38 AM   #2
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,313

Rep: Reputation: 139Reputation: 139
Here's an article that discusses kde service menu configuration:

http://developer.kde.org/documentati...vicemenus.html

Basically, you need to edit the relevant text configuration file to change the service menus in konqueror; there's no gui way to do that AFAIK. These configuration files are all in the form of "*.desktop" and can be located in various places depending on how your distro sets up kde. Apart from mastering the syntax of .desktop files, the biggest challenge is finding the right .desktop file you need to edit.
 
Old 03-27-2008, 06:13 PM   #3
Caesar Tjalbo
Member
 
Registered: Aug 2006
Location: Enschede, The Netherlands
Distribution: sidux
Posts: 91

Original Poster
Rep: Reputation: 16
Thank you for your answer.

Quote:
Originally Posted by kilgoretrout View Post
Here's an article that discusses kde service menu configuration:

http://developer.kde.org/documentati...vicemenus.html

Basically, you need to edit the relevant text configuration file to change the service menus in konqueror; there's no gui way to do that AFAIK. These configuration files are all in the form of "*.desktop" and can be located in various places depending on how your distro sets up kde. Apart from mastering the syntax of .desktop files, the biggest challenge is finding the right .desktop file you need to edit.
I knew the article by Aaron Seigo and .desktop files were the first I looked at. Finding the right one was a problem indeed. My distro (sidux) has directories called "servicemenus" so it could have been simple. I also looked at rc files in various .kde locations and at .protocol files for clues. No luck but given the amount of files and the sometimes cryptic filenames, I consider it very possible that I've overlooked the correct one.

My question was posted in the hope someone could point me to an easy solution. I'd taken a half-hearted look at some Ark source files too just in case I could find the root of this issue there. Earlier this evening I combined what I knew from looking at text files and downloaded the KDE source. Unfortunately, my C++ knowledge is quite useless but this is what I found:

/kdeaddons-3.5.9/konq-plugins/arkplugin/arkplugin.cpp, lines 94 - 110
Code:
        compMimeTypes();
        actionMenu = new KActionMenu( i18n( "Compress" ), "ark", actionCollection(), "ark_compress_menu"  );
        m_ext = m_conf->readEntry( "LastExtension", ".tar.gz" );
        if ( itemCount == 1 )
        {
            item = itemList.first();
            m_name = itemList.first()->name();
            action = new KAction( i18n( "Compress as %1" ).arg( m_name + m_ext ), 0, this,
                                    SLOT( slotCompressAsDefault() ), actionCollection() );
        }
        else
        {
            action = new KAction( KMimeType::mimeType( m_conf->readEntry(
                                    "LastMimeType", "application/x-tgz" ) )->comment(),
                                    0, this, SLOT( slotCompressAsDefault() ), actionCollection() );
        }
        actionMenu->insert( action );
and sure enough, I have a ~/.kde/share/config/arkrc file with an entry called LastExtension:
Code:
[ArkPlugin]
LastExtension=.zip
LastMimeType=application/x-zip
So my guess is there's something not working right but I can't say for sure.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to change the browser behavior when using 'save as' in firefox? hedpe Linux - Software 3 02-29-2008 08:58 PM
Konqueror - compress action bowens44 Linux - Software 2 10-17-2007 07:01 AM
Krename's servicemenu missing Sabinou Mandriva 2 11-07-2006 06:20 AM
using tabs in default browser (konqueror) dav7500 Linux - Newbie 3 02-07-2006 08:25 AM
Konqueror default view NightKids Linux - Newbie 2 06-30-2005 10:42 PM


All times are GMT -5. The time now is 08:04 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration