Showing posts with label Technical. Show all posts
Showing posts with label Technical. Show all posts

Sunday, December 20, 2020

How to uninstall an app that doesn't show up in Application folder but exists in Launchpad

 Hi Ya!!


Today I encountered a minor technical challenge where there was an app called "GoToMeeting v10.14.0".

I removed it in the Application folder, but somehow it still showed up in my Launchpad.

It is weird, and it turns out in this case, we need to update an Sqlite3 db in our system!!

Steps:

  1. We need to find where our launchpad database is:

    ❯ find /private/var/folders -name com.apple.dock.launchpad -a -user $USER  2>/dev/null

    /private/var/folders/pq/dhk1_sjn5pdf3q2zr7l0vwy80000gn/0/com.apple.dock.launchpad
    ❯ sqlite3 /private/var/folders/pq/dhk1_sjn5pdf3q2zr7l0vwy80000gn/0/com.apple.dock.launchpad/db/db
  2. Once we have the path (note the 'dhk1_sjn5pdf3q2zr7l0vwy80000gn' is random, yours could be different). Let's call '/private/var/folders/pq/dhk1_sjn5pdf3q2zr7l0vwy80000gn/0/com.apple.dock.launchpad/db/db' as $LAUNCHPAD_DB
  3. Run `sqlite3 $LAUNCHPAD_DB/db/db`
  4. You need to have the complete name of your app, if you don't, try the following command
    sqlite> select * from apps;
  5. For my case, the complete name of the app is 'GoToMeeting v10.14.0'
  6. Here are the key steps!!
    sqlite> delete from apps where title='GoToMeeting v10.14.0';
    sqlite> .exit
    killall Dock
  7. Here you go, the app is gone!

Saturday, July 31, 2010

Scroll Back in FreeBSD Console

The FreeBSD console works quite differently from Linux: under Linux, you press Shift+Pg-Up or Pg-Dn to access the console buffer.

Under FreeBSD, it is different. Press 'Scroll-Lock' or 'Pause/Break', and the system will enter scroll mode and the blinking prompt will disappear. At this time you can use arrow keys or Pg-Up Down to maneuver the scroll buffer.

The only thing lacking for my FreeBSD system is the sound output.

Thursday, July 29, 2010

FreeBSD, Fully Loaded

Now my FreeBSD system is fully up: ZFS is running, Samba configured, Openoffice installed.

Hence FreeBSD is my latest toy, and I believe I am gonna say good bye to OpenSolaris from now on.

FreeBSD is not for the faint of heart, especially those who don't know or don't want to use command line. I installed FreeBSD from the CD version, and when it was first loaded, there was basically nothing in the box - no X, not even bash.

However the BSD ports system is a charm to use, as long as you have broadband, it is much more user-friendly than OpenSolaris, and can even beat Ubuntu hands down.

Here are some basic stuff:

Suppose you want to install firefox, you have two choices: install the pre-compiled one, or compile and install from source.

1. Precompile Binary

There are multiple sources for precompiled binary packages, the easiest way is to issue:

pkg_add -r firefox

That is it. If the system can find firefox, it will be automagically installed.

If the package is not available at the default location, just google around and you should be able to get most of the popular packages pre-compiled.

2. Compile from Source
In the '/usr/ports' directory, software packages are divided into their functional group, e.g. editor, audio, news, etc. Inside those folders will be folders for individual software packages.

Taking the firefox example, we can get it from '/usr/ports/www/firefox', change directory there, and issue:

make install clean

The above command in effect will download, compile, and install the package (effect of 'install'), while the 'clean' command will remove all the intermediate files.

Do note I highly suggest you always try to install pre-compiled binary, and only if you cannot find the pre-compiled binary, or the binary doesn't suit your need, then you roll your own stuff. Compilation is a _long_ process. I did that for OpenOffice, the machine ran for 4 hours non-stop, to the point I gave up and downloaded the compiled version (just google around).

Monday, July 26, 2010

FreeBSD I am

Here I am, after slotting in the new 160GB hard drive and downloaded FreeBSD 8.1.

This time it boots well, so well that I am now typing on firefox on KDE on Xorg on FreeBSD8.1

Although I am still configuring my Samba share, but to my delight, my data in ZFS can be ported to FreeBSD without much issues.

Once everything is well and smooth. I will install FreeBSD to my 500GB OpenSolaris drive, and wave OS good bye.

So be it, after 3 years. At least I still have my ZFS. :)

Sunday, July 25, 2010

FreeBSD 8.1 Released

