You may be having trouble typing your username or password when VNC'ing to your Mac OS X Lion machine from a Windows machine. Try the following:
1) Type the password really slowly, around 1 character per second
2) If that doesn't work, you may have a process taking a lot of CPU cycles. If that's the case, ssh into your Mac OS X Lion machine, run "top", and see what process is taking a lot of CPU cycles. Kill the process. Then try to VNC in.
Friday, November 16, 2012
Monitor Network Traffic on iOS Simulator
1) Install WireShark: http://www.wireshark.org/download.html
2) Add Wireshark bin directory to your path. If you are using tcsh, edit your ~/.cshrc file and add in the following:
set path=(/Applications/Wireshark.app/Contents/Resources/bin $path)
2) Add Wireshark bin directory to your path. If you are using tcsh, edit your ~/.cshrc file and add in the following:
set path=(/Applications/Wireshark.app/Contents/Resources/bin $path)
3) In Terminal, run the following:
tshark 'tcp port 80 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)'
4) Run the iOS Simulator, and browse to something. You'll see the HTTP connections made in Terminal.
Sunday, October 21, 2012
Global Viz of Google+ Users
I don't use Google+, but this is an interesting way to vizualize global data:
http://www.virante.org/blog/2012/08/29/google-plus-user-map-visualization/
http://www.virante.org/blog/2012/08/29/google-plus-user-map-visualization/
Tuesday, September 25, 2012
Getting Windows 7 NFS Client to Connect to a Fedora Linux NFS Server
1) On linux:
sudo /sbin/chkconfig --level 345 nfs-server on
sudo /sbin/service nfs-server start
system-config-nfs
When the GUI pops up, add in your directory that you'd like to share, and the IP addresses (e.g. your Windows 7 IP address) you'd like to share your directory with.
2) Still on linux, edit the /etc/exports file, and change the following line:
(rw,sync)
to
(rw,sync,all_squash,anonuid=12345,anongid=23456)
where 12345 is your linux uid and 23456 is your linux gid.
That will make files written to your nfs server from anonymous client be owned by the specified uid and gid.
3) On linux, perform a
/sbin/service nfs-server restart
You can also perform the following, to confirm the directories shared:
sudo /usr/sbin/exportfs
4) On Windows 7, go to Control Panel > Programs and Features > Turn Windows features on or off
Check all three checkboxes under Services for NFS. Optionally turn on Telnet Client if you'd like to test out your NFS connection over port 111 (telnet linuxServerHostname 111)
5) Windows-R (run) > \\linuxServerHostname\path\to\nfs\mountname
If all goes well, that will just magically work.
6) (Optional) To mount the nfs server to a Windows drive, you can perform the following on the command line:
mount \\linuxServerHostname\path\to\nfs\mountname z:
And to unmount, either:
umount -a
or
umount z:
Easy. Well... at least, not too bad.
sudo /sbin/chkconfig --level 345 nfs-server on
sudo /sbin/service nfs-server start
system-config-nfs
When the GUI pops up, add in your directory that you'd like to share, and the IP addresses (e.g. your Windows 7 IP address) you'd like to share your directory with.
2) Still on linux, edit the /etc/exports file, and change the following line:
(rw,sync)
to
(rw,sync,all_squash,anonuid=12345,anongid=23456)
where 12345 is your linux uid and 23456 is your linux gid.
That will make files written to your nfs server from anonymous client be owned by the specified uid and gid.
3) On linux, perform a
/sbin/service nfs-server restart
You can also perform the following, to confirm the directories shared:
sudo /usr/sbin/exportfs
4) On Windows 7, go to Control Panel > Programs and Features > Turn Windows features on or off
Check all three checkboxes under Services for NFS. Optionally turn on Telnet Client if you'd like to test out your NFS connection over port 111 (telnet linuxServerHostname 111)
5) Windows-R (run) > \\linuxServerHostname\path\to\nfs\mountname
If all goes well, that will just magically work.
6) (Optional) To mount the nfs server to a Windows drive, you can perform the following on the command line:
mount \\linuxServerHostname\path\to\nfs\mountname z:
And to unmount, either:
umount -a
or
umount z:
Easy. Well... at least, not too bad.
Labels:
fedora,
linux,
networking,
nfs,
tech support,
Windows 7
Friday, September 14, 2012
cannot find ... NXConstantString
Why do I get the following error (on Linux using GNUstep), when trying to compile an Objective C program?
... error: cannot find interface declaration for ‘NXConstantString’ ..
Answer:
Use the following flag when compiling everything (.o's, main, etc):
-fconstant-string-class=NSConstantString
... error: cannot find interface declaration for ‘NXConstantString’ ..
Answer:
Use the following flag when compiling everything (.o's, main, etc):
-fconstant-string-class=NSConstantString
Friday, September 7, 2012
New Window Manager Day
I
always get excited when I start using a new toothbrush or bar of soap,
and I call that day new toothbrush or new soap day. Well, today is new
window manager day. I've made the switch from gnome to xfce and I'm
really loving it. I'm copying what he did: http://digitizor.com/2011/08/ 04/ linus-torvalds-ditches-gnome-fo r-xfce/ (I also switched from KDE to Gnome at one point when KDE 4 came along)
Things that I've had to customize so far:
http://lgallardo.com/en/2009/09/02/bloquear-pantalla-en-xfce4/
Changed clock format to: %l:%M %p%n%A%n%x
Mapped the windows button to /usr/bin/xfce4-popup-applicationsmenu
Mapped Alt-v to Maximze veritcally
Mapped windows-l to /usr/bin/screensaver-command -lock
Friday, August 24, 2012
How to activate MATLAB 2008 or older on Fedora 15 or newer
The issue is that you have to have an eth0 although Fedora 15+ likes to tie it to something else. Take a look at:
http://www.mathworks.com/support/solutions/en/data/1-EUTG50/?solution=1-EUTG50
I had to change a lot of different things, and reboot in order to things to go into affect. The last thing I tried (which worked) was "Update the name in the /etc/sysconfig/network-scripts/ifcfg-* file"
http://www.mathworks.com/support/solutions/en/data/1-EUTG50/?solution=1-EUTG50
I had to change a lot of different things, and reboot in order to things to go into affect. The last thing I tried (which worked) was "Update the name in the /etc/sysconfig/network-scripts/ifcfg-* file"
Saturday, July 28, 2012
wuaueng.dllDllInstall+0x1a777 in Process Explorer
If you are running Windows XP, and your system is real slow due to services.exe, and you've used Process Explorer to see that the offending library is wuaueng.dll!DllInstall+0x1a777 - you can fix your system by installing the Microsoft FixIt here:
http://support.microsoft.com/kb/927891
http://support.microsoft.com/kb/927891
Wednesday, June 27, 2012
How to Customize "Send To" Menu Items in Windows 7
Press Windows-R
Type in: %APPDATA%\Microsoft\Windows\SendTo
Copy shortcuts of executables to this directory. For example, copy a shortcut of C:\Program Files (x86)\microsoft office\OFFICE11\WINWORD.EXE to this directory.
Type in: %APPDATA%\Microsoft\Windows\SendTo
Copy shortcuts of executables to this directory. For example, copy a shortcut of C:\Program Files (x86)\microsoft office\OFFICE11\WINWORD.EXE to this directory.
Tuesday, June 12, 2012
Change Title Bar Color in Gnome in Fedora 16
I find it annoying that the active window's title bar is colored gray, just like inactive windows. I never know for sure which window is active when I start typing on the keyboard. In gnome, you can change the active window's title bar's color like this:
yum install gnome-tweak-tool
gnome-tweak-tool
Theme >Window theme > Clearlooks Classic
Yes!
yum install gnome-tweak-tool
gnome-tweak-tool
Theme >Window theme > Clearlooks Classic
Yes!
Monday, June 11, 2012
How do I get bash to autocomplete the first time?
It seems like the default bash behavior is to not show anything if you press tab and there is more than one possibility for tab auto-completion. It's really annoying. You can force bash to show all the matching file by editing /etc/inputrc and adding in the following line:
set show-all-if-ambiguous on
set show-all-if-ambiguous on
Thursday, May 17, 2012
In Wt, how can I get a tooltip working for the whole text in a WCheckBox?
Create a WContainerWidget wrapper around the WCheckBox, and then assign the tooltip to that WContainerWidget wrapper. For some reason, if you assign the tooltip directly to the WCheckBox, only hovering the mouse over the square box will trigger the popup tooltip. Assigning the tooltip to the WContainerWidget wrapper will add a tooltip over the WCheckBox text.
Thursday, April 26, 2012
Wednesday, April 25, 2012
Fix "local unversioned, incoming add upon update" in subversion
After doing an svn update, if you run svn status and get a " > local unversioned, incoming add upon update" error, perform the following:
svn resolve --accept working <conflicting_dir>
svn revert <conflicting_dir>
svn status
Thanks, http://tomhennigan.blogspot.com/2012/01/resolve-tree-conflict-svn-local.html#!/2012/01/resolve-tree-conflict-svn-local.html
svn resolve --accept working <conflicting_dir>
svn revert <conflicting_dir>
svn status
Thanks, http://tomhennigan.blogspot.com/2012/01/resolve-tree-conflict-svn-local.html#!/2012/01/resolve-tree-conflict-svn-local.html
Wednesday, April 18, 2012
How to have a single quote (') in an alias in tcsh
Use the following four characters: '\''
Thanks http://hintsforums.macworld.com/archive/index.php/t-15829.html
Thanks http://hintsforums.macworld.com/archive/index.php/t-15829.html
Thursday, April 12, 2012
rsync with ssh and non-default identify file
rsync -rtzvL --progress -e "ssh -i /home/user/.ssh/alt/id_dsa" /path/to/local/dir username@remotemachine.host.com:/path/to/remote/dir
Tuesday, April 10, 2012
Profile slow mysql queries
Edit /etc/my.cnf
Add the following to [mysqld] section:
log-slow-queries
long_query_time = 1
sudo /sbin/service mysqld restart
Generate load.
There will be a slow query log in the mysql data dir. The mysql data dir can be found by performing the following query:
show variables like 'datadir';
Thanks, http://hackmysql.com/nontech
Add the following to [mysqld] section:
log-slow-queries
long_query_time = 1
sudo /sbin/service mysqld restart
Generate load.
There will be a slow query log in the mysql data dir. The mysql data dir can be found by performing the following query:
show variables like 'datadir';
Thanks, http://hackmysql.com/nontech
Log every query in mysql
Edit /etc/my.cnf
Add in the following line to the [mysqld] section:
log=/var/log/mysql_query.log
touch /var/log/mysql_query.log
chmod 644 /var/log/mysql_query.log
chown mysql:mysql /var/log/mysql_query.log
sudo /sbin/service mysqld restart
Add in the following line to the [mysqld] section:
log=/var/log/mysql_query.log
touch /var/log/mysql_query.log
chmod 644 /var/log/mysql_query.log
chown mysql:mysql /var/log/mysql_query.log
sudo /sbin/service mysqld restart
Friday, April 6, 2012
Getting a Qt app working with boost using cmake
The problem:
You're using cmake to compile a Qt app which also uses boost, and you get an compilation error message like this:
error: expected ‘:’ before ‘slots’
What might be going on:
Your CMakeLists.txt file might have something like this in it:
ADD_DEFINITIONS(-DQT_NO_KEYWORDS)
The previous line is there to allow your Qt app to cooperate with boost signals and slots. However, if you need to use Qt signals and slots, there is a workaround.
What you should do:
For Qt, use the following keywords instead:
Q_EMIT
Q_SIGNALS
Q_SLOTS
Easy enough!
Thanks, http://stackoverflow.com/questions/6399005/qt-xapian-library
You're using cmake to compile a Qt app which also uses boost, and you get an compilation error message like this:
error: expected ‘:’ before ‘slots’
What might be going on:
Your CMakeLists.txt file might have something like this in it:
ADD_DEFINITIONS(-DQT_NO_KEYWORDS)
The previous line is there to allow your Qt app to cooperate with boost signals and slots. However, if you need to use Qt signals and slots, there is a workaround.
What you should do:
For Qt, use the following keywords instead:
Q_EMIT
Q_SIGNALS
Q_SLOTS
Easy enough!
Thanks, http://stackoverflow.com/questions/6399005/qt-xapian-library
Thursday, April 5, 2012
Determine what yum installed
How to determine what yum installed on Fedora linux:
rpm -qi --filesbypkg package-name
For example
rpm -qi --filesbypkg qt-examples
Thanks http://stackoverflow.com/questions/8068516/how-do-i-find-out-w-yum-or-rpm-what-files-it-installed!
rpm -qi --filesbypkg package-name
For example
rpm -qi --filesbypkg qt-examples
Thanks http://stackoverflow.com/questions/8068516/how-do-i-find-out-w-yum-or-rpm-what-files-it-installed!
Wednesday, April 4, 2012
Compile Subversion with HTTPS support in Fedora Linux
Update: subversion has changed. See this post for updated instructions: http://muddyazian.blogspot.com/2014/10/compile-subversion-for-fedora-19.html
Get your source at http://subversion.apache.org/download/
sudo yum install neon neon-devel apr-devel apr apr-util apr-util-devel
./configure --with-ssl
make -j8
sudo make install
Get your source at http://subversion.apache.org/download/
sudo yum install neon neon-devel apr-devel apr apr-util apr-util-devel
./configure --with-ssl
make -j8
sudo make install
Tuesday, April 3, 2012
Profiling PHP Code
Time Profiling PHP Code: this is how to get your PHP code profiled with xdebug, Fedora and httpd. Concepts might stretch to other platforms.
1) Install xdebug
sudo yum install php-pecl-xdebug
2) Under /etc/php.ini Options, add in the following line:
zend_extension = /usr/lib64/php/modules/xdebug.so
3) In /etc/httpd/conf/httpd.conf, change the following:
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
to this
<Directory />
Options FollowSymLinks
# AllowOverride None
AllowOverride All
</Directory>
4) Also put in the AllowOverride All command in the following place:
#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "/var/www/html">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
# AllowOverride None
AllowOverride All
5) Perform the following permissions change:
sudo chmod -R 777 /var/lib/php/session
6) In the PHP code directory that you want to profile, create a .htaccess file and add in the following:
php_value xdebug.profiler_enable 1
php_value xdebug.profiler_output_dir /tmp
7) Restart httpd
sudo /sbin/service/httpd restart
8) You'll need kcachegrind to visualize the profiling output. Download and compile it.
8a) Get the source from here: http://kcachegrind.sourceforge.net/html/Download.html
8b) tar -zxvf kcachegrind-0.7.1.tgz
8c) sudo yum install kdebase-devel
8d) cd kcachegrind-0.7.1
8e) mkdir build
8f) cd build
8g) ccmake ..
8h) All the defaults are fine, but you can change the CMAKE_BUILD_TYPE to Debug
8i) make -j12
8j) sudo make install
9) Now, run your PHP script. The results are either in /tmp or /tmp/systemd-private-*/tmp and you can visualize them with the /usr/local/bin/kcachegrind cachegrind.out.1234.
If you run into problems, you might find hints in/var/log/httpd/error_log. Or, you can try to run your php script on the command line, e.g.:
$ php index.php
1) Install xdebug
sudo yum install php-pecl-xdebug
2) Under /etc/php.ini Options, add in the following line:
zend_extension = /usr/lib64/php/modules/xdebug.so
3) In /etc/httpd/conf/httpd.conf, change the following:
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
to this
<Directory />
Options FollowSymLinks
# AllowOverride None
AllowOverride All
</Directory>
4) Also put in the AllowOverride All command in the following place:
#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "/var/www/html">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
# AllowOverride None
AllowOverride All
5) Perform the following permissions change:
sudo chmod -R 777 /var/lib/php/session
6) In the PHP code directory that you want to profile, create a .htaccess file and add in the following:
php_value xdebug.profiler_enable 1
php_value xdebug.profiler_output_dir /tmp
7) Restart httpd
sudo /sbin/service/httpd restart
8) You'll need kcachegrind to visualize the profiling output. Download and compile it.
8a) Get the source from here: http://kcachegrind.sourceforge.net/html/Download.html
8b) tar -zxvf kcachegrind-0.7.1.tgz
8c) sudo yum install kdebase-devel
8d) cd kcachegrind-0.7.1
8e) mkdir build
8f) cd build
8g) ccmake ..
8h) All the defaults are fine, but you can change the CMAKE_BUILD_TYPE to Debug
8i) make -j12
8j) sudo make install
9) Now, run your PHP script. The results are either in /tmp or /tmp/systemd-private-*/tmp and you can visualize them with the /usr/local/bin/kcachegrind cachegrind.out.1234.
If you run into problems, you might find hints in/var/log/httpd/error_log. Or, you can try to run your php script on the command line, e.g.:
$ php index.php
Wednesday, March 21, 2012
Maximize Window Vertically in Gnome
You can assign it to Alt-v. Go to Applications > System Tools > System Settings > Keyboard > Shortcuts > Windows > Maximize window vertically, and assign it to Alt-v
Thursday, February 23, 2012
Old Skool Gnome
Have a new Linux install, and hate the new Gnome? Try this.
http://www.dedoimedo.com/computers/gnome-3-fallback.html
http://www.dedoimedo.com/computers/gnome-3-fallback.html
Thursday, January 12, 2012
How do I get back the window frame in the Windows 7 Task Manager?
If you're missing the windows frame in Windows for the Task Manager, you can get it back by double clicking the very top part of the window. This will "restore" (vs. maximum or minimize) the window size.
Subscribe to:
Posts (Atom)