Showing posts with label mint. Show all posts
Showing posts with label mint. Show all posts

Wednesday, 20 February 2013

Juniper Network Connect in Bodhi, Ubuntu and Linux Mint

The Juniper Network Connect client simply wouldn't launch for me under any of the Linux distributions listed in the title of this post, even after trying multiple Java version installations.

Thankfully, Paul Smith at Mad-Scientist.us has put together a great script which allows connection to a Juniper WebVPN from a Ubuntu-based distro. He has a great write up on his blog, so I won't repeat his instructions here, other than to say he makes it incredibly simple to get connected to your institution WebVPN.

I followed his instructions on a reasonably fresh install of Bodhi Linux*, and ended up running into a "missing /etc/resolv.conf" error. This can be fixed by running the following command:
 sudo dpkg-reconfigure resolvconf  
Answer Yes to all the prompts and restart your machine once the tool finishes.

Launching Paul's script (hosted here at Github, should you want to check out the code), should now present you with a working GUI, allowing you to connect you to your WebVPN. He also provides the option of connecting via the command line, detailed further in his blog post

As usual, any issues or comments in the box below!

* If you haven't checked this distro out, I highly recommend it - it absolutely flies even on older hardware, and is Ubuntu-based giving access to the huge Ubuntu software repositories

[References]
Mad-Scientist.us
Bohdi Linux Forums

Tuesday, 6 November 2012

Fixing Print Screen in Linux Mint XFCE

To enable Print Screen key functionality in Linux Mint XFCE:

Ensure xfce4-screenshooter is installed:
 sudo apt-get install xfce4-screenshooter  

Then, in the Menu, go to Settings -> Keyboard then Application Shortcuts -> Add. In the Command field, enter xfce4-screenshooter and then click OK, before pressing the Print Screen key on the keyboard, to set that shortcut.

Friday, 11 May 2012

Connecting to a VPN from the command line in Linux Mint / Ubuntu

Set up the VPN using the Network Manager applet, then open a Terminal. The command to connect to a VPN is:
 nmcli con up uuid <your-uuid-here> 

To find out the UUID of the VPN connection, use:
 nmcli -p con list

The command to disconnect from a VPN is:
 nmcli con down uuid <your-uuid-here>

Fixing Hibernate Problems in Linux Mint Part II

My previous attempts to make hibernation work for my Linux Mint installation didn't entirely solve the problem. My system has been hanging far less than usual, but would still occasionally hang at the s2disk hibernating screen.

After a lot of reading, it seems to me that there's problem with the s2disk utility, and so I've worked around the problem using an older, more stable method of hibernation:
 sudo echo disk > /sys/power/state  

This will hibernate the machine, and resume the session when it is powered back up. It's not as fast as s2disk, and doesn't display any information while hibernating (it shows a black screen unless there are errors), but is far more stable, for my set up at least.

I put the command into a one line script, in /usr/bin/hib-script.sh, then added an entry in sudoers (see this post) to remove the requirement for a password to be entered. Finally, I added a launcher to Cairo-dock, so that now I have a consistent, stable hibernation function for my Linux Mint installation.


How to run a script requiring sudo without needing a password

To run a script that has a sudo command in it, without needing to enter a password whenever the script is executed, add an entry in sudoers.
First, open sudoers using visudo:
 sudo visudo  

Then add the following line to the bottom of the file:
 <user> ALL=NOPASSWD: <absolute_path_to_script_file>  

Where <user> is the user running the script, and <absolute_path_to_script_file> is...self explanatory :). Though I've found that the script needs to be placed in /usr/bin/ to for the entry in sudoers to be effective.

Save the changes to the file, and log in and out to enact the change. Now, when you sudo script, there will be no prompt for a password.

Saturday, 28 April 2012

Fixing Hibernate Problems in Linux Mint

Hibernate was working fairly inconsistently on my machine; sometimes it would work, and sometimes it would hang with s2disk pending onscreen. Google turns up a lot of Linux hibernate problems, below is how I resolved mine.

First, ensure you have more swap space than RAM (1.5 - 2x RAM as a guideline), using the command:
 swapon -s  

