Evernote for Linux

Evernote

Evernote is an awesome app for note taking but unfortunately it isn’t available for Linux yet. So, we can use the Evernote web app as a standalone application using the GNOME web app launcher. Since the Evernote web app is pretty clean, you don’t feel a difference at all.

From Gnome 3.10 onwards, you can launch any web app without the usual browser menus. Two browser currently supports this:

  • Epiphany (Gnome Web)
  • Chrome

Epiphany isn’t a shinny browser like Google Chrome and Firefox. It doesn’t render some pages correctly. And Firefox doesn’t support web app launchers yet. So, I recommend the Google Chrome for this job.

Chrome
1) Go to your Evernote home page (usually https://www.evernote.com/Home.action).
2) In Chrome, Click “Settings -> More tools -> Create application shortcuts…”.
3) It’ll create the necessary Desktop entry and Application Menu entry in the user’s home directory. Just click “Create“.
4) It’ll use the web app’s favicon as the Application Icon which has low resolution and not good.
5) So, to change the application icon, download the evernote icon from the internet (https://cdn4.iconfinder.com/data/icons/free-colorful-icons/360/evernote.png).
6) Go to user’s application settings directory :
cd ~/.local/share/applications/
7) Find the .desktop file which starts with “chrome” as prefix and “evernote” in the file name like “chrome-https___www.evernote.com_Home.action_2.desktop“.
8) Replace the “Icon=” entry’s value with the newly downloaded icon’s path.
9) Just logout and login.
10) Search for Evernote in your GNOME Activities, you’ll get a fancy Evernote app in your menu.

Note : I’m using Fedora 21 with GNOME 3.14.2 on it.

Advertisements

How to fix the wireless network issues in Fedora?

Issue 1 : NetworkManager asks password each time (even password is saved) when you connect to enterprise wireless network.

Does you fedora (NetworkManager) asks the password each time even when you saved it? I’m also faced it with my ThinkPad Edge (Fedora 20) and found a workaround to fix it.

Continue reading “How to fix the wireless network issues in Fedora?”

Optimize Fedora Booting Process

When I’m checking the performance of my fedora, I found that my fedora takes 36 seconds to boot completely which is double the value of expected (15s) boot-up time. I decided to optimize my fedora boot process to achieve the standard boot-up time.

* Install the ‘systemd-analyze’ package :
$ yum install systemd-analyze

* Check the total boot time :
$ systemd-analyze time | tee total-boot-time.log

Output should look like :
Startup finished in 3167ms (kernel) + 4318ms (initramfs) + 29511ms (userspace) = 36998ms

* Kernel took 3 secs
* RAM Disk took 4 secs
* Userspace programs took nearly 30 secs

We can optimize the userspace programs first.
Note : ‘tee’ command prints & copies the output to a file (for comparison purpose).

* Check the detailed boot time :
$ systemd-analyze blame | tee detailed-boot-time.log

Output should look like :
10583ms udev-settle.service
4762ms fedora-loadmodules.service
3857ms NetworkManager.service
3300ms avahi-daemon.service
2794ms systemd-binfmt.service
2571ms fedora-storage-init.service
1942ms media.mount
1922ms systemd-vconsole-setup.service
1911ms sys-kernel-debug.mount
1894ms dev-hugepages.mount
1863ms fedora-storage-init-late.service
1862ms dev-mqueue.mount
1657ms fedora-readonly.service
1643ms mdmonitor-takeover.service
1587ms udev-trigger.service
1580ms home.mount
1534ms udev.service
.....

To plot these output to a graph :

$ systemd-analyze plot > boot-graph.png

fedora-boot-up-time-graph-before-change
Fedora boot-up time graph

* Find the failed boot process & fix it :
$ systemctl --failed

Output should look like :
UNIT LOAD ACTIVE SUB JOB DESCRIPTION
systemd-tmpfiles-clean.service loaded failed failed Cleanup of Temporary Directories
systemd-tmpfiles-setup.service loaded failed failed Recreate Volatile Files and Directories
tcsd.service loaded failed failed LSB: Init script for TCSD
vmware.service loaded failed failed SYSV: This service starts and stops VMware services

To fix these failed services, check the status of each one which gives the reason for the failure.

For example :
$ systemctl status systemd-tmpfiles-clean.service
systemd-tmpfiles-clean.service - Cleanup of Temporary Directories
Loaded: loaded (/usr/lib/systemd/system/systemd-tmpfiles-clean.service; static)
Active: failed (Result: exit-code) since Mon, 22 Oct 2012 12:33:18 +0530; 57min ago
Docs: man:tmpfiles.d(5)
Main PID: 2745 (code=exited, status=1/FAILURE)
CGroup: name=systemd:/system/systemd-tmpfiles-clean.service

Oct 22 12:33:18 fedora systemd-tmpfiles[2745]: [/etc/tmpfiles.d/jetty.conf:1] Unknown user 'jetty'.
Oct 22 12:33:18 fedora systemd-tmpfiles[2745]: stat(/run/user/sriram/gvfs) failed: Permission denied

