Programming :: Get Program Based On Mime-type In C

Feb 10, 2010

I need to launch programs in my program and the program can be a script, a Linux executable or even a Windows executable. The first thing i tried is to use xdg-open from my program, but i can't pass arguments to it, otherwise it would have worked perfectly. Is there maybe a way to determine which program is set as default according to the mime-type of the program i want to launch? I also tried kfmclient and gnome-open, they don't allow arguments either.

View 2 Replies


ADVERTISEMENT

Ubuntu :: Script To Rename File Based On Mime Type?

Jan 9, 2011

I have a folder containing the output from Windows XP "File and Settings Transfer Wizard" - the folder refuses to be imported into any flavour of Windows and the original windows system is no more - so I found a little program called fastconv [URL] which extracted all the files but fails to rename them - been working on this solidly for 3 days now, there are 47,000 files in 20gb, so naturally the customer is very concerned.

I noticed that Ubuntu cleverly recognises the type of file, assuming its looking at the contents of the file rather than the extension.

Is there any way I can automatically rename the files based on the mime type?

View 2 Replies View Related

General :: Getting Content-type/Mime Type Of The File Using Shellscript

May 24, 2011

I am copying the file form one directory to another directory using shellscript.

Here i want to get the Mimetype/Content-type of the file.

How to i can get the MimeType.

View 9 Replies View Related

Programming :: Program A SH - Bash Program With Zenity To Play Radio Based On A Site?

Feb 15, 2011

I will have to code this. However I am lacking of time since I have too much to do. make a short code bash/dash to prompt the country with Zenity, then, get the PLS or m3u url and prompt with another zenity which radio to play. http://www.listenlive.eu/index.html

My code to get url's radio country.htm is:

Code:

View 2 Replies View Related

Ubuntu :: Use Mime Type Instead Of Thumbnails For .pdf?

Nov 12, 2010

I installed faenza icon theme and would like to have for my pdf docs only mime type (included in mime types/ icon theme), not a thumbnail. Is there some easy way to change this system wide?
I tried this and similar suggestions found on net, but no go:
http://ubuntuforums.org/showthread.php?t=770142

Using Ubuntu 10.04 64bit (Gnome)

View 3 Replies View Related

Slackware :: Mime Type Associations For Office Files

Oct 22, 2009

I installed MS office 2003 via wine on Slackware 13. I need to know how to associate files with the right Office (msword, msexcel, msppt) program. I made launcher scripts that can launches office files from the CL, but the user on this computer will want to be able to just double click a file in dolphin and have the right office program come up.For some reason all office files show up as x-ole-storage instead of application/msword or something similar. So, even if I tell Excel to associate with that file, it will do it for Word and PowerPoint files as well.

.ppt, .doc, and .xls extensions were configured via the KDE file associations panel, but this did not help. I played around with the raw files under ~/.local/share, but I did not find the solution.The version of WINE is 1.1.24 (built from SBo SlackBuild).

View 2 Replies View Related

Ubuntu :: Unable To Locate Encoding Profile For Mime-type?

Feb 7, 2010

I am trying to transfer extracted music files from a CD into Rhythm Box music library, and I get the response, "Unable to locate encoding profile for mime-type"

View 2 Replies View Related

Slackware :: Mime Type Error Opening Dolphin And Other Kde 4.4 Applications

Feb 11, 2010