If you don't have enough space, follow the instructions here before continuing.

Once you are sure you have enough swap space, if hibernate still isn't working, install the powermanagement-interface package, using:
 sudo apt-get install powermanagement-interface  

This got hibernation working on my machine, I hope it helps you too.

Update: Make sure you check out Part II of this post, should this post not help you fully resolve your hibernate problems.

Thursday, 26 April 2012

Increasing swap file size in Linux

If you need to increase your Linux swap space, but don't want to repartition your hard drives, you can use a swap file.

First, create an empty file, of the size you want.
 dd if=/dev/zero of=/mnt/my_swap bs=1M count=2048  

The above creates an empty file of size 2GB, called mnt/my_swap. To create a file of a different size, replace the 2048 with the size of swap file you require, in MB.

Next, format the file as swap space:
 mkswap /mnt/my_swap  

Then tell the operating system to begin using it:
 swapon /mnt/my_swap  

Finally, to persist the change, and ensure the OS uses the new swap file on every boot, open /etc/fstab and add the following line:
 /mnt/my_swap none swap sw 0 0  

To open /etc/fstab, you can use gedit with this line:
 gedit /etc/fstab  


Additionally, to check the current swap spaces in use by the system, you can use:
 swapon -s  


With thanks to DistroWatch Weekly, Issue 388, 17 January 2011 for this information!

Friday, 23 March 2012

Installing Rails 3.2 into Linux Mint (and other Linux distributions)


1) Install RVM:
  bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)   


2) Install or update RubyGems:
 gem update --system  


3) Install Rails:
 gem install rails  


That's it! Any problems, let me know below.

RVM Installation Problems in Linux Mint

I was having problems installing RVM into Linux Mint, it seems that somehow RVM is/was broken for Ubuntu distros. I was having issues with RVM saying that it couldn't fetch the ruby source, and curl errors as well. Purging and reinstalling RVM:

Remove RVM:
 sudo apt-get --purge remove ruby-rvm  
 sudo rm -rf /usr/share/ruby-rvm /etc/rvmrc /etc/profile.d/rvm.sh  

Close terminal window and open a new one then reinstall RVM with:
 bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)  

as per this StackOverflow answer solved my problems.

Saturday, 25 February 2012

Changing the primary monitor in Linux Mint (and other distributions)


*** Update: To persist this change between machine restarts, see this post ***


1) Save this script as monitor-switcher.sh:

 #!/bin/bash  
 # Author: Andrew Martin  
 # Credit: http://ubuntuforums.org/showthread.php?t=1309247  
 echo "Enter the primary display from the following:"               # prompt for the display  
 xrandr --prop | grep "[^dis]connected" | cut --delimiter=" " -f1     # query connected monitors  
 read choice                                        # read the users's choice of monitor  
 xrandr --output $choice --primary                         # set the primary monitor  

2) Make executable with:
 chmod +x monitor-switcher.sh  

3) Execute by typing:

 ./monitor-switcher.sh  


4) Enter the name of the monitor you want to be the primary monitor.


All credit to the article here.

Wednesday, 22 February 2012

Installing the ADT Plugin for Eclipse under Linux Mint

If you get the following error when trying to install the ADT plugin for Eclipse:


Cannot complete the install because one or more required items could not be found.

Software being installed: Android Development Tools 16.0.1.v201112150204-238534 (com.android.ide.eclipse.adt.feature.group 16.0.1.v201112150204-238534)
Missing requirement: Android Development Tools 16.0.1.v201112150204-238534 (com.android.ide.eclipse.adt.feature.group 16.0.1.v201112150204-238534) requires 'org.eclipse.wst.sse.core 0.0.0' but it could not be found



You need to install linux-tools first. Go to Help -> Install New Software, and enter http://download.eclipse.org/technology/linuxtools/update into the Work with box. Install all of the components that appear, then restart Eclipse when prompted. Now go back to Help -> Install New Software, and enter
https://dl-ssl.google.com/android/eclipse/ into the Work with box. Go through the installation procedure again and the ADT Plugin will install successfully.