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

Saturday, August 10, 2019

How to change Linux swap partition to different disk...

The scenario:
I have two hard disks on my laptop,
- 256 GB SSD (nvmeOn1)
- 1 TB HDD (sda)

Installed Ubuntu, below is how my partition table looks like:
nvmeOn1
        EFI                                  100 MB
        Microsoft reserved partition          16 MB
        Basic data partition              217.35 GB
        /                                     20 GB
        Recovery                               1 GB
        Unallocated                        14.34 MB

    sda
        Basic data partition              465.76 GB
        /opt                                9.54 GB
        /usr                               37.96 GB
        linux-swap                             6 GB
        /home                             412.26 GB

I want to change swap partition from HDD to SSD. Here's the steps:
1. Boot the machine with Ubuntu Live USB
2. Delete existing linux-swap partition on HDD (Resize any existing partition to make use this new unallocated partition)
3. Resize / partition on SSD to make space for new swap partition
4. Create new swap partition
5. Shutdown, remove Ubuntu Live USB and restart the machine
6. Now in Ubuntu, open terminal and run the command below
$ sudo blkid

    # output would be something like this
    /dev/nvme0n1p6: UUID="581446b5-7fab-46b0-ba3a-569c0fc42be3" TYPE="swap" PARTUUID="646e1aba-ebff-40e7-86c2-155211f485d5"

7. Look for "swap" and copy UUID from the newly created swap partition
8. Edit /etc/fstab file by running command below (don't forget to backup first)
$ sudo nano /etc/fstab

9. Replace the old UUID for swap with the new one.
10. Save the file and reboot the machine.

To verify, we can use free command
$ free

    # output
                  total        used        free      shared  buff/cache   available
    Mem:       32774452     1315660    30136320       34844     1322472    31009776
    Swap:       6292476           0     6292476

Or swapon -s command
$ swapon 0s

    # output
    Filename    Type  Size Used Priority
    /dev/nvme0n1p6                          partition 6292476 0 -2

This is how my new partition table looks like:
nvmeOn1
        EFI                                  100 MB
        Microsoft reserved partition          16 MB
        Basic data partition              217.35 GB
        /                                     14 GB
        linux-swap                             6 GB
        Recovery                               1 GB
        Unallocated                        14.34 MB

    sda
        Basic data partition              465.76 GB
        /opt                                9.54 GB
        /usr                               43.96 GB
        /home                             412.26 GB

Sunday, August 4, 2019

Hello Disco Dingo, I'm back!




It's been a while since I last play around with Linux. Last version I used was Linux Mint 17.1. My Dell Studio XPS 16 overheated while my son played games on it. It's gone for good.

Last year, I bought an Acer Predator Helios 300 Special Edition. It's a nice laptop. I'm glad that it play nice with Linux. Found out that Canonical has ditched Unity and revert back to Gnome Shell.

It's a bit of a challenge to install Linux on this machine configuration at first, but once done everything is history. I will write how to's in my coming post. Stay tune.

Thursday, January 5, 2012

How to always use a text-based location bar in nautilus 3...

Open terminal and type the command below
    $ gsettings set org.gnome.nautilus.preferences always-use-location-entry true
To switch back
    $ gsettings set org.gnome.nautilus.preferences always-use-location-entry false

Friday, October 21, 2011

Ubuntu 11.10 basic GNOME Shell tweaks...

1) Install GNOME Shell and gnome-tweak-tool, then restart your machine and choose GNOME for your session
$ sudo apt-get install gnome-shell gnome-tweak-tool
2) Install Cantarell font
  • Download font from here
  • Copy font into /usr/share/fonts folder
  • Run command below:
$ sudo fc-cache -f -v
3) Gnome-tweak-tool settings
  • Desktop - turn off everything
  • Fonts:
    • Default font - Cantarell
    • Window title font - Cantarell Bold
  • Shell - Arrangement of buttons on the titlebar - All
  • GTK+ theme - Adwaita (default)

4) Remove overlay scrollbars
$ sudo apt-get remove overlay-scrollbar liboverlay-scrollbar3-0.2-0 liboverlay-scrollbar-0.2-0
5) Fix Alt+F2
  • Go to System Settings -> Keyboard -> Shortcuts -> System, remapping Alt+F2 to Show the run command prompt.