I am gonna give FreeBSD another try because OpenSolaris is so dead now. I have a spare hard drive, so it won't hurt much for me to experiment a bit.

Release notes for FreeBSD 8.1 is here.

Sunday, May 30, 2010

OpenSolaris Crashed!

Updated:
Edited title from 'OpenSolaris Clashed' to 'OpenSolaris Crashed'. Thanks Lim for pointing out that mistake. :)

Last evening my OpenSolaris box fell inside a reboot loop, right after I chose the BE image to boot from, the machine rebooted itself, and this loop continued ad infinitum.

The first reaction I had was suspecting my system drive went dead. So I booted using a 2009.06 CD, trying to see if there is any disk rescue utility. Nope, there is none.

Trying to import the zpool that housed my data:

$pfexec zpool import -f dpool

It worked, so my data was fine. *phew*

But problem appeared when I tried to import the zpool with my root:

$pfexec zpool import -f rpool

*System rebooted*

I nearly made the conclusion the drive was dead, but to further nail it down to hardware problem, I went ahead and installed a new copy of OS.

Everything went smoothly!! The system boots up properly again and again. Hey, I had a software issue.

Now I kind of suspect why 2010.04 never came out. The kernel has a very latent bug that will silently corrupt the system to total boot failure.

I guess I will use snv_111b for now, or until I can install FreeBSD...

Sunday, May 09, 2010

On FreeBSD

I mentioned I would take a look on FreeBSD, indeed I did. However my journey was not a smooth one. In fact, the installation process was hung in the middle at the screen prompting for language. I tried both the amd64 and generic i386 images, all to no avail. I guess I will wait for awhile for the next FreeBSD...

Saturday, May 01, 2010

OpenSolaris Starts To Suck

OpenSolaris 2010.4 is supposed to come out as now already 2010.5, but this doesn't happen. Both OpenSolaris.org and Oracle have been mum on this issue. Given OpenSolaris is not in active development, and FreeBSD does support ZFS, I am thinking to convert to FreeBSD once for all.

The new FreeBSD 8.0 seems very promising, and I will download it for a spin in the very near future.

Saturday, March 13, 2010

OpenSolaris Updated

SunOS opensolaris 5.11 snv_134 i86pc i386 i86pc

I think this is the OpenSolaris 2010.03, but whatever it is, it is snappier, faster, and more responsive. I haven't explored the library inside yet.

Thursday, January 28, 2010

OpenSolaris Updated

I have updated my system from snv_110 to snv_131. The changes so far seem positive, the user interface is more slick, and all my CIFS exports are intact.

Here is output of `uname -a`

SunOS opensolaris 5.11 snv_131 i86pc i386 i86pc


I still love Solaris.

As a side note, Debian/kFreeBSD is coming out in a month's time. It is the standard Debian distro, with the FreeBSD kernel (Should be the one from Debian 7.2-1). Even though this release doesn't support ZFS yet, I do think it is a good start, and I will check it out in due course.

Saturday, December 19, 2009

Week in Review

This is a quiet Saturday evening. I just came back from a friend's birthday celebration. Not wanting to lingering outside for long, I just headed back home, and got myself a can of beer along the way.

Now, cozy as I am, in front of the PC powered by my trusted OpenSolaris, I am trying to comb through thoughts that ran through my mind in the past few days. I will list the most important things first:

  • I have been missing mak alot, for no apparent reason. It seems time doesn't dilute the memory, damn. But this time I am powerless, as I have no more way to reach her, and she no longer gives me any more chances. So here I am. Like a fish on a parched land, under the hot sun.
  • Been dabbling in functional programming by following the legendary SICP (yes, the full text and all course videos are online, free). Therefore I am again picking up the Scheme programming language (a dialect of Lisp, if you wanna know). I am aware there are a lot of newer languages out there like OCaml, F#, Clojure, or Haskell, however I think programming languages are tools, and as long as we understand the paradigm, concepts, and fundamentals, tools are often secondary. The beauty of Scheme is its simplicity and relatively small size. In fact, its latest specs R6RS, has merely 90 pages.

Saturday, November 28, 2009

Pool Mirrored

I just bought another drive for my trusted OpenSolaris box to create a mirror for my data.

The command to create the pool is deceptively simple:


pfexec zpool attach poolname original_drive new_drive

To get the name of the pool and the original drive name:

pfexec zpool status

How about the name of the new drive? The only way I can think of is:

pfexec format

Comparing the outputs of the above commands will let you find the name of the new drive.

Example:
cuppa@opensolaris:/datapool$ pfexec format
Searching for disks...done


