Google Chrome as default browser on Arch Linux

Hey there. It’s been a while, again, yes!

Here is something I wasted my half an hour on. I was using Chromium as default browser on my Arch Linux, and it was nice in the beginning, but then it kept forgetting my closed tabs, and also kept showing error about non properly closing, though it was. About an half an hour ago I decided to dismiss it 🙂 When I uninstalled it, some applications (like Skype) did not know which browser to use as default. Since I use Skype with my friends for sharing online material, this is really important thing to be solved. So I googled and tried various solutions without success.

Then I stumbled upon this solution:

/opt/google/chrome/xdg-settings get default-web-browser
/opt/google/chrome/xdg-settings check default-web-browser google-chrome.desktop

Here you can check which is your default browser and change it.

It worked for me, and I hope it’ll work for you too 🙂

Other solutions were:

  • Exporting system variable BROWSER with path to your browser as it’s value
  • Setting variable in your ~/.profile file (or ~/.bashrc)
Anyway, that’s it. Bye!

Where are Chrome’s flash temporary files [UBUNTU]

I had the same question! Where are the files? They used to be in /tmp named with Flash… What happened? Is something changed in google chrome, or in Ubuntu?

I have read a lot of papers, and the most of them is pointing to the ~/.cache/google-chrome folder. It’s the folder where you should find google chrome’s cache files. But there are no big flash video files, just small ones. Suppouse you watch some youtube video, and you like it so much you want to keep it in your home folder for some time. Let’s say it is 100MB big. That file wont be stored in google chrome cache folder. Where will it be stored then? I don’t know and I’m not sure where to look, but I did some tricks and found them. Let’s explain the tools.

First, I have opened youtube file and let it stream from internet. In the meantime I used df command to see what part of my file system is receving data. It was not my /home folder. It was / file system.So, place to look for file was better located, but searching through / would take “millions” of years. I tried to use du command for folders in / , except /home , to see which folder is having his size changed. But calculating folder size was very time consuming and if folder is big enough, you will have to wait quite some time for calculating difference between sizes of same folder in 2 particular moments. So, that kind of solving the problem was not very good. Then, I asked google for advice. I wanted to see which process on my system is using which file. The command for it was lsof.You should read next two references before going any further, because what I’m about to do is going to have explanation only for this specific problem.

http://superuser.com/questions/235535/in-google-chrome-on-linux-where-is-the-flv-if-not-in-tmp

http://www.ibm.com/developerworks/aix/library/au-lsof.html

From now on, we’re going to concentrate on finding those flash files!

First, you should get PID of chrome. You can use various commands, but ps or top will do just fine.When you get the PID, you should use

lsof -a -p [PID] -u [USERNAME]

This is going to list all files that are used by process with PID, which is executed under user USERNAME. Flag -a is for logical AND so list will contain results which fulfil both contidions. Somewhere in the list are files called Flash…. (deleted), right? Yes, we are looking for them. It should list something like this:

chrome  17621 [USERNAME]   23u   REG        8,8 12764804   394927 /tmp/FlashXXmR06LN (deleted)

Ok, as you can see, we have chrome with 17621(PID), having opened regular(REG) file for read/write(u), under [USERNAME] with size 12764804, 8,8 device and 394927 node. Of course last part is file name. Now, I’m not going to explain all these things because you should already know them if you have read those references back up there.

Here comes the nasty part. You need root privilege to view processes information. Go in /proc/[PID]/fd and do ls -l . This is going to list file descriptors with links to the files, among which are our Flash…(deleted). You should copy them anywhere on the system, and change owning of file, because you have copied it as root. Now, you can view the file with your favourite player.

That’s it ppl. After all this, I ask myself, is it worth doing all this for video, and why is place for temporary videos changed from /tmp folder???

Bye