6) Disable Global Menu
$ sudo apt-get remove appmenu-gtk3 appmenu-gtk appmenu-qt
7) Change LightDM background via LightDM Manager
  • Download LightDM Manager from here.
  • Install dependencies (not sure why we need to do this manually on 11.10)
  • Install LightDM Manager
    $ sudo apt-get install python-launchpad-integration gtk2-engines-pixbuf
    $ sudo dpkg -i simple-lightdm-manager_0.2-public7_all.deb
8) Fix on Conky script to make it work with GNOME Shell (credit to sgaap)
    own_window_class Conky
    own_window yes
    own_window_type conky
    own_window_transparent yes
    own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

Thursday, October 20, 2011

Ubuntu sex command at man page...

LOL!!! nice joke of the day.

sex man page



oneiric (6) sex.6fun.gz
Provided by: funny-manpages_1.3-5_all

NAME
sex -- have sex

SYNOPSIS
sex [options] ... [username] ...

DESCRIPTION
sex allows the invoker to have sex with the user(s) specified in the
command line. If no users are specified, they are taken from the
LOVERS environment variable. Options to make things more interesting
are as follows:

-1 masturbate

-a external stimulus (aphrodisiac) option

-b buggery

-B animal
bestiality with animal

-c chocolate sauce option

-C chaining option (cuffs included) (see also -m -s -W)

-d file
get a date with the features described in file

-e exhibitionism (image sent to all machines on the net)

-f foreplay option

-F nasal sex with plants

-i coitus interruptus (messy!)

-j jacuzzi option (California sites only)

-l leather option

-m masochism (see -s)

and the list goes on...

Saturday, April 30, 2011

My 5 minutes on Ubuntu 11.04...

  • New UI looks nice (but I prefer the old one)
  • New style scrollbar makes me confuse a bit (but it's one of the good thing that I like)
  • Apps menu appear on top panel instead of on its own window (except for Libre Office apps)
  • Quick search for apps (very helpful if you know the name)
  • Unable to customize panel
  • Enabling desktop cube via ccsm will cause top panel and app launcher stop responding. Windows border disappear
  • Overall, I don't like it. I'm glad that I switched to LM last year.

Sunday, April 10, 2011

Batch process images plugin for Gimp...

To install
sudo apt-get install gimp-plugin-registry
If you prefer GUI installer, open Synaptic, search for gimp batch and mark for installation

Synaptic


To use the plugin, open Gimp and go to Filters -> Batch -> Batch Process... menu

GIMP batch process plugin


Add files to be process at Input tab

Input tab


Set value to whichever tab processes that you need and set the image type at Output tab (default is .bmp).

Resize tab


Click Start button.

Note:
Tested with GIMP v 2.6.10 on Linux Mint 64-bit.

Thursday, March 24, 2011

Installing Firefox 4 on Ubuntu...

1) Adding ppa to repositories
    $ sudo add-apt-repository ppa:mozillateam/firefox-stable
2) Update repository
    $ sudo apt-get update
3) Reinstall package to latest version
    $ sudo apt-get --reinstall install firefox
Note:
Tested on Ubuntu 10.04 32-bit and Linux Mint 10 64-bit.

Sunday, November 21, 2010

Customizing plymouth login screen background, fonts and gtk...

1) Open terminal, copy and paste the following command.
    $ sudo cp /usr/share/applications/gnome-appearance-properties.desktop /usr/share/gdm/autostart/LoginWindow
2) Close terminal and log out. Once at login screen you'll see an Appearance pop up. Make your changes and log in.

3) Now to disable Appearance pop up from login screen. Open terminal, copy and paste the following command.
    $ sudo unlink /usr/share/gdm/autostart/LoginWindow/gnome-appearance-properties.desktop
Note :
Tested on Ubuntu 10.04 and Linux Mint 10.

Monday, November 15, 2010

First Ubuntu and now Fedora, dumping X for Wayland...