AVAILABLE DISK SELECTIONS:
0. c7t0d0
/pci@0,0/pci1458,b002@11/disk@0,0
1. c7t2d0
/pci@0,0/pci1458,b002@11/disk@2,0
2. c7t4d0
/pci@0,0/pci1458,b002@11/disk@4,0
Specify disk (enter its number):
Next we will check the status of my existing pools:


cuppa@opensolaris:~$ pfexec zpool status
pool: datapool
state: ONLINE
scrub: none requested
config:

NAME STATE READ WRITE CKSUM
datapool ONLINE 0 0 0
c7t0d0 ONLINE 0 0 0

errors: No known data errors

pool: rpool
state: ONLINE
scrub: none requested
config:

NAME STATE READ WRITE CKSUM
rpool ONLINE 0 0 0
c7t2d0s0 ONLINE 0 0 0

errors: No known data errors
cuppa@opensolaris:~$
Comparing the two outputs, it shows the device 'c7t4d0' is not used and therefore the new drive.

Adding it as mirror is straightforward:

pfexec zpool attach datapool c7t0d0 c7td4d0

Final product:

cuppa@opensolaris:~$ pfexec zpool status datapool
pool: datapool
state: ONLINE
scrub: none requested
config:

NAME STATE READ WRITE CKSUM
datapool ONLINE 0 0 0
mirror ONLINE 0 0 0
c7t0d0 ONLINE 0 0 0
c7t4d0 ONLINE 0 0 0

errors: No known data errors
cuppa@opensolaris:~$




WARNING: If you got the order of drive names wrong, you risk overwriting all your data!!! Be careful.

Friday, November 27, 2009

On Compiling OCaml

I just finished compiled OCaml from source on Opensolaris (2009.06), the latest version at this time of writing is 3.11.1.

The steps are straight-forward except one catch: The build is dependent on gcc and gnu make. In fact the default 'make' program that comes with Solaris won't work.

Solution is simple: go to www.blastwave.org and download the relevant packages. Just follow their instructions and you should be fine. :)

On an unrelated note, I miss her again but don't have anyway to contact her anymore... :(

FreeBSD 8 is Out

Production-grade FreeBSD 8 is released, and I have found FreeBSD more and more attractive as the OS of choice for my home server (as compared to OpenSolaris). Slashdot has a comprehensive coverage for it here with reviews, upgrade instructions, and screenshots.

So far I have not seen much development in OpenSolaris: the latest snv_128 snapshot cannot even boot on my amd64 system, so i am stuck with the 2009.06 of OS.

FreeBSD has added some interesting features, and ZFS is one of them. Unfortunately FreeBSD only supports up to version 13 of the ZFS, while my data is stored in version 14 format and this is an issue. Any slight mistake in migration will see all my data gone, which is something I hate to see happening.

I am still considering the relative merits of migrating to FreeBSD, the adding of more and more GNU tools and greater Linux compatibility has made this Unix quite a strong contender as desktop OS.

On the other hand, my current OpenSolaris setup is working properly as a file and general purpose server. I have spent more and more time using it as opposed to my Windoze machine nowadays. So I have to give OpenSolaris due credit for its stability and performance.

BTW, there are movements to put Debian on the FreeBSD and OpenSolaris kernel, though these two ports don't seem to have much development nowadays.

Sunday, October 04, 2009

The Story of C, C++, and D

As programming languages evolves, we have seen the introduction of C++ over C. But wait, is 'evolve' the correct word to describe C++?

Choice of programming language has always been a pseudo-religious topic, proponents for language X will use only one and only one language i.e. X and the rest are either 'toy languages', or complain incessantly for the lack of features A, B, or C that exist for that particular language.

Case in point: C vs. C++, as recently someone in reddit asked about the merit of C++ in embedded systems. The result is predictable, soon the thread has been flooded with 400+ of comments, and it looks like 80% of people prefer C. C++ can only take a back seat with labels like 'obscure syntax', 'inefficient', etc. Though there are thoughtful responses, overall the discussion gives an impression a lot of language zealots who support C, never actually spend enough time to really learn C++ properly. What I mean is C++ was designed with specific design goals and problem domains in mind. If you treat C++ as a C with strong type-checking, then you (and presumably the C++ compiler) won't be too happy in the long run.

To make the matter even more fun, here comes the D language: some random reader has complimented this language on reddit and solicited for opinions. Again, language fanboys are up in arms, defend their beloved {c, c++, java, python, perl, whatever} and make their best shots to shoot down D. Personally I view D with reservations as it is still in a state of flux. Investing time and resource in an experimental language is pretty risky, let alone D is in a rather awkward position of having 2 'standard' libraries (Phobos and Tango) and two versions: D 1.0 is so-called the stable branch while D 2.0 is experimental.

