Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

Tuesday, September 12, 2017

Sublime Text 2 in Ubuntu 12 04

Sublime Text 2 in Ubuntu 12 04



Ive been using Sublime Text 2 to edit my code for long time now and I cant get enough of it. The black layout is amazing for the eyes and the functionality is as good as it gets. I have had minor issues installing it on Ubuntu 12.04 however. The following steps should solve the issue.
1. Download the tar, locate the directory in terminal and execute
$ tar xf "Sublime Text 2 Build 2181 x64".tar.bz2
This will create a directory Sublime Text 2.
2. Move the folder into /usr/lib/


$ sudo mv "Sublime Text 2" /usr/lib/
This will move the Sublime Text 2 files.
3. Make Sublime Text launchable from the terminal
$ sudo ln -s /usr/lib/"Sublime Text 2"/sublime_text /usr/bin/sublime
At this point, typing sublime in the terminal will launch the application. If you want to have a link to Sublime in the Unity menu bar, simply launch the application and right-click on the icon and select Lock in Launcher.
If you fancy opening all your text files with Sublime Text 2, execute the following:
$ sudo sublime /usr/share/applications/defaults.list
Search for all occurences of gedit.desktop and change them to sublime.desktop
This will essentially change the default application for text files from gedit to Sublime.

Happy hacking!

download file now

Read more »

Friday, September 8, 2017

Sublime Flatland Installation Script For Ubuntu

Sublime Flatland Installation Script For Ubuntu


Flatland is my favourite theme for Sublime, and everything I do has to be automated as much as possible, so I made an installation script

Script

Execute the following command:

curl -s http://scripts.programster.org/scripts/6/1?output=raw | bash

... or run the following script with bash:


#!/bin/bash
mkdir /tmp/install-sublime-theme
cd /tmp/install-sublime-theme

wget https://github.com/thinkpixellab/flatland/archive/master.zip

unzip master.zip

mv flatland-master "/home/$USER/.config/sublime-text-3/Packages/Theme - Flatland"

# clean up
/tmp/install-sublime-theme

# One day I may get bash to check for and overwrite these attributes
# but for now just tell the user what to do manually.
echo ""
echo "======================= copy lines below ===================="
echo "theme": "Flatland Dark.sublime-theme",
echo "color_scheme": "Packages/Theme - Flatland/Flatland Dark.tmTheme"
echo "============================================================="
echo "Now update the settings file using the command below and add/overwrite the following two properties"
echo subl /home/$USER/.config/sublime-text-3/Packages/User/Preferences.sublime-settings

References

  • Flatland Github Repo

download file now

Read more »

Saturday, August 26, 2017

Success! Symphony Gofox F15 ADB connection working under Ubuntu!

Success! Symphony Gofox F15 ADB connection working under Ubuntu!


Recently I bought a Symphony Gofox F15 Firefox OS phone that is available in Bangladesh for $60 (4650 BDT). I bought a used one from bikroy.com with 3100 BDT. It is not a very appreciable set in terms of performance but it works. It is a Firefox OS 1.4 phone having 512mb RAM & ROM that gets a bit slow on heavy usage.

As a Web Developer myself I am thrilled that an entire mobile phone can be operated from browsers. If you are new to the trend, everything you see on FFOS is running on browsers, every button that you click is a <a> or <button> tag, every image that you see is either CSS or an <img> tag. So the OS takes very less RAM and resources to run, on theory.

But I must admit, some features are very well thought and they are way ahead compared to some earlier versions of Android. The 2.0 version also comes with a brilliantly designed UI thatll impress you for sure.

The good fun in ADB connection is the fact that you can run the app, debug it, touch different elements and inspect it in real time from your desktop PC! You can even modify styles of app drawer in an instant and with only changing some good old CSS codes.