When I first read about the news, as normal user I can't really tell what impact might hit to people like me. My understanding, it seems like there's a claim that X is too complicated, too slow, too filled with archaic junk and so on. That trigger the movement from X to Wayland, an OpenGL-based display management system.

I'm more concern about the apps that I love to use on Linux, because to run natively on Wayland it needs to be ported. Otherwise, it is stated that:
"If they don't, you can run a nested X server like on OSX. They'll still work as well as they ever did, and you even get to keep ssh [Secure Shell] forwarding of them. You can run a wayland server that does nothing but run a nested X server and you wouldn't ever know the difference."

Questions in my head:
  • How long will it take for all apps to get ported?
  • If need to run a nested X server, do I need to configure it myself?
  • With the hassle on the ported part (by developers of course) so that all apps can run natively on Wayland, is it going to improve graphical performance tremendously?
  • Since it is an OpenGL-based, is it going to improve gaming experience as well?

Changes are good but at what stake? If I hate to change, hell I'll just stick with Windows for the rest of my life. I don't mind learning, the advantages of using Linux are too enormous to be ignore. But if the change is too huge for me, I guess I'll stay on the safe side by reading more experience story by others. I'll do my best to avoid running a nested X server on Wayland because if I did that I personally feel it beats the purpose of the transition in the first place.

Wednesday, September 22, 2010

Kernel exploit on 64-bit Linux...

Linux is well-known for its security advantages over many other operating systems, but that doesn't mean it's immune to problems.

A Linux kernel flaw first discovered earlier this month, for example, gives hackers a way to not just gain root privileges in 64-bit Linux operating systems but also to leave a "back door" open for further exploitation later.

CVE-2010-3081, as the high-profile vulnerability is known, affects virtually all users of 64-bit Linux distributions, including RHEL, CentOS, Debian, Ubuntu, CloudLinux, SuSE and more. It was introduced into the Linux kernel back in 2008, and a hacker by the name of 'Ac1db1tch3z' last week published details on exploiting it.

Click here for more info.

Note:
Text copied from PCWorld news.

Tuesday, September 7, 2010

What's new in Ubuntu 10.10...

1) Simpler Installer.
Ubuntu 10.10 is expected to use a new installer that makes the installation process simpler than ever. Startup options are now placed right in the installer itself, and they include just two options: Try Ubuntu and Install Ubuntu. A simplified partitioner, meanwhile, lets users choose between automatically using the whole disk and manual partitioning, while a new Wireless Network Selection page will be added as well. These features will be particularly helpful for newer Ubuntu users.

My response:
I've started with 6.10 (Edgy Eft) and never felt it's difficult to install Ubuntu (it's the same 6 clicks process, except for the partitioning part might be a little bit tricky for newbie). Overall installing desktop Linux couldn't be more difficult than Windows unless if you're talking about pre Red Hat 7 era in 90s.

2) Processor Support.
It sounds like the Maverick Meerkat will not run on processors older than i686, or anything before Intel's P6 microarchitecture. For most business users this probably won't be an issue, but it could affect some occasional users of older machines.

My response:
I don't need to worry about this because I don't have that kind of old machine. :)

3) Default Environment and Applications.
Ubuntu 10.10 Beta uses version 2.6.35.3 of the Linux kernel, which includes numerous security enhancements over previous versions. It also updates the GNOME desktop environment to version 2.31.

Among application changes, meanwhile, is that Firefox 3.6.8 will be the default, as will OpenOffice 3.2.1, for example. Photo tool F-Spot has been replaced with Shotwell, while a new sound indicator has been enhanced to include music player controls.. The Evolution mail and collaboration software will be updated to the 2.30.2 version, which reportedly is much faster than the one in Ubuntu 10.04 LTS, or Lucid Lynx.

My response:
I never use F-Spot and Evolution mail. For image editing, Gimp is my preference. Sound indicator to include music player controls sounds cool to me.

4) The Ubuntu Software Center
In version 10.10, the Ubuntu Software Center--the tool for browsing, installing and removing software on Ubuntu--will gain "Featured" and "What's New" choice icons on the front page, along with a "History" tab displaying recently installed software. It is also said to be faster and more responsive. Taken together, these improvements promise to make it much easier to track and find new software options.

My response:
This should be interesting. Might change to this instead of Synaptic.

