Tuesday, February 12, 2013

Compression/Decompression tool

Install Compression/Decompression tools:
You can compress and decompress 7z, zip, gzip, rar, xz, tar, bz2, xar, tar.gz, tar.bz, and many others.
Enter following command in terminal to install:
  • sudo apt-get install p7zip-rar p7zip-full unace unrar zip unzip sharutils rar uudeview mpack lha arj cabextract file-roller
http://www.noobslab.com/2012/10/important-thingstweaks-to-do-after.html

Window-List Indicator (ubuntu 12.10)

 Install Window-List Indicator:
This Window-List indicator show which windows are currently open, and you can easily switch between them.
ubuntu window list
Enter following commands in terminal:
  • sudo add-apt-repository ppa:jwigley/window-list
  • sudo apt-get update
  • sudo apt-get install window-list
After installation go to Dash and search "Window-List" then open it. Make it startup from Window-List option.

http://www.noobslab.com/2012/10/important-thingstweaks-to-do-after.html

Disable System Crash Reports (Ubuntu 12.10)

Disable System Crash Reports:
If you are experiencing something crashes in your Ubuntu, and you don't like to notify with reports. You can disable them easily.
ubuntu crash reports
Enter following commands to disable crash reports:
  • sudo gedit /etc/default/apport
Now text file will open, In the last line you will see "enabled=1" change it to "enabled=0". Save and close file.
Now enter following command in terminal to stop apport service:
  • sudo service apport stop
http://www.noobslab.com/2012/10/important-thingstweaks-to-do-after.html

 Disable overlay Scrollbars in Unity (Ubuntu 12.10)

 Disable overlay Scrollbars:
You can disable overlay scrollbars, if you don't like that.
overlay scrollbars
Enter following command in terminal to disable overlay scrollbar:
  • gsettings set com.canonical.desktop.interface scrollbar-mode normal
If you want to get back overlay bar, enter following command:
  • gsettings reset com.canonical.desktop.interface scrollbar-mode
http://www.noobslab.com/2012/10/important-thingstweaks-to-do-after.html

How to set MS Word 2010 as default application for all docx and other types?


Solution

Visit: http://ubuntuforums.org/showthread.php?t=1940522

BY: forrestcupp

Preface: This is a howto, not a question.

Today, after beating my brains out trying to install Office 2007 with Wine 1.4 in Precise, I ended up resorting to using PlayOnLinux. What I learned about PlayOnLinux is that it makes installing things a dream, but it makes the general usability of those things an absolute nightmare. When I had Office 2007 installed with Wine, I could easily set filetype associations in Nautilus to Word and Excel. When I installed Office 2007 in PlayOnLinux, it didn't leave any way to associate filetypes. Also, PlayOnLinux created nice shortcuts to the apps on the desktop, but it didn't create any gnome-desktop launchers that will show up in Dash in Unity or Gnome Shell.

After a lot of hard work and headaches, I finally figured out how to do both of those things, so I thought I would share that experience for future reference, and for anyone else who might need it.

When you are preparing to do this, be aware that you will have to create two separate .desktop files for each Office program (Word, Excel, etc.). The first section creates a .desktop file so that a new instance of Word can be launched from the Dash. The second section creates a second .desktop file for associating file types.

Creating a .desktop launcher file

This creates a .desktop file so that a new instance your Office programs can be launched from Dash.

Open a terminal, and enter this command: Code:

gnome-desktop-item-edit ~/.local/share/applications/ --create-new

In the window that comes up, first enter a name for your launcher. For Microsoft Word, we'll enter Microsoft Word as the name. Then in the "Command" box, for Word 2007, we'll enter this code Code:

playonlinux --run "Microsoft Word 2007"

For Excel 2007, you would enter "Microsoft Excel 2007" leaving the quotes in it. For anything else, you just would put whatever app name shows up in the PlayOnLinux window, and put that name in quotes. After this, you can click on the icon and use the file browser to point it to whatever icon you want to use for that launcher.

After doing this, your app launcher should show up by doing a Dash search.

Associating files with MS Office that was installed with PlayOnLinux

This creates a second .desktop file for associating your file types.

Step 1 - creating a .desktop launcher for association Since PlayOnLinux installed apps don't show up in the "Open With" dialog in Nautilus, you have to create a custom command for Nautilus. This used to be easy to do with the GUI, but since they changed to Gnome 3 in 11.10, you can't do that anymore. Never fear, that's why we have the command line. Open a terminal, and cd to a folder that has a .doc or .docx file. Once you're in that folder, note the name of your Word document file, and type: Code:

mimeopen -d filename.doc

Of course you would type .docx if that's what type of file it is. When you type this, it will give you options of what you want the default app to be for that file. Enter whatever number says "Other" so that you can enter a custom command. For that custom command, enter the following for Word 2007: Code:

playonlinux --run "Microsoft Word 2007" z:%f

Note, that it will try to open the file with Word, and at this point it will not work. By the time you're done, it will work properly when you double click it in Nautilus.

Now open up Nautilus, press Ctrl+H if hidden files aren't showing, and navigate to ~/.local/share/applications and find the .desktop launcher file with something like "playonlinux_userdefined" in the name. Change that name to something like Word.desktop. Now you can right-click on a .doc or .docx file, go to Properties, and go to the "Open With" tab, click "Show Other Applications" and find "Word.desktop" in the list. Now, that filetype is associated with Word, and you can go through all of those steps again substituting the right names for Excel and Powerpoint.

Step 2 - making it work properly Unfortunately, what you just did won't work if there are spaces in the file or folder names. But we can fix that, too.

Open Nautilus and navigate to ~/.PlayOnLinux/shortcuts. Double click on each of the shortcuts that were made for Word, Excel, and Powerpoint, and choose to Display the file in Gedit. At the end of the script, you should find this code: Code:

$@

Change that code for the following code in each shortcut script, and save the files. Code:

"$(echo "$@" | sed -e 's:/*/:\:g')"

Make sure you leave the quotes in. That code will take the path and filename and convert any spaces to be readable by Word, Excel, or Powerpoint when you open the file.

Since both desktop files will show up in a Dash search, I suggest not assigning an icon to this one to prevent confusion.

Now, you should be able to navigate to any MS Office file in Nautilus, double click on it, and it will open properly.

I'm not an expert, and this is just the findings of my experience. Hopefully it works for you, too.

Edit: I found all of this information scattered all over the net, but I need to give credit to wojox for helping me fix a problem with the bash code I found for the shortcut script.