As you expect, as it is less used in Bangladesh, I couldnt find the appropriate drivers for the phones ADB connection. Although Mass storage worked right out of the box. The conclusion is, in Windows (both 32 & 64 bit) I failed to load it in WebIDE. But I succeeded in Ubuntu. Heres how I did it:

Connecting Gofox F15 for ADB/WebIDE in Ubuntu:

Step 1: Prepping the Ubuntu:

1. Created an udev rule for the device.
First ran the command on terminal:
sudo gedit /etc/udev/rules.d/51-android.rules
Then added the following code in the file and saved:
SUBSYSTEM=="usb", ATTRS{idVendor}=="1782", MODE="0666"
(I got the 1782 value from running lsusb command.)

2. Now run:
sudo service udev restart

Step 2: Prepping Firefox Desktop:

1. Got the latest Firefox Nightly for Linux (currently version 38) from here
Earlier versions are less likely to work. It is best to get the latest possible version.
Get the Firefox tar file, extract it in a directory like this:
cd ~
mkdir Apps
cd Apps
tar xvf path/to/firefox-xxx.tar
(I have created and chosen the "Apps" directory. You can use any directory you want.)

2. Installed the ADB Helper
from here: https://ftp.mozilla.org/pub/mozilla.org/labs/fxos-simulator/

Step 3: Prepping the Phone:

1. Turned on the USB Storage option from Settings
2. Disabled Screen Lock from Settings -> Screen Lock (Because if the screen lock comes, the debug bridge will be stopped.)
3. Most importantly, enabled Developer menu, Settings -> Device Information -> More Information and checked "Developer Menu". A Developer item is now revealed in the Settings.
Then enabled ADB option from Settings -> Developer -> Remote Debugging -> ADB and Devtools.

Step 4: Bridging the ADB:


1. Found a good cable from another phone and conneted with it. The cable given in the box does not work. Also sometimes, I heard, using a USB port directly on the motherboard helps. But I used extension cord and still got connection. I was lucky!


2. Started Firefox Nightly (from home/Apps/firefox) and opened about:app-manager through the addressbar. It showed a button with a strange number at the bottom. I clicked on it. It showed some errors, like this:
12:34:56: connection error. Possible causes: USB port not connected, port not forwarded (adb forward), wrong host or port, remote debugging not enabled on the device.


3. Out of curiosity I ignored the message and then tried opening the WebIDE (from Firefox menu -> Developer -> WebIDE.) and it showed the device in the Menu on the right side! This time it also showed the strange number, not exactly the device name (S32SV2B000010123). But I clicked on it anyway.

(After requesting connection with the device, there will be a message in your phone asking whether you want your Desktop to connect with your phone. Tap on OK button on your phone when it comes.)

Surprisingly, it connected!

4. I disabled and re-enabled ADB from Settings, started Firefox Nightly, plugged in the phone, started WebIDE and voila! It came with the right name!

Here goes a screenshot to my success!


Remarks:

1. Use shorter cable if possible
2. Use a good quality cable
3. Connect it directly in the USB port of motherboard
4. Try enabling and disabling ADB option if doesnt get detected
5. Use this page to troubleshoot .

Anytime I wanted to connect, I just followed the point 4 under step 4.

Now I can create Apps in my Firefox browser and run it directly on my phone! yayy!

Help & ref:
https://bugzilla.mozilla.org/show_bug.cgi?id=936909
https://developer.mozilla.org/en-US/docs/Tools/WebIDE/Troubleshooting

download file now

Read more »

Sublime Text PyV8 problem in Ubuntu 14 10 with Emmet

Sublime Text PyV8 problem in Ubuntu 14 10 with Emmet


After installing the Emmet plugin, I got error messages that the PyV8 is not working. I tried everything that google provided in search results, but the working solution was utterly shocking...

Although I have a 64bit Ubuntu installed, I had to manually install the 32 bit version of PyV8 from here: https://github.com/emmetio/pyv8-binaries

download file now

Read more »

Sunday, August 20, 2017