5) Multitouch
Making the biggest splash, of course, will be the new multitouch and gesture capabilities, which will apparently make it possible for basic gestures to be chained, or composed, into more sophisticated "sentences." Toward that end, Canonical has created an open source gesture recognition engine and defined a gesture API that provides a way for applications to respond to users' gestures.

Canonical is currently targeting the Dell XT2 as a development environment for this new feature, but by release it expects it to be compatible with a range of devices from major manufacturers, and with add-ons like Apple's Magic Trackpad. Needless to say, this will pave the way toward a host of new capabilities on the Linux desktop and beyond.

My response:
Unfortunately I don't have any hardware with the capability to benefit this feature.

Note:
Text copied 97% from PCWorld news with a reference to The Fridge.

Saturday, September 4, 2010

Huawei modem undetected on Ubuntu 10.04...

Scenario:
Plug-in modem, Ubuntu detect it as data storage only instead of modem. Only happen on Ubuntu 32bit, working as expected on 64-bit version.

Solution:
Install usb-modeswitch package.
    $ sudo apt-get install usb-modeswitch
Note:
Tested on Ubuntu 10.04 32-bit Desktop and Netbook Edition.

Thursday, August 26, 2010

Installing VMware Player 3.1.1 on Ubuntu 10.04...


Screenshots...



1) Install build-essential and linux-headers (for my case I skip this step because I had these two packages installed before)
$ sudo apt-get install build-essential linux-headers-`uname -r`
2) Change the installer mode
$ chmod +x ./VMware-Player-3.1.1-282343.x86_64.bundle
3) Execute the installer
$ gksudo bash ./VMware-Player-3.1.1-282343.x86_64.bundle
When popup appear, click Install.

Note:
Tested on Ubuntu 10.04 Lucid Lynx and Linux Mint 10 64-bit.

Update (20/11/2010)
Command to uninstall.
sudo bash vmware-installer -u vmware-player
Update (01/03/2011)
Tested VMWare Player 3.1.3 on Linux Mint 10 64-bit

Wednesday, August 25, 2010

Installing latest ATI display driver on Ubuntu...

Before start, please uninstall the previous version driver if there's any because the installer doesn't have the capability to auto uninstall. Otherwise proceed to installation step.

To uninstall, open terminal and run this command:
$ cd /usr/share/ati
    $ sudo sh ./fglrx-uninstall.sh
Then restart your machine.

To install, open terminal, go to the installer location and run this command:
$ sudo sh ./ati-driver-installer-.run
Follow the instruction. Once completed run this command:
$ sudo /usr/bin/aticonfig --initial
Restart your machine.

Note:
I did the installation process in "recovery mode". That's the only way the correct driver will get install. Otherwise it'll use the previous existing driver (sucks!!!).

Honestly, I hate ATI graphic card. The only reason I'm using it is because I urgently need a laptop and Dell doesn't have an option other than Mobility Radeon HD 4xxx series for it Studio XPS product line.

It's a shame that my ATI card with 1 GB memory can't even get the effects below to work but my NVidia 7600 GS with 256 MB memory perfectly can. ATI driver for Linux really sucks!!!!

1) Win 7 virtual machine on VMWare Player with Accelerate 3D graphics option on, is not working in fullscreen mode
2) Compiz Blur effect not working
3) Compiz Water effect not working
4) Compiz Fire effect not working

Update (28/03/2011)
I've been using CCC version 10.10 with driver packaging version 8.783 on Linux Mint 10 64-bit. So far it's the best driver. All the effect mentioned above working as expected (especially Gaussian blur). For VMWare machine with Aero effect to work on fullscreen, need to disable Compiz.

Update (11/10/2011)
For 64-bit installer to work, you must install the 32-bit library (ia32-libs).

Thursday, August 12, 2010

Ubuntu 10.04 on HP Mini 110, no wireless and audio from speakers...

Note (21/10/2011):
Settings below are not required for Ubuntu 11.10. Everything work out of the box.

Solution:
for wireless:
Download package from https://launchpad.net/~markus-tisoft/+archive/rt3090/+files/rt3090-dkms_2.3.1.3-0ubuntu0~ppa1_all.deb install and reboot.

