Archive

Posts Tagged ‘linux mint’

Modify $PATH for root account Ubuntu / Linux Mint

March 6th, 2011 No comments

The way to modify $PATH on Ubuntu / Linux Mint is a bit different from that of other Linux distros. When you have tried several ways to modify $PATH but to no avail, give yourself a chance to try this and see =).

To modify all users’ $PATH, edit this file: /etc/profile

To modify root’s $PATH, edit this file: /etc/environment

Shutdown a Windows box from Ubuntu / Linux Mint

January 8th, 2011 No comments

If you ever want to shutdown a Windows XP box remotely from Ubuntu or Linux Mint, this post is worth trying ;) .

The only command to know is ‘net rpc shutdown’ with few parameters. Try the following which makes a successful shutdown signal on my Windows XP box.

administrator@user ~ $ net rpc shutdown -C “going to shutdown” -f -I 10.0.1.9 -U administrator%admin123

Shutdown of remote machine succeeded

Parameters from man page:

-I ip-address
IP address of target server to use. You have to specify either this
option or a target workgroup or a target server.

RPC SHUTDOWN [-t timeout] [-r] [-f] [-C message]
Shut down the remote server.

-r
Reboot after shutdown.

-f
Force shutting down all applications.

-t timeout
Timeout before system will be shut down. An interactive user of the
system can use this time to cancel the shutdown.

-C message
Display the spec

If that simply doesn’t work for you the first time, then read this article and solve the requirement.

(Source: http://www.howtoforge.com/how-to-remotely-shut-down-windows-xp-computers-from-a-linux-server)

How To Remotely Shut Down Windows XP Computers From A Linux Server

As a budget cutback, our school administrators asked us to shutdown all non-essential classroom computers at night to save electricity. I teach Linux in a classroom that has a Dell Poweredge 2850 Red Hat Enterprise Linux (RHEL5) server and 29 Dell Optiplex 745 student lab computers running Microsoft Windows XP SP3 as the host operating system and VMWare Server to provide virtual Linux machines for our classes. I researched on the Internet for the best solution to remotely shutdown the student lab computers at night. I was not able to find one post or how-to that completely answered my questions, but I was able to piece together a solution. In an effort to document this project and help others with similar needs, here are my notes on the project:

REQUIREMENTS FOR WINDOWS XP TO BE REMOTELY SHUTDOWN BY A LINUX SERVER:

  1. Disable Simple File Sharing. UNCHECK “Use simple file sharing” under My Computer > Tools > Folder Options > View.
  2. Check the Windows Firewall and make sure ICMP is enabled and File and Printer Sharing is enabled. Go to Control Panel > Security Center > Windows Firewall > Exceptions > CHECK “File and Printer Sharing”. Also on the Advanced tab > ICMP Settings > CHECK “Allow incoming echo request”.
  3. You must be able to successfully ping the IP address of the remote Windows XP computer you want to shutdown.
  4. The default Local Policy in Windows XP to force a remote shutdown is limited to members of the Administrator group. If you want to change this, use the Group Policy Editor (gpedit.msc) to change this Local Policy. Select Computer Configuration > Windows Settings > Security > Local Policies > User Rights Assignment > Force shutdown for a remote system and change the properties to include the user or group you want to have this authority.

REQUIREMENTS FOR THE LINUX SERVER TO REMOTELY SHUTDOWN WINDOWS XP COMPUTERS:

  1. Samba must be installed and working properly. In our subnet, the RHEL5 Samba Server is configured as a WINS server for our own separate workgroup.
  2. It is recommended that the DHCP server be setup to assign static IP addresses to the Windows XP computers. This makes control of the lab computers much easier.
  3. It is also recommended that BIND be setup with a zone file for the subnet to provide DNS resolution for the computers in the lab subnet.
  4. The following command will remotely shutdown a Windows XP computer under this scenario:net rpc SHUTDOWN -C “enter a comment to display at shutdown” -f -I x.x.x.x -U username%passwordIn this example x.x.x.x is the IP address of the remote Windows XP computer, username is a member of the Administrator group on the Windows XP machine, and password is the correct password associated with the username.
  5. Test your configuration. Samba is very good about letting you know if your command works correctly or if you have problems.
  6. Next create a script to shutdown the Windows XP machines. Use crontab to schedule when you want the remote machines shutdown.

Recommended good softwares for Linux Mint / Ubuntu

November 30th, 2010 No comments

Linux is a good and powerful operating system. If you are a non-MS developer or you can’t afford MS products (Windows, Office), you should consider using Linux. Though there are many Linux distros out there, I recommend Linux Mint for its elegance and cool customizations for home end-users. If you’ve been a Windows user, you will feel a similar environment with Linux Mint.

Here is a list of softwares (IMHO) in no order that I recommend for Linux Mint (applicable to Ubuntu too as Linux Mint is based on Ubuntu).

arpon – Arp handler inspectiON

Protects your ARP cache.

MultiGet

A good download manager like Free Download Manager for Windows. It supports multi-thread per each download.

wubi-add-virtual-disk

Expand diskspace of your OS, use this when you install Ubuntu/Linux Mint as a software under Windows.

Wine

A famous Windows compatibility layer. With Wine, you can install and run Windows softwares with no problem in Linux.

Kino

A lite video editor, good for average demand.

Firefox

A super good web browser.

Chrome

Yet another super good browser. It loads and displays Flash web pages faster than Firefox, but is very resource-consuming.

AllTray

Similar to AllToTray software for Windows, it can hide chosen window and shows a corresponding icon on the system tray. Click that icon to open the window again.

Shutter

A good screenshot tool compared to default ones. However it cannot capture long web page.

VirtualBox

Lets you create as many operating systems as you want inside Linux. It performs excellently comparable to VMWare.

RabbitVCS

Similar to TortoiseSVN, it lets you do all svn-related tasks with a right click.

Java Decompiler – http://java.decompiler.free.fr/

A really good tool for Java developer, comparable to to DJ Java Decompiler for Windows.

Putty

Good SSH tool for developers for years ;) . I like the way using GUI to store accounts, fonts, tunnels, etc.