$ [[email protected] ~]$ sudo /usr/bin/systemd-tmpfiles --create --remove
[/etc/tmpfiles.d/jetty.conf:1] Unknown user 'jetty'.

Then, I reinstalled the jetty package which fixed ‘jetty’ user issue.

* Disable the unnecessary services (including non-native services) :

$ systemctl disable mdmonitor.service mdmonitor-takeover.service fcoe.service lldpad.service vmware.service iscsid.service iscsi.service tcsd.service livesys.service livesys-late.service lvm2-monitor.service spice-vdagentd.service

mdmonitor & mdmonitor-takeover – service for RAID devices
fcoe & lldpad – Fiber Channel Over Ethernet service
iscsi & iscsid – service for iSCSI devices
tcsd – Trusted Computing Service
livesys & livesys-late -service for live CD

Again I removed few more services
$ systemctl disable jetty.service sendmail.service ip6tables.service vmware-USBArbitrator.service

* Check the performance again by doing step 2 & 3. :

After these above steps, improved the performance in userspace by 6 secs.
>> Startup finished in 3164ms (kernel) + 4571ms (initramfs) + 22200ms (userspace) = 29937ms

But my expectation was, kernel : 3secs, initramfs : 3secs, userspace programs : 15 secs

If you are not using LVM, RAID or Multipath, then disable the udev-settle, fedora-storage-init, fedora-storage-init-late & fedora-wait-storage services.
$ systemctl mask fedora-wait-storage.service fedora-storage-init-late.service fedora-storage-init.service udev-settle.service
$ systemctl disable plymouth-start.service avahi-daemon.service

Remove abrt completely
$ yum remove abrt*

Advanced Optimization : Skipping RAM disk
Kernel can boot directly from an ext4 partition without initramfs.
Comment the initrd line and add these parameter ‘root=/dev/sda3 rootfstype=ext4’ to your kernel
linux /boot/vmlinuz-3.6.2-4.fc17.i686.PAE root=/dev/sda3 rootfstype=ext4 libahci.ignore_sss=1 raid=noautodetect ro rd.luks=0 rd.lvm=0 rd.md=0 rd.dm=0 KEYTABLE=us SYSFONT=latarcyrheb-sun16 LANG=en_US.UTF-8
#initrd /boot/initramfs-3.6.2-4.fc17.i686.PAE.img

>> Startup finished in 4389ms (kernel) + 22460ms (userspace) = 26850ms

So, Boot-up time reduced upto 10 secs.

Fedora Boot-up time graph after optimization
Fedora Boot-up time graph after optimization

* More Aggressive Optimization :
1) Disable SELinux and auditing services
2) Mask fedora-autoswap.service fedora-configure.service fedora-loadmodules.service fedora-readonly.service
3) Don’t use debug kernels
4) Don’t use LVM

“Cannot open font file True” in Fedora

When you start the fedora 16/17, it will show you an message “Cannot open font file True” in boot screen for few seconds. To fix this, we need to change the sysfont to default.
Steps :
1) Open the grub configuration
** sudo vi /etc/default/grub
2) Update the SYSFONT to latarcyrheb-sun16 and save the file.
** Look for "SYSFONT=True" and replace it with "SYSFONT=latarcyrheb-sun16"
3) Generate the grub configuration
** sudo grub2-mkconfig -o /boot/grub2/grub.cfg

Bugzilla URL : https://bugzilla.redhat.com/show_bug.cgi?id=799401

Enabling Broadcom Wireless driver in Fedora

[[email protected] ~]$ lspci -vnn | grep 14e4
02:00.0 Network controller [0280]: Broadcom Corporation BCM4312 802.11b/g LP-PHY [14e4:4315] (rev 01)

System Log :
[18.972382] b43-phy0: Broadcom 4312 WLAN found (core revision 15)
[ 18.974202] cfg80211: World regulatory domain updated:
[ 18.974205] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[ 18.974208] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 18.974210] cfg80211: (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[ 18.974212] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[ 18.974215] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 18.974217] cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 18.979359] input: HP WMI hotkeys as /devices/virtual/input/input12
[ 18.997954] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[ 18.998141] Registered led device: b43-phy0::tx
[ 18.998159] Registered led device: b43-phy0::rx
[ 18.998177] Registered led device: b43-phy0::radio
[ 18.998190] Broadcom 43xx driver loaded [ Features: PMNLS ]
.....
[ 23.261059] b43-phy0 ERROR: Firmware file "b43/ucode15.fw" not found
[ 23.261063] b43-phy0 ERROR: Firmware file "b43-open/ucode15.fw" not found
[ 23.261065] b43-phy0 ERROR: You must go to http://wireless.kernel.org/en/users/Drivers/b43#devicefirmware and download the correct firmware for this driver version. Please carefully read all instructions on this website.
[ 23.278668] r8169 0000:03:00.0: p3p1: link down
[ 23.279031] ADDRCONF(NETDEV_UP): p3p1: link is not ready
[ 23.297889] 8021q: 802.1Q VLAN Support v1.8
[ 26.179007] r8169 0000:03:00.0: p3p1: link up
[ 26.179300] ADDRCONF(NETDEV_CHANGE): p3p1: link becomes ready

My kernel version : 3.1.0-7.fc16.i686

1) Install b43-fwcutter and broadcom-wl

2) Download and extract the firmware from “http://mirror2.openwrt.org/sources/broadcom-wl-5.10.56.27.3_mipsel.tar.bz2”

3) sudo b43-fwcutter -w “/lib/firmware/” ~/broadcom-wl-5.10.56.27.3/driver/wl_apsta/wl_prebuilt.o

After this, your firmware is loaded automatically.

Refer this : http://wireless.kernel.org/en/users/Drivers/b43#devicefirmware

Wireless Issue with Thinkpad E420 in Fedora

When switching ON the Wireless on Fedora 16 (Lenova ThinkPad E420) with RealTek WiFi Adapter, it’ll automatically gone back to OFF (Inactive) state.

Exact Log message from /var/messages :


Dec 30 14:51:26 fedora NetworkManager[886]: (wlan0): bringing up device.
Dec 30 14:51:26 fedora NetworkManager[886]: NetworkManager[886]: (wlan0): bringing up device.
Dec 30 14:51:26 fedora kernel: [ 6147.716574] rtl8192c_common: Loading firmware file rtlwifi/rtl8192cfw.bin
Dec 30 14:51:27 fedora kernel: [ 6148.061711] ADDRCONF(NETDEV_UP): wlan0: link is not ready
Dec 30 14:51:27 fedora NetworkManager[886]: NetworkManager[886]: WiFi hardware radio set enabled
Dec 30 14:51:27 fedora NetworkManager[886]: WiFi hardware radio set enabled
Dec 30 14:51:27 fedora NetworkManager[886]: WiFi now enabled by radio killswitch
Dec 30 14:51:27 fedora NetworkManager[886]: NetworkManager[886]: WiFi now enabled by radio killswitch
Dec 30 14:51:27 fedora NetworkManager[886]: (wlan0): supplicant interface state: starting -> ready
Dec 30 14:51:27 fedora NetworkManager[886]: (wlan0): device state change: unavailable -> disconnected (reason 'supplicant-available') [20 30 42]
Dec 30 14:51:27 fedora NetworkManager[886]: NetworkManager[886]: (wlan0): supplicant interface state: starting -> ready
Dec 30 14:51:27 fedora NetworkManager[886]: NetworkManager[886]: (wlan0): device state change: unavailable -> disconnected (reason 'supplicant-available') [20 30 42]
Dec 30 14:51:27 fedora NetworkManager[886]: (wlan0): supplicant interface state: ready -> inactive
Dec 30 14:51:27 fedora NetworkManager[886]: NetworkManager[886]: (wlan0): supplicant interface state: ready -> inactive
Dec 30 14:51:28 fedora NetworkManager[886]: WiFi now disabled by radio killswitch
Dec 30 14:51:28 fedora NetworkManager[886]: (wlan0): device state change: disconnected -> unavailable (reason 'none') [30 20 0]
Dec 30 14:51:28 fedora NetworkManager[886]: (wlan0): deactivating device (reason 'none') [0]
Dec 30 14:51:28 fedora NetworkManager[886]: NetworkManager[886]: WiFi now disabled by radio killswitch
Dec 30 14:51:28 fedora NetworkManager[886]: NetworkManager[886]: (wlan0): device state change: disconnected -> unavailable (reason 'none') [30 20 0]
Dec 30 14:51:28 fedora NetworkManager[886]: NetworkManager[886]: (wlan0): deactivating device (reason 'none') [0]
Dec 30 14:51:28 fedora NetworkManager[886]: Policy set 'Wired connection 1' (p1p1) as default for IPv4 routing and DNS.
Dec 30 14:51:28 fedora NetworkManager[886]: NetworkManager[886]: Policy set 'Wired connection 1' (p1p1) as default for IPv4 routing and DNS.
Dec 30 14:51:28 fedora NetworkManager[886]: Policy set 'Wired connection 1' (p1p1) as default for IPv4 routing and DNS.
Dec 30 14:51:28 fedora NetworkManager[886]: NetworkManager[886]: Policy set 'Wired connection 1' (p1p1) as default for IPv4 routing and DNS.
Dec 30 14:51:28 fedora NetworkManager[886]: (wlan0): taking down device.
Dec 30 14:51:28 fedora NetworkManager[886]: NetworkManager[886]: (wlan0): taking down device.
Dec 30 14:51:28 fedora lldpad[956]: l2_packet_receive - recvfrom: Network is down.

Check the state of the rfkill switches (WiFi switch) :

[[email protected] ~]$ rfkill list
0: tpacpi_bluetooth_sw: Bluetooth
Soft blocked: yes
Hard blocked: no
3: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no
4: acer-wireless: Wireless LAN
Soft blocked: yes
Hard blocked: no

Then you need to add the acer-wmi to the blacklist to clear this problem (soft blocked state).

To check whether this solution works or not, please run this :

sudo modprobe -r acer_wmi

If you got the wireless networks back, then you can add this following line to the /etc/modprobe.d/blacklist.conf file :

blacklist acer_wmi

This will permanently solve the wireless problem after a reboot.