for audio:
Run the command below then reboot
    $ sudo apt-get install linux-backports-modules-alsa-lucid-generic

Update 14/11/2010:
Just found out that after updating the system, wireless is broken again. To fix this, reinstall rt3090-dkms package.

Monday, August 2, 2010

Installing Subversion server on Ubuntu...

I need a source control in my local network. No need for fancy http or https. Custom svn protocol should be sufficient.

1) Install Subversion
    $ sudo apt-get install subversion
2) Create directory for my repository
    $ mkdir /home/dirn/svn
    $ cd /home/dirn/svn
    $ mkdir my-repo
3) Create repository by using svnadmin command
    $ sudo svnadmin create /home/dirn/svn/my-repo
4) Create a new group called subversion
    $ sudo groupadd subversion
5) Add your username and www-data into the group
    $ sudo usermod -a -G subversion www-data
    $ sudo usermod -a -G subversion user_name
6) Set permission
    $ cd /home/dirn/svn
    $ sudo chown -R www-data:subversion my-repo
    $ sudo chmod -R g+rws my-repo
7) Edit svnserve.conf file
    $ nano /home/dirn/svn/my-repo/conf/svnserve.conf
8) Uncomment the following line and save the file
    # [general]
# password-db = passwd
9) Edit passwd file
    $ nano /home/dirn/svn/my-repo/conf/passwd
10) Add your svn username and password and save the file
    username = password
11) Run svnserve service
    $ svnserve -d --foreground -r /home/dirn/svn
12) To access the project repository, run the following command
    $ svn co svn://hostname/my-repo my-repo --username user_name
Note:
Tested on Ubuntu 10.04 64-bit and Linux Mint 10 64-bit.

Wednesday, June 23, 2010

How to always use a text-based location bar in nautilus...

Open terminal and type the command below
    $ gconftool-2 --type=Boolean --set /apps/nautilus/preferences/always_use_location_entry true
To switch back
    $ gconftool-2 --type=Boolean --set /apps/nautilus/preferences/always_use_location_entry false

Thursday, June 10, 2010

How to fix plymouth bootup resolution...

After installed proprietary driver for NVidia or ATI, plymouth bootup screen has turned large and ugly. Here's how to fix it

1) Install v86d and hwinfo package
    $ sudo apt-get install v86d hwinfo
2) Check maximum resolution supported when running Plymouth
    $ sudo hwinfo --framebuffer
3) Edit the resolutions in the GRUB2 files
    $ sudo gedit /etc/default/grub
Assuming your monitor can support 1280x1024, otherwise change it to whatever resolution supported by your monitor
4) Change the text below
    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
to
    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset video=uvesafb:mode_option=1280x1024-24,mtrr=3,scroll=ywrap"
then look for the text below
    #GRUB_GFXMODE=640x480
and change it to
    GRUB_GFXMODE=1280x1024
5) Edit another file
    $ sudo gedit /etc/initramfs-tools/modules
6) Add the following line at the end of the file
    uvesafb mode_option=1280x1024-24 mtrr=3 scroll=ywrap
7) Run
    $ echo FRAMEBUFFER=y | sudo tee /etc/initramfs-tools/conf.d/splash
8) Update Grub
    $ sudo update-grub2
9) Generate new splash screen
    $ sudo update-initramfs -u

Monday, May 31, 2010

No sound from headphone jack...

Model: Dell Studio XPS 16 - 1647 (reported on 1645)
OS:
Linux Mint 17 - Qiana (64-bit)
Linux Mint 13 - Maya (64-bit)
Linux Mint 10 - Julia
Ubuntu 10.04 - Lucid Lynx

Symptom: no sound when plug-in headphone

Solution:
1) open alsa-base.conf file
$ sudo nano /etc/modprobe.d/alsa-base.conf
2) add the text below to the file (last line)
options snd-hda-intel model=dell-m6
3) restart your machine

Note:
Tested on Ubuntu Lucid Lynx 64-bit.

Update (19/11/2010):
Tested on Linux Mint 10 64-bit.

Update (15/11/2014):
Tested on Linux Mint 17 64-bit.