I did a clean installation of KDE 4.4 Alien bob`s packages and when I open the dolphin, for example, appears this error:

The icons and directories are all on blank...

View 1 Replies View Related

Ubuntu :: Edit Mime Types To Remove A File Type Association?

Oct 30, 2010

I installed a trial copy of Anquet Map V06 under Wine then decided to remove it. Afterwards I could find many remnants associated with the Anquet program which I've deleted. Except what remains is an association between my .gpx files with Anquet and that includes and any new gpx file I download. My interpretation is that during the install process an association has been created with the gpx file type and the Anquet map program. This is what I want to stop. If I download a .gpx file and look at it's properties I see- Type: GPX File -Anquet Mapsv06 (application/x-wine-extension-gpx) I found this file and it's contents-

/.local/share/mime/application/x-wine-extension-gpx.xml
<mime-type type="application/x-wine-extension-gpx">
−
<!--

[code]....

Running "sudo update-mime-database /usr/share/mime" and rebooting didn't remove the association. How can I stop the Anquet name making as association with my gpx files?

View 9 Replies View Related

Debian Multimedia :: MATE Desktop - Setup Default Apps (MIME-Type)

Aug 28, 2015

I can't setup or change MIME-Types in Mate/Caja (filemanager)

I use MATE Desktop on Debian 8.1 - File Manager is Caja (1.8.2) - I put in a USB Stick whit Pics. In the Popup Window they came up, normally i can setup a Default behavior for Pics, Music ... But, in my Window the Options are not available. (Grey) The same in "Settings" from Caja (Datenträger) Data Medium.

What can i do to set MIME Types in Mate?

View 0 Replies View Related

Programming :: Ncurses Based Program Had To Be Recompiled On A Different PC Same OS

Oct 18, 2010

On an Ubuntu Server I am running, I wrote a small Ncurses program in GCC. It worked just fine.

Then, I copied the executable over to my Ubuntu 10.10 desktop edition with sftp. No matter what I did, it kept giving the error:

error opening terminal: xterm.

I had copied other non-curses programs and they all ran just fine.

Finally, I copied over the source, recompiled with GCC and voila, the executable now runs fine.

View 6 Replies View Related

Software :: Error In File "/usr/share/applications/kde4/kfontview.desktop": "fonts/package" Is An Invalid MIME Type

Oct 5, 2010

attempting to install VLC I get the following errors;

Error in file "/usr/share/applications/kde4/kfontview.desktop": "fonts/package" is an invalid MIME type ("fonts" is an unregistered media type)
Warning in file "/usr/share/applications/gnome-nautilus-folder-handler.desktop": usage of MIME type "x-directory/gnome-default-handler" is discouraged ("x-directory" is an old media type that should be replaced with a modern equivalent)
Warning in file "/usr/share/applications/gnome-nautilus-folder-handler.desktop": usage of MIME type "x-directory/normal" is discouraged ("x-directory" is an old media type that should be replaced with a modern equivalent)

Thoughts or suggestions on how to fix this. I running Fedora 13 and I used 'yum install vlc' to install the app.

View 7 Replies View Related

Programming :: Error - Array Type Has Incomplete Element Type

Jan 26, 2010

I'm trying to compile a program and it gives me the following:

I checked cmath-util.h:46 and cmath-util.h:48:

I'm not a C person, and the author is unavailable so far.

View 5 Replies View Related

Ubuntu :: Download Locations Based On File Type?

Jan 17, 2010

Is there a way to set Firefox to place downloaded files in different folders based on the file type?e.g. in my Downloads folder place all .doc files in a sub-folder called ".doc", all .jpgs in a sub-folder called ".jpg"I'd assume there's probably a rule, or a script that can be used to accomplish this, but being a graduate student, I don't have alot of free time to poke around and figure it out myself

View 9 Replies View Related

Ubuntu :: Search Based On Nautilus File Type?

Aug 10, 2010

Is there any application that will let me restrict search results, by, for example, whether it is a plain text document or a jpeg image (not by extension, but the same way nautilus knows if something is a jpeg even if it doesn't have an extension)?It would be nice to have an easy way to search for, e.g., just images, just videos, or just music without relying on file extensions.

View 1 Replies View Related

Programming :: Convert The String Data Type To Other Primitive Data Type?

Mar 4, 2011

I am trying to generic way to convert the string datatype to other primitive data type. To achieve, i used Template . But i getting error and couldn't resolve the issue and error reported is also clueless.

Code
====
#include <vector>
#include <iostream>
#include <string>

[Code].....

View 7 Replies View Related

Ubuntu :: Net Nanny Type Program ?

Jun 19, 2011

I've enjoyed my time with Ubuntu and want to share it with my family.

My son is still quite young and I want him to have a positive experience on the net.

Is there any kind of net nanny type program for Ubuntu that I can load on his computer for his protection?

View 1 Replies View Related

Fedora :: What Is Proper Way To Program For Based GUIs?

Aug 21, 2010

I have recently been programming with Qt and slowly getting my head around it.I want to have a pet project to learn some more and then I got to thinking how should I go about this.My question is what is the proper way to program for Linux based GUIs? One of the things I would like to write is a small front end for newspost. I want to include extra stuff like rar and creating pars on the fly. So how should I go about integrating other CLI programs to make my GUI feature rich? I thought of three ways to approach this.

1. Take all source code and throw it into one self containing project. (think this is evil)
2. The GUI will basically assemble CLI commands and call them. This is nice but can very fragile.
3. The GUI will compile against rar-libs and other libs?

I am originally an MS programmer and don't think I should apply same practices toward Linux. So let me know what your opinions are and how you roll out GUIs.

View 3 Replies View Related

Ubuntu :: Associate File Type With A Jar Program?

Jul 31, 2011

any way to make a certain file extension (.etxt) open with a certain jar application (enotes.jar) that uses files with that file extension? i tried (for the custom open command on a .etxt file):

Code:

java -jar /home/me/Programs/enotes.jar "%1" %*

which was proposed (for windows) here: [URL]but it doesn't work when adapted to linux...

View 2 Replies View Related

Software :: Scientific 5.5 - Chemsketch Type Of Program.

Jul 24, 2010

I just found out about this distro using search on these forums and it kind of excited me because I am a chemistry student. I was wondering if anyone has used it and if so does it have any Chemsketch equivalent programs included with it ?

If not (or even if it does) do you have any suggestions of programs that are the same as (on a ease of use/quick to pick up scale) or better than for simple/quick organic and inorganic modeling/reaction modeling ?

View 4 Replies View Related

Ubuntu :: Peer Block Type Program For System?

Aug 12, 2010

Is there a program like peer block for ubuntu? It is an ip filter program. Here is the website to help answer questions on what type of program it is. http://www.peerblock.com/

View 6 Replies View Related

Ubuntu :: Finding A Tasker/Locale Type Program?

Nov 17, 2010

I'm wondering if there exists software that serves the same kind of function as Tasker or Locale for Android except for Linux. I think it would be really great to be able to have certain things run automatically based on a set of conditions. For example, I would like to automatically sync my mp3s to my laptop from my home computer when my laptop connects to my home network.

View 1 Replies View Related

General :: Execute A Program Based On A Keypress From A Specific USB Keyboard?

May 4, 2011

I've been given one of these ubiquitous usb-sleep buttons which is basically a supersimple usb-keyboard. It's a big button that sends a SLEEP keypress to the computer when you slam it. But that is pretty boring. I'd love to remap it to do something more fun but I can't figure out how to bind to only the sleep press from the button and not from my ordinary keyboard.

The button identifies as

Bus 001 Device 035: ID 1130:600d Tenx Technology, Inc.

I'd like to know if there's either

a way of mapping a key from a specific keyboard to an action OR a way of remapping the sleep key from a specific keyboard to a new key-code or something like that.

View 1 Replies View Related

Software :: Make A Web-based Interface For User Configuration Program?

Feb 9, 2010

I currently doing a network emulator program and the features must includes the web-based interface for user configuration. I able to run my program through command line. But I would like to ask how to associate my program to web-based interface for user configuration?

View 8 Replies View Related

General :: Feature-rich Disk-based Personal Backup Program For?

Sep 4, 2011

Could you suggest feature-rich disk-based personal backup program for Linux (and I've seen a few)?

I want to do nightly backups of the whole system and be able to rollback to any of last 7 days. And, it must be incremental backups. What tool should I use? The tutorials I've read about rsync tell only how to store latest incremental backup and I need last 7.

View 3 Replies View Related

Ubuntu :: Finding A Program That Will Sort The Music Into Folders Based On Their Genre Tags

Feb 19, 2010

I used MusicBrainz Picard to tag FLAC and Mp3 files, fixed any necessary genre tags in Rhythmbox, and used EasyTag to rename the actual files.But now I'm interested in using those genre tags as folder names...is there any program that will sort my music into folders based on their genre tags?

View 5 Replies View Related

General :: Automation - Good Console-based Program To Automatically Manage Music Collection?

May 31, 2011

I like the convenience of having a music player that manages the placement of my music files based on the tags of the files, sorting into a root music folder with Artist/Album/01 - Track Title.mp3 sort of hierarchy. Previously, I was using Banshee for this feature, as even most of the other gui music players don't have this library management feature. Now, I've been trying to use console-based applications, and I have been using mpd + ncmpcpp fairly successfully. When I download new music, it is downloaded to a specific folder, and that's not part of my music collection. My previous workflow would be to open a gui filemanager at the downloaded folder, and drag and drop those songs onto banshee, which would then make a copy of those files in my library hierarchy. Currently, I'm doing the same thing, using Banshee only as a sort of import program, then closing it and updating my mpd database, and there we go.

If at all possible, I'd like to automate this to something where I can define a watch folder, and when some magical program sees new music in said watch folder, it identifies the correct place for the files to be copied into my heirarchy, renaming folders and files to the correct format. I know I've written a lot describing, but I don't actually think this too uncommon a task, and I'm wondering if anyone has a solution for my problem.

View 3 Replies View Related

Programming :: Open Or Run A File/program Through A C++ Program

Jan 15, 2010

Ok so Basically i have 2 questions

1. i know how to create a file with c++ using but is there a way to save it to a specific location on your computer with windows and linux

Code:

2. i need to know how to run/execute/open a file in a c++ program im using and its not working

Code:

View 4 Replies View Related

Programming :: C++ Variable Type Followed By *?

Jul 1, 2010

In C++ what does the suffix, "*" mean appended to a variable type, e.g., "char* variable1;"?

View 3 Replies View Related

Programming :: 'fstream' Does Not Name A Type

Nov 29, 2010

I have included fstream in my file (#include <fstream>) In the file, I have a class declaration and a private variable static fstream fileStopWatch; Then I am getting the error "'fstream' does not name a type" It was working in gcc version 4.1.2 20080704 (Red Hat 4.1.2-48) but not working in gcc version 4.4.4 (GCC)

[Code].....

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved