Posts

Showing posts with the label Ubuntu

Remove unwanted entry in UEFI BIOS boot menu

If your original OS is installed in UEFI mode, the installation of some other OS (e.g Ubuntu) in UEFI mode later on introduces some artifacts to the EFI partition the hard drive, and due to them, in the UEFI BIOS boot menu you see the respective boot menu entry. To remove the entry completely, you need to remove the artifacts to the EFI partition, and then move the respective boot entry. Delete EFI/distro of the EFI partition Linux Locate your EFI partition with sudo fdisk -l and find out the partition with EFI Partition under the Type column. Suppose the EFI partition is /dev/sda2 , do the following to mount it on an empty folder. mkdir /mnt/efipart mount /dev/sda2 /mnt/efipart Next find the directory corresponding to the OS that you have installed. It is mostly under EFI/ distro_name Remove that directory and its contents by sudo rm -r EFI/distro_name . Windows Start cmd.exe as administrator. Run diskpart in it. Microsoft Windows [Version 10.0.14393] (c) 20...

Use squid to track http requests of machines in your LAN

The key is to set up a squid server on a Linux machine, and then have other machines use that squid server as the network proxy. Procedures (for squid installed on Ubuntu) sudo apt-get install squid3 Edit /etc/squid/squid.conf . Make sure you have uncomment the following acl lines: acl localhost src 127.0.0.1/32 acl localnet src 192.168.2.0/24 (Replace 192.168.2.0/24 with the subnet of your LAN)  Make sure you have uncomment the following http_access lines: http_access allow localnet http_access allow localhost service squid restart . By default the server uses port 3128. Set other machines to use that squid3 server as the network proxy. Browse /var/log/squid/access.log to check the http requests. To make your proxy server cache nothing, follow the instruction at here . For instance, add the following line in /etc/squid/squid.conf . cache deny all

Docker quick start (Firefox container as an example)

Below are the minimal commands needed to get a working Mozilla Firefox docker container in Ubuntu. Install docker client and server sudo apt-get install docker.io Allow the docker user to communicate with your X session xhost +local:docker Download a Firefox docker image and start it as a container sudo docker run -v $HOME/Downloads:/home/firefox/Downloads:.rw -v /tmp/.X11-unix:/tmp/.X11-unix -v /dev/snd:/dev/snd --privileged -e uid=$(id -u) -e gid=$(id -g) -e DISPLAY=unix$DISPLAY --name firefox chrisdaish/firefox Once the image has been downloaded, it can be started with the following command instead: sudo docker r un -v /tmp/.X11-unix:/tmp/.X11-unix -v /dev/snd:/dev/snd --privileged -e uid=$(id -u) -e gid=$(id -g) -e DISPLAY=unix$DISPLAY --name firefox chrisdaish/firefox Note the id or name of the container. Later if you want to get back to the container, you need that id. sudo docker attach [id or name] sudo docker start [id or name> Before you can run again, ...

Time change due to Windows-Ubuntu dual boot

This happens because Windows thinks the hardware clock tracks local time, while Ubuntu thinks the clock tracks UTC. If the time is reset in Ubuntu, the time would be wrong in Windows. A good solution is to set Ubuntu to treat the hardware clock as local time. For older systems, edit /etc/default/rcS as root and make sure that UTC=no . For newer systems using systemd (15.04+), you shall run the following command. timedatectl set-local-rtc 1 Reference Reference 2

Install additional codec for Ubuntu

sudo apt-get install ubuntu-restricted-extras sudo apt-get install libdvdread4 sudo /usr/share/doc/libdvdread4/install-css.sh sudo apt-get install gstreamer0.10-ffmpeg sudo apt-get install w64codecs sudo apt-get update Reference

Creating USB installed Ubuntu bootable in both UEFI and legacy BIOS mode

Resouces the instruction that I am following GPartd tutorial My notes on the steps Step A: Format the USB stick as required. Boot GPartd. Select the USB stick. If there is a key icon next to any partitions of the stick, unmount the USB stick from either the Linux system or GPartd. Select Partition, then Create new partition. Use the default DOS-favor of partition table. Create the first FAT32 partition of size 1-2GB, with label usb-live at the front. Confirm and make the change before you can right click, select "Manage flag" and make it bootable. Use the remaining space to create a extended partition. From within create the ext4 partition with label usb-installed, and then linux-swap. Note the order is important. The ext4 partition will then move to partition 6 rather than partition 5 if you reverse the order. Step B Straightforward Step C Make sure you detach all the other disks of your PC before booting using the USB. If you come across error when usi...

USB Live Linux on Mac

Create an UEFI Live Linux USB Use Mac Linux USB Loader to turn a FAT32 USB drive to a UEFI Live Linux system. Use the same software, or the steps in this guide to build files for persistence (useful if you want to keep additional driver and software packages and custom settings after reboot). You can only create at most 4GB of persistence storage with the FAT32 USB drive. Get WiFi working To get the wifi driver working, use a thunderbolt to Ethernet adaptor to get the Mac connected to the Internet. Get the following apt packages to get the wifi device working. sudo apt-get install linux-firmware-nonfree b43-fwcutter firmware-b43-installer More information is available in this reference . The reference also contains instruction to install the driver for those who don't have the thunderbolt to Ethernet adaptor. Utilize the remaining space on the USB The remaining space on the UEFI USB Live Linux can't be used unless it is on a partition other than the one that sto...

rip dvd movie disc on Ubuntu Linux

1) [Optional] Install libdvdread4 sudo apt-get install libdvdread4 2) Install dvd::rip sudo apt-get install dvdrip 3) Start dvdrip dvdrip 4) Start a new project 5) In RIP Title tab, select the file that you want to rip. Then click on the "Rip selected title(s)/chapter(s) button. Reference Alternative using Handbrake: http://lifehacker.com/5809765/how-to-rip-a-dvd-to-your-computer 

Get gcin to work on Ubuntu 14.04/15.04

1) Go to Ubuntu software center and install synaptic. 2) Start synaptic, and install gcin and gnome-session-fallback package from there. Log out and then choose to use the gnome-fallback for your session. 3) In System Settings -> Language Support, choose gcin as the keyboard input method system. 4) Log out then log in with the Gnome classic desktop. 5) On the top panel, pres alt+super(win button) + right click, add "Notification Area" applet. In Ubuntu 15.04, if you choose Ubuntu-mate, you just need to do steps 3 and 4 and you get everything. No need to do step 5 to get it on the notification area.

Beautify Ubuntu Desktop

http://helpdeskgeek.com/linux-tips/change-the-ubuntu-12-04-login-screen-using-ubuntu-tweak/ Slidewall: https://launchpad.net/slidewall http://www.webupd8.org/2012/08/use-wallpaper-clocks-live-earth.html http://www.vladstudio.com/wallpaperclocks/ http://askubuntu.com/questions/134252/is-there-any-alternative-for-windows-gadgets-in-ubuntu

Customize gnome-classic in Ubuntu 12.04

Increase the heights of top and bottom panels  Install dconf-tools Start dconf-editor. Find the setting org -> gnome -> gnome-panel -> layout -> toplevels. Change the "size" attribute of the bottom-panel and top-panel. Do meta (window) + alt + right click on top panel to add the following applets. "Clock" that can show both day/time and weather "Notification Area" that can show the gcin status. "Indicator Applet" that can show the status of various things such as battery and wifi.

apt-get under proxy server

1) Open the Terminal and type the following command       sudo gedit /etc/apt/apt.conf.d/02proxy Note : 01proxy file is not present earlier. 2) Type the following line(in red) in the file:      Acquire::http::Proxy “http://yourusername:yourpassword@yourproxy:yourport″;      Acquire::http::Proxy "http://foss:3189";     3) Save the file and your problem is solved. Reference

Run 32-bit executables on 64-bit Linux

Look for the package/library called ia32.

Ubuntu 12.04 wired internet connection no longer works

Image
My solution: Right-click on the "network manager" applet icon on the top of the ubuntu panel. Select "Edit connection". Delete the respective entry under the "Wired" tab. Then depending on your connection type, you may be able to have the connection auto-detected. In that case, click on the "network manager applet icon again and select that auto-detected item (e.g. Auto ethernet). Then it is suddenly all set.

Add back "Show Desktop" icon in Gnome Fallback session of Ubuntu 12.04

Holding both Alt and Super (Windows) keys, right-click on the top or bottom panel. Select the appropriate icon. Reference

Cannot detect blank disc when using brasero in Linux gnome environment

It appears that there is a problem between brasero and the Gnome file manager nautilus. In case you encounter similar problems, use xfburn instead. But that your Linux machine may lose the capability to open a burned DVD disc automatically. In that case, mount the disc by yourself. To load a disc: mkdir /mnt/cdrom mount /dev/cdrom /mnt/cdrom To unload a disc umount /mnt/cdrom

ffmpeg convert from flv to mp4

ffmpeg -i input.flv output.mp4 Ref: here

Set up gcc/g++ for Matlab in Ubuntu 11.10

Please check here and here .

Look for packages that contain a certain file in Ubuntu

Install package apt-file sudo apt-get install apt-file apt-file update To look for a file, says tk.h, use the following command apt-file search tk.h Reference

VNC viewer session with gnome session manager on Ubuntu 11.10

Image
The following happens to me since I upgrade my Ubuntu to version 11.10. Using the default config file .vnc/xstartup , I just get a terminal window in my VNC viewer session. To have the gnome desktop session manager back to the VNC viewer session, I have to modify the config file as follows. #!/bin/sh # Uncomment the following two lines for normal desktop: unset SESSION_MANAGER unset DBUS_SESSION_BUS_ADDRESS #exec /etc/X11/xinit/xinitrc [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources xsetroot -solid grey vncconfig -iconic & x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" & #x-window-manager & gnome-session --session=gnome-classic & In the following, the value after --session= is the session manager. You may change gnome-classic above to ubuntu-2d for an alternative session manager.