-->

GoogleSearch



Scientist. Husband. Daddy. --- TOLLE. LEGE
외부자료의 인용에 있어 대한민국 저작권법(28조)과 U.S. Copyright Act (17 USC. §107)에 정의된 "저작권물의 공정한 이용원칙 | the U.S. fair use doctrine" 을 따릅니다. 저작권(© 최광민)이 명시된 모든 글과 번역문들에 대해 (1) 복제-배포, (2) 임의수정 및 자의적 본문 발췌, (3) 무단배포를 위한 화면캡처를 금하며, (4) 인용 시 URL 주소 만을 사용할 수 있습니다. [후원 | 운영] [대문으로] [방명록] [옛 방명록] [티스토리 (백업)]

이 블로그 검색

Cookbook: Linux / Unix

라벨:



Boot on text mode
Copy and paste below command into terminal and hit enter:
sudo gedit /etc/default/grub
This opens Grub boot loader config file with text editor.
2. Do below changes:
  • Comment the line GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash”, by adding # at the beginning, which will disable the Ubuntu purple screen.
  • Change GRUB_CMDLINE_LINUX=”" to GRUB_CMDLINE_LINUX=”text”, this makes Ubuntu boot directly into Text Mode.
  • Uncomment this line #GRUB_TERMINAL=console, by removing the # at the beginning, this makes Grub Menu into real black & white Text Mode (without background image)
Ubuntu boot into text mode
3. After saved the changes, update grub via command:

sudo update-grub

mutt 

$ mutt -s "Test mail" -a /tmp/file.tar.gz you@email.com < /tmp/mailmessage.txt
 <ESC> the :wq 


sudo apt-get install wkhtmltopdf
 

VNC or NX USB mounting problem


I would VNC in but the external drives could not be mounted due to gnome policykit controls (for security’s sake).

So, here’s how to enable disk mounting in a VNC session in policykit.

CD into /etc/polkit-1/localauthority

net.reactivated.fprint.device.policy org.fedoraproject.config.firewall.policy
org.fedoraproject.config.services.policy
org.fedoraproject.systemconfig.kdump.policy
org.freedesktop.NetworkManager.policy
org.freedesktop.RealtimeKit1.policy
org.freedesktop.consolekit.policy
org.freedesktop.devicekit.power.policy
org.freedesktop.devicekit.power.qos.policy
org.freedesktop.modem-manager.policy
org.freedesktop.network-manager-settings.system.policy
org.freedesktop.packagekit.policy
org.freedesktop.policykit.policy
org.freedesktop.udisks.policy
org.gnome.clockapplet.mechanism.policy
org.gnome.control-center.defaultbackground.policy
org.gnome.cpufreqselector.policy
org.gnome.gconf.defaults.policy
org.gnome.settings-daemon.plugins.wacom.policy
org.gnome.system-monitor.policy
org.opensuse.cupspkhelper.mechanism.policy

The one we’ll want to edit is org.freedesktop.udisks.policy.
First, backup this file:
sudo cp /usr/share/polkit-1/actions/org.freedesktop.udisks.policy /usr/share/polkit-1/actions/org.freedesktop.udisks.policy.bak (or any other location you prefer).
In the terminal, run the following command: vi /usr/share/polkit-1/actions/org.freedesktop.udisks.policy
Look for this section:
<action id=”org.freedesktop.udisks.filesystem-mount”>
<description>Mount a device</description>
<description xml:lang=”da”>Montér en enhed</description>
<message>Authentication is required to mount the device</message>
<message xml:lang=”da”>Autorisering er påkrævet for at montere et fil system</message>
<defaults>
<allow_any>yes</allow_any>
      <allow_inactive>yes</allow_inactive>
      <allow_active>yes</allow_active>
</defaults>
</action>



Terminal Font: 
  • yum install levien-inconsolata-fonts

Microsoft font msttcorefonts (http://corefonts.sourceforge.net

Backup
  • using rsync: rsync -zvr [source directory] [destination directory]
  • e.g rsync -zvr Research ../BackupDrive/
  • --exclude=\$RECYCLE.BIN

Email
  • mail -s "title" -a file1 -a file2 email@email.com < /dev/null > 2
  • mutt -s "data set for run #2" professor@bigschool.edu < ~/run2.dat

Add unallocated space to linux
  • http://ubuntuforums.org/showthread.php?t=1511037
  • http://www.rootusers.com/use-gparted-to-increase-disk-size-of-a-linux-native-partition/  : use GParted Live CD ! 
  • http://askubuntu.com/questions/51272/how-do-i-repartition-with-gparted
    • Prob. the best answer : extending ext4 
Boot/grup problem
  • http://www.bleepingcomputer.com/forums/t/244714/how-to-re-install-grub-bootloader-after-windows-re-install-on-a-dual-boot-system/
  • http://gparted.sourceforge.net/faq.php#faq-13

Apache setting

http://brennan.id.au/13-Apache_Web_Server.html#users
Configure Apache for public_html
Apache can be configured to use a folder ( usually public_html ) in any user's home directory. This is relatively straight forward if you don't mind editing the httpd.conf file and changing a few file permissions...
A complete guide can be found here.
Step 1 - Change httpd.conf
In fedora and red-hat the correct configuration is already there. It's just commented out.

#> vim /etc/httpd/conf/httpd.conf

#
# UserDir: The name of the directory that is appended onto a user's home
# directory if a ~user request is received.
#
# The path to the end user account 'public_html' directory must be
# accessible to the webserver userid. This usually means that ~userid
# must have permissions of 711, ~userid/public_html must have permissions
# of 755, and documents contained therein must be world-readable.
# Otherwise, the client will only receive a "403 Forbidden" message.
#
# See also: http://httpd.apache.org/docs/misc/FAQ.html#forbidden
#

#
# UserDir is disabled by default since it can confirm the presence
# of a username on the system (depending on home directory
# permissions).
#
#UserDir disable

#
# To enable requests to /~user/ to serve the user's public_html
# directory, remove the "UserDir disable" line above, and uncomment
# the following line instead:
#
UserDir public_html


Step 2 - Reload the httpd.conf

#>service httpd reload

Step 2 - Ensure that selinux is enabled for user_dir

#> setsebool httpd_enable_homedirs true


Step 3 - Ensure the correct access permissions are set on the home directory
As normal user in home directory

~> chmod a+x ~

Step 5 - Create the public_html directory

~> mkdir public_html

Step 6 - Set the selinux type label for public_html

~> chcon -t httpd_sys_content_t public_html

Step 7 - Create a web page or php script in your public_html folder and browse to it by:

http://localhost/~david/phpinfo.php






    라벨:





    Scientist. Husband. Daddy. --- TOLLE. LEGE
    외부자료의 인용에 있어 대한민국 저작권법(28조)과 U.S. Copyright Act (17 USC. §107)에 정의된 "저작권물의 공정한 이용원칙 | the U.S. fair use doctrine" 을 따릅니다. 저작권(© 최광민)이 명시된 모든 글과 번역문들에 대해 (1) 복제-배포, (2) 임의수정 및 자의적 본문 발췌, (3) 무단배포를 위한 화면캡처를 금하며, (4) 인용 시 URL 주소 만을 사용할 수 있습니다. [후원 | 운영] [대문으로] [방명록] [옛 방명록] [티스토리 (백업)] [신시내티]

    -