For a beginner like me, I am confused. Since D 2.0 is different from the core D 1.0 language, to me learning D 1.0 doesn't really worth my time and energy. On the other hand, D 2.0 is still under development, and the best strategy is to sit and wait until there is a stable D language spec.

Ah, but don't forget C++ is also undergoing some major uplifting: the C++0x is not yet formally approved yet, therefore the 'x' denotes the year where this new spec is being approved. A lot of people think it would be 2010, so it will be C++010, or C++0xA in hex. However, C++0x so far only adds features and it doesn't have any major change that will affect the current C++ code bases.

Now, back to the question: if I want a programming language that is relatively stable and usable for my jobs on hand, what language should I turn to?

Too bad, I can only go for C. Therefore, I declare C++ sucks! D sucks! :P haha

Thursday, September 03, 2009

Should I should I (Part 2)

Though these days most of my blog posts are about my personal stuff and I grumbled like an old man, I did have an (engineer's) life, listed below.

  • Opera 10 debutted a couple days ago and it seems sexy. You must heard about Opera, right? No, you mean you don't know there is a browser as good as Opera? Then click on the link and go take a look. The size is comparatively small (~10MB) and installations were painless for my Windoze and Linux machines. The most important thing for me is this is the first time I can finally see the blogspot interface being rendered correctly with no missing features.
  • Snow leopard is out. Apple has pushed the new OS X ahead of Windows 7  to steal the show. From the user point of view, there aren't many new features, but internally,  changes aplenty(e.g. moving a major portion of the kernel to 64bit). These changes not necessarily are crucial or useful to most of the users _now_, but these are obviously plan-ahead that will serve as a more liberating foundation for OS X in the future. John Siracusa from Ars Technica has done an extensive, excellent review which covers many topics, include the user interface, kernel internals, compilers, and multi-threading on the big cat. It is an interesting read if you are into technical stuff (if you think my blog is interesting, then you will like that article). The link is here.
  • After reading what Snow Leopard is capable to do, it is extremely tempting for me to get a Mac to play with. So, again, my question this time is: Should I get a Mac? :P

Going back on some softer subject, just now my gf called and told me her female friend has already talked about wedding, despite she and her boy friend only know each other for less than 2 months. As usual, my gf asked me why we were so 'slow'. Well, proposing for wedding isn't hard, the key is you need both persons to say 'I do'... Right place, right time,  wrong person....


Sunday, July 26, 2009

How to Send Binary File to Serial Port Under Linux

Recently I need to send a binary file to a device connected to the serial port of my PC. Under windows I can use the 'send binary file' in teraterm, how about under minicom?

The solution is simple, if your serial port is COM1:

cat [filename] > /dev/ttyS0

Or if you are using some kind of USB to serial converter:

cat [filename] > /dev/ttyUSB0

Note: The number could differ depending on your system configuration, it could be /dev/ttyUSB4 for example. To check what is the number, do a 'ls -l /dev/ttyUSB*'

Sunday, May 31, 2009

Always better with windows?

Asus and Microsoft think so, after launching a campaign "It's Better With Windows". Link here.

I feel so glad I didn't buy Asus laptops.

Saturday, May 02, 2009

The No No-Script Saga

I was a user of the firefox add-on No-Script for sometime, until I found it updated itself too frequently (about once per week), was too intrusive for web surfing, and was not very useful (i.e. blocks everything blindly). I removed this add-on about 3 months ago.

Then I came across this news about its frequency of updating is tied to ad-revenue (after every update it will open a 'change log' fully loaded with ads), and its numerous attempts to cripple another ad-blocking add-on, Adblock Plus.

For ad-blocking purpose, my firefox has the following add-ons, which I am quite happy with:

AdBlock Plus
Better Privacy
FlashBlock

I do sympathize the author of No-Script, he has put in tremendous amount of time and resources in the add-on and it is understandable he tries to get some money back from the user base he has had. However he used the wrong approach, which breaks the trust and very well will kill No-Script.

Saturday, April 25, 2009

Useful tool for MSN live messenger

I use MSN Live messenger quite regularly at home and I really don't like the advertisements flashed at the bottom of the messenger panel, they are way too distracting.

A quick google search has revealed a tool called A-Patch. This is a small and simple Windows utility and it has a few additional options on top of disabling the ads.

A nice tool :)