Struggling to stay focused on your Work This App Might Help Ubuntu PPA

Struggling to stay focused on your Work This App Might Help Ubuntu PPA


Ambient Noise is a very clean implementation of a simple idea that will help you stay focused on your work while on the computer. And it integrates well with your Ubuntu sound menu. Care to learn more? Read on.


ambient noise ubuntu ppa

Ambient Noise for Ubuntu PPA (Ubuntu 15.10, Ubuntu 15.04, Ubuntu 14.04)

Listen to the sounds of nature and relax yourself. Ambient Noise is a no non-sense application that is capable of playing a wide variety of sounds from nature non-stop and without much fuss. The idea behind Ambient Noise might be simple, but such is the nature of extremely popular apps, that can also have a profound impact on your work habits. Selection of sounds include rain, storm, coffee shop, forest, night, wind and fire.

Installation is super easy. Just do the following in Terminal.

sudo add-apt-repository ppa:costales/anoise
sudo apt-get update
sudo apt-get install anoise

After completing the installation, launch the Ambient Noise application from Ubuntu menu. Thats it. The app sits nicely in your sound menu and you can skip, pause and play through the preloaded sounds from the Unity sound menu. Ambient Noise works in offline mode as well.

relaxing music app ubuntu

And guess what, you can download even more sounds from the ANoise Preferences window. I have to concede that Im enjoying this app more than any other supposedly relaxing music Ive in my playlist. And my favorites are rain and storm modes. If you want to support the project, do visit ANoise homepage. Thanks for reading. 

download file now

Read more »

Saturday, August 19, 2017

Stylish Styles for Ubuntu Forums How to Change the Look of UF

Stylish Styles for Ubuntu Forums How to Change the Look of UF


The overall theme and appearance of the official Ubuntu Forums was revamped recently to match the current Ubuntu branding. Now, it features quite a heavy, orange-coloured header, an orange-coloured navigation bar as well as orange-coloured buttons and an Ubuntu-branded element set. While there are many who are amazed by the new look of the Ubuntu Forums, there are quite a few who don't like this shiny, glowing and quite unfinished* look.

For the latter group, including myself and Krytarik, the 'Stylish' browser add-on is all that is needed to tweak the look of the Ubuntu Forums, or any other website as well, for that matter. Krytarik has created two 'Stylish' styles for the Ubuntu Forums, a light one and a dark one. You can choose any of these and you can also edit the styles to match your liking.

*) added by Krytarik

Ubuntu Forums DefaultKrytarik LightKrytarik Dark

Setup

Continue Reading �

download file now

Read more »

sudo with out asking password in Ubuntu Debian Linux

sudo with out asking password in Ubuntu Debian Linux


How to sudo with out asking password in Ubuntu / Debian Linux
open a terminal 
 
$ sudo visudo
 
Now Add this line at the end (change �panayara� to your username):

panayara ALL=(ALL) NOPASSWD: ALL
 
Ctrl-X to leave, save your changes, and youre done!

download file now

Read more »

Tuesday, August 8, 2017

sudo on ubuntu

sudo on ubuntu


Here are  some sudo   variations I use. (Be careful :) )

    sudo command - run command as root
    sudo su � root shell open
    sudo su user � open shell as a user
    sudo -k � forget your password sudo
    gksudo command � sudo visual dialog (GNOME)
    kdesudo command � sudo visual dialog (KDE)
    sudo visudo � edit / etc / sudoers
    gksudo nautilus � root file manager (GNOME)
    kdesudo konqueror � root file manager (KDE)

download file now

Read more »

Tuesday, August 1, 2017

Switch from Unity to Gnome in Ubuntu 11 10

Switch from Unity to Gnome in Ubuntu 11 10


Enter the following command in Terminal,


sudo /usr/lib/lightdm/lightdm-set-defaults -s gnome-shell
 
Reboot PC. 

download file now

Read more »