Firewall graphical front-end: Firestarter, GUWF

Linux uses iptables as the actual firewall, so we just need a good and reliable GUI to iptables. Firestarter, GUFW are good candidates, but use one of them only.

Meld Diff Viewer

Similar to WinMerge for Windows, it is strong at comparing and merging files.

Google Picasa

This is a good software for managing image files on your computer.

gedit

Similar to Notepad++ for Windows, it is a lightweight superstar for editing files.

SCIM Unikey

A reliable tool for typing Vietnamese characters. This is good if you’re going to learn and use Vietnamese in your near future of course!

GConf-Editor

A tool used for editing the GConf configuration database. GConf is a configuration database system for storing application
preferences.

Oracle VM VirtualBox

A good free software to create virtual machine of your choice.

Rhythmbox

A cool music player, integrating last.fm, podcast, radio and music stores (Jamendo, Magnatune).

Nautilus Image Converter

If you’ve ever known Image Resizer Powertoy for Windows XP, you will find this a similar useful tool for Linux. It integrates in right mouse menu context. It supports resizing and rotating images.


Disable touchpad in Linux Mint

November 2nd, 2010 3 comments

Laptop users often have this desire: disable touchpad when usb mouse is connected to machine. For Windows, we can do this by installing Synaptics utility, then turning on the right feature. For Linux Mint / Ubuntu, there are tools to do so but that may not work stably all the time. I try GPointing Device, the touchpad is suddenly turned ON after a while I turn it OFF. That’s really headache when you work with your laptop for hours.

Some solution refers to modifying /etc/X11/xorg.conf but this file does not exist in Linux Mint 9, even if I add it and use synclient command, this way dooes not work for me.

Finally I find out a useful command, xinput, which can totally disable touchpad in a session. If you’re in same situation like me and looking for a solution that works, read on. If you’d like to learn more, read this Ubuntu wiki: https://wiki.ubuntu.com/X/Config/Input#Dynamic%20Input%20Configuration%20with%20xinput.

First, list all current input devices.

administrator@linuxmint ~ $ xinput list
⎡ Virtual core pointer                        id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                  id=4    [slave  pointer  (2)]
⎜   ↳ Logitech USB Laser Mouse                    id=10    [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad                  id=12    [slave  pointer  (2)]
⎜   ↳ Macintosh mouse button emulation            id=13    [slave  pointer  (2)]
⎣ Virtual core keyboard                       id=3    [master keyboard (2)]
↳ Virtual core XTEST keyboard                 id=5    [slave  keyboard (3)]
↳ Power Button                                id=6    [slave  keyboard (3)]
↳ Video Bus                                   id=7    [slave  keyboard (3)]
↳ Sleep Button                                id=8    [slave  keyboard (3)]
↳ USB 2.0 Camera                              id=9    [slave  keyboard (3)]
↳ AT Translated Set 2 keyboard                id=11    [slave  keyboard (3)]
↳ Asus Laptop extra buttons                   id=14    [slave  keyboard (3)]

List properties of specific device.

administrator@linuxmint ~ $ xinput list-props “SynPS/2 Synaptics TouchPad”
Device ‘SynPS/2 Synaptics TouchPad’:
Device Enabled (140):    0
Device Accel Profile (257):    0
Device Accel Constant Deceleration (258):    1.000000
Device Accel Adaptive Deceleration (260):    1.000000

Set property “Device Enabled” to 0 to disable the device.

administrator@linuxmint ~ $ xinput set-prop “SynPS/2 Synaptics TouchPad” “Device Enabled” 0

It works instantly without restarting :D . You can save the last command line as a an executable script, put it on Desktop, click whenever you want.

Now you feel better  yet? Or still don’t like to type command line? Then this wiki may be helpful https://help.ubuntu.com/community/SynapticsTouchpad. There is section about how to disable touchpad that really works.

How To Install Microsoft Office 2007 In Ubuntu 9.04

October 1st, 2010 No comments

(Written By Saman Sadeghi, June 22nd, 2009

Source: http://samanathon.com/how-to-install-microsoft-office-2007-in-ubuntu-9-04/)

This step-by-step walk through details installing Microsoft Office 2007 Professional on Ubuntu 9.04, “Intrepid Ibex”.

I have to admit that I absolutely love Office 12, I’ve be using it on Ubuntu since 8.04 and OpenOffice just doesn’t compare! So, I needed to install Office 2007 onto Ubuntu 9.04 (as I did a clean install). If you do too, follow along with my handy guide!

Uninstall Previous Versions Of Wine

For some odd reason, Office 2007 will not run on a version of Wine above 1.1.14. For that reason, if you currently have Wine installed, uninstall it by follow these steps:

  1. Open the terminal.
  2. Enter the following:
    sudo apt-get remove wine
  3. Remove the hidden Wine folder by entering the following into the terminal:
    rm -rf ~/.wine

Install Wine

I’ll be using Wine 1.1.14 as I know it works.

  1. Open Firefox and navigate to the The WineHQ .deb Packages Archives and download Wine 1.1.14 for your system architecture.
  2. Install the .deb
  3. You will see a dialog box that reads: “An older version is available in the software channel.”
  4. Click the “Close” button.
  5. Click the “Install Package” button.
  6. Enter your password to install Wine.

Install Microsoft Office 2007

Now the fun part!

  1. Insert your Microsoft Office 2007 install disc into your computer’s CD-ROM drive.
  2. Look for the setup.exe executable.
  3. Right-click the installer and click “Open with other application”
  4. Choose Wine Windows Program Loader.
  5. Enter your serial number.
  6. Accept the User Agreement.
  7. Click the large “Install Now” button

    If you click the Customize button, you can chose which components you want to install. You can also enter your name, initials and company name. This information will be embedded into every document that you create, just like in the PC version.

Install Winetricks

  1. Switch back to the terminal and enter the following:
    sudo wget www.kegel.com/wine/winetricks
  2. Once complete, enter this command:
    sudo apt-get install cabextract
  3. Enter the following:
    sh winetricks corefonts tahoma vcrun2005sp1 wsh56js
  4. Agree the Visual C++ license agreement.
  5. Click the “Yes” button to install Windows Script 5.6
  6. Agree to the license agreement.

Configure Wine

  1. Enter the following into the terminal:
    winecfg
  2. Switch to the Libraries tab
  3. In the New override for libraries combo box, enter: riched20 and click the “Add” button
  4. With riched20 highlighted, click the “Edit” button.
  5. Select the “Native (Windows)” radio button and click the “OK” button.
  6. Enter usp10 into the New override for libraries combo box.
  7. Click the “OK” button to close the Wine configuration dialog box.

Test Microsoft Office 2007

All of the Microsoft Office applications should now have appeared in your application menu: Applications->Wine->Programs->Microsoft Office