safely editing the content of firefox jar file - firefox

i want to edit the content of browser.jar in my debian install to change the position of a button in firefox
(if you need the "why": after a crash, the restore session screen has the buttons in a way that I always press "start new session" instead of restore... i don't know why... maybe my cancel-button-blidness just makes my brain think the long-text-button on the left is the confirm-action and the short text on the right is the cancel. ...instead of fighting with my dumb brain every time, i will move the button further down the screen or plain remove it)
I've already extracted the contents with unzip and found the file I need to change content/browser/aboutSessionRestore.xhtml
the question, can I just do the changes, zip it again and i'm done? Or is there a little more info in a jar file than a zip archive?

dumb question. should have tried it right away.
this did the trick
7z a browser.jar skin/ content/
$ file browser.jar /usr/share/iceweasel/chrome/browser.jar
browser.jar: Zip archive data, at least v2.0 to extract
/usr/share/iceweasel/chrome/browser.jar: Zip archive data, at least v2.0 to extract

Related

CSV download is splitting into CSV and CSV.part

I'd like to download a CSV file from JupyterLab.
It's 66MB and it shows the file is downloading, but it's split into CSV and CSV.part.
According to JupyterLab, the download has finished but they haven't combined into a single CSV.
When I open the csv.part, it says there are no applications to open it.
When I open the csv, it's empty.
I've tried re-downloading and it's always the same.
What do I do here?
Whatever application you used to download the file - a web browser? Safari? Chrome? - downloads the data into a temporary file (with .part on the end) and it is supposed to rename it to myfile.csv after the download has completed.
For whatever reason, it has not done this last step.
Simply delete the empty file myfile.csv and rename myfile.csv.part to myfile.csv. You will see a warning ("Are you sure you want to rename this?") - yes. You are sure.
There is nothing magical about file name extensions, except of course that they tell MacOS which application to open the file with. They should also give you a clear indication of what sort of data is in the file, but this is not actually enforced by anything. If you rename a file to something inappropriate for the content (e.g. if you name your file "myfile.mp3"), it simply won't load into the application as the data isn't valid. But, there is nothing special about the .part file - the name is just supposed to indicate that the download (probably) hasn't finished yet. Except in this case, I assume you know that it has.
(This seems like a bug to me, perhaps with JupyterLab - but that's beside the point).

Adding customized colors to POTX file

I know there already is an answer to the question here:
How to add new(customized) Theme colors to Powerpoint using VBA
But it didn't work. And as I'm not allowed to comment there (not enough reputation) I'm sorry for opening up a new question. (Dear admins - this isn't really clever in my opinion. Now we have two threads on the same thing, just because I'm not allowed to comment.)
Back to topic:
http://echosvoice.com/wp-content/uploads/pptfiles/customcolors.pdf
I followed the instructions of Echo, recommended in the other thread, but it didn't work. I have ppt2010 and tried with a THMX, a POTX and a PPTX. It's always the same. I rename the file by adding a .zip - I extract the ZIP - I copy Echo's example code and paste it right before /a:theme in theme1.xml file - I save it - I zip the whole folder - I delete the ZIP Extension - and it's corrupt. When I doubleclick, PPT opens without a slide. When I got to "open" and choose the template, I get an error message. "Repair" doesn't help. - What am I doing wrong?
(Somewhere else I read, I have to add this to every theme-file, but it doesn't make a difference)
Be kind to yourself. Use 7-zip (free) to open the PPTX (it can open them directly w/o having to rename them, and won't corrupt the files).
Alternatively, rename the file to zip, doubleclick to open the zip in Windows Explorer, drag any file you need to edit to the desktop, edit it there, drag it back into the still-open zip, then close the zip.

Creating Dropbox like DMG package

Does anyone suggest a freeware tool/script/manual_way of creating Dropbox like DMG -
Need to ask couple of questions --
I want double clicking the Folder-Icon should copy the folder(which would contain installer and uninstaller .app files of my application) into the system's /Applications folder.
Solution -- This has been solved using Applescript and changing icon of that applescript file to the folder-icon(i.e double clicking that script will move our folder(which would be present in a hidden folder) to /Applications.Any suggestions for second and third part?
Is it possible to show hyperlink of actual dropbox.com to actually open it's website?
And how we can customize volume's/Drive icon?
You can find a way to do it by reading this: Packaging a Mac OS X Application Using a DMG » asmaloney.com
I believe you can also use the trick of naming a shellscript file something.command in order to make it double clickable, (but maybe it will open the terminal, -I haven't tried it).

Installing windows gadget fails

At least I finished developing a new windows gadget.
I zipped it and removed the ".zip", so that it's a valid ".gadget"-file now.
When I execute this file the install-dialog pops up, i click "install" but nothing happens.. Any suggestions? When i copy the extracted (not zipped) Windows gadget into "C:\Users\Username\AppData\Local\Microsoft\Windows Sidebar\Gadgets", I can use it successfully, but the way I descriped before isn't possible..
Sounds like you may have zipped up one folder too many.
If you zipped up "gadget_name.gadget" then, if you executed this it would not install.
You need to go into the gadget.gadget folder and zip up them files. For example in that folder you may have 2 folder labeled EN-US and Images. you need to zip them up from there and when save them as "gadget_name.gadget", change the extension from .zip to .gadget.
It may be a late reply but it might be helpful.
Check there are no empty folders in your gadget zip.
Also ensure you have the correct Directory structure Eg,
mygadget.gadget\gadget.xml
Not
mygadget.gadget\mygadget\gadget.xml
If you could post the gadget zip file it could also be helpful.

"Revert" command in AppleScript on OS X Lion

I'm in the middle of putting together a script that manipulates an OmniGraffle document and saves the result of each progressive manipulation as a PNG. That's all working fine, but at the end of process, I want to close the file without saving the changes.
Naturally, I reached for the "revert" command. Except that "revert" doesn't appear to be a command on Lion. I tried "close saving no," but since it was autosaving as each manipulation was made, that didn't work.
Of course, I can simply leave the document open and manually revert it. Nevertheless....
Am I missing something? Is there truly no way to programmatically roll back changes made to a file using AppleScript on Lion?
Update: it appears to be worse than I expected — on a volume without permanent version storage, at least — after many manipulations with AppleScript, "Revert Document…" was no longer even available in the File menu.
I can only think of a workaround: since you're not interested in keeping those intermediate versions anyway, you could:
make a backup copy of the file prior to opening it in OmniGraffle
do your changes + PNG exports
close w/o saving
overwrite the file with the backup copy (and delete the backup)

Resources