|
 |
08-13-2009, 11:10 AM
|
#1
|
|
Low Bitrate
Join Date: Jun 2006
Location: Madrid, Spain
Posts: 68
|
Three questions regarding Sygic+Wine
Hi!
I'm succesfully running sygic under wine now, with Ubuntu Desktop 9.04 .
But I have a number of minor problems I'd like to solve:
1. Why is it that if I do "wine Drive.exe" or "wine <path-to-Drive.exe>/Drive.exe" the program stops after showing the first screen? If instead, I do right click and "run with wine" from nautilus, it works fine... =( I think it may have something to do with environment variables, being set differently in the terminal and in nautilus, but I'm not sure...
2. Is there any way to maximize the window automatically when the program is started?
3. I have created a soft link from the <dos_devices> directory to the GPS tty, ttyUSB0; that lets wine read from the GPS as a standard windows serial port. Till there, everything OK. Now, what if I want other programs to use the GPS at the same time? AFAIK, you only need to read from the tty to get the GPS coordinates; and therefore there should be a way to "replicate" the port in the same way the Windows program Franson(s?) GPS gate worked. How can I do this?
Thanks!
|
|
|
|
|
|
Advertisement
|
Sponsored links
|
08-13-2009, 10:10 PM
|
#2
|
|
licensed to kill
Join Date: Aug 2006
Location: Deep in the Rockies... coding in caves
Posts: 1,044
|
Quote: Originally Posted by eurocarpc 
Hi!
I'm succesfully running sygic under wine now, with Ubuntu Desktop 9.04 .
But I have a number of minor problems I'd like to solve:
1. Why is it that if I do "wine Drive.exe" or "wine <path-to-Drive.exe>/Drive.exe" the program stops after showing the first screen? If instead, I do right click and "run with wine" from nautilus, it works fine... =( I think it may have something to do with environment variables, being set differently in the terminal and in nautilus, but I'm not sure...
2. Is there any way to maximize the window automatically when the program is started?
3. I have created a soft link from the <dos_devices> directory to the GPS tty, ttyUSB0; that lets wine read from the GPS as a standard windows serial port. Till there, everything OK. Now, what if I want other programs to use the GPS at the same time? AFAIK, you only need to read from the tty to get the GPS coordinates; and therefore there should be a way to "replicate" the port in the same way the Windows program Franson(s?) GPS gate worked. How can I do this?
Thanks!
1. Don't know
2. use something like "maximus" in the repo. It makes every window maximized.
3. gpsd would solve that for you, but sygic probably won't use it. Someone else may have to chime in like chunky_ks or malcom2073.
__________________
LinuxICE - because my car already has enough windows (and because I like speed).
LinuxICE2 beta2 is released!!! get it now!
Follow OpenICE development
|
|
|
08-14-2009, 09:09 AM
|
#3
|
|
Low Bitrate
Join Date: Jun 2006
Location: Madrid, Spain
Posts: 68
|
Regarding 3... if I run the gps daemon, wine/sygic can't read from the port.
And 2... I believe I've seen "maximus" at work in Ubuntu Netbook, but that's not the kind of behaviour I'm looking for. I only need the GPS window maximized.
Any other clues? Thanks Kev000!
|
|
|
08-14-2009, 12:14 PM
|
#4
|
|
licensed to kill
Join Date: Aug 2006
Location: Deep in the Rockies... coding in caves
Posts: 1,044
|
look at compiz's window manager rules. It will probably only work if compiz is your window manager though.
good luck
__________________
LinuxICE - because my car already has enough windows (and because I like speed).
LinuxICE2 beta2 is released!!! get it now!
Follow OpenICE development
|
|
|
08-19-2009, 05:25 AM
|
#5
|
|
Low Bitrate
Join Date: Jun 2006
Location: Madrid, Spain
Posts: 68
|
Fixed the GPS-for-multiple-apps problem with this home-made php script.
It creates a /tmp/gps_fifo.nmea file that you can use as another com port for wine.
Link to the dosdevices directory with ln -s com2 /tmp/<name> and you are ready to go.
Must be run with php5 <name-of-script>
Install php with sudo aptitude install php5-cli -y
I've also tweaked the gpsd startup script a little so that it runs the script as the gpsd daemon starts running. I'll post the /etc/init.d/gpsd script later.
Code:
<?php
$fifo_filename = "/tmp/gps_fifo.nmea";
ob_end_flush();
// Conectar a GPSD
$gps = fsockopen( 'localhost', 2947, $errno, $errstr, 5 );
if (!$gps)
{
trigger_error(E_USER_ERROR, "No se pudo conectar a GPSD: $errstr (error $errno)\n");
}
$eof = false;
echo "GPSD OK\n";
// Crear FIFO
unlink($fifo_filename);
$fifo = posix_mkfifo($fifo_filename, 0666);
if (!$fifo)
{
trigger_error("No se pudo crear el FIFO.\n", E_USER_ERROR); die();
}
echo "FIFO create OK\n";
// El bucle terminará cuando haya un error de lectura en el GPS
while(!$eof)
{
echo "Waiting for other process to open the FIFO\n";
// Abrir FIFO
$fifo = fopen($fifo_filename,'w');
if (!$fifo)
{
trigger_error("No se pudo abrir el FIFO.\n", E_USER_ERROR); die();
}
echo "FIFO open OK\n";
// Pedir a GPSD que devuelva NMEA
echo "R1\n";
fwrite($gps,"R1\n");
// Capturar la respuesta de GPSD "GPSD,R=1" ("OK, he puesto el modo NMEA)
echo fgets($gps,256);
var_dump($gps);
// ... y mandar lo leído de GPSD al FIFO...
$ok = true;
while ($eof = !feof($gps) && $ok)
{
//echo fgets($fp,256);
$buff = fgets($gps,256);
$ok = fwrite($fifo,$buff);
echo $buff;
}
}
|
|
|
08-19-2009, 12:06 PM
|
#6
|
|
Maximum Bitrate
Join Date: Jan 2008
Location: Dartmouth, MA
Posts: 517
|
1: I'm going to guess that the path is not set correctly. Try going to the command line and CD into the directory that is storing drive.exe and then try doing wine Drive.exe there.
If that works, then we can work from there...
|
|
|
08-20-2009, 12:18 AM
|
#7
|
|
Low Bitrate
Join Date: Jun 2006
Location: Madrid, Spain
Posts: 68
|
I tried that but it didn't work either... =(
|
|
|
08-20-2009, 01:24 AM
|
#8
|
|
Maximum Bitrate
Join Date: Jan 2008
Location: Dartmouth, MA
Posts: 517
|
it's possible that you have two copies of wine installed, and nautilus is grabbing the right one.
It's also possible that nautilus is putting some arguments into the command when it starts. I haven't messed with GUI linux in a while, I wish I could tell you how to check what exactly nautilus is doing, but I can't remember. Grr.
|
|
|
|
Sponsored links
|
|
Advertisement
|
|
08-20-2009, 12:13 PM
|
#9
|
|
Low Bitrate
Join Date: Jun 2006
Location: Madrid, Spain
Posts: 68
|
I installed wine the standard way, with aptitude, so I doubt there are two copies of the program installed.
The second option, passing more arguments (via set env. variables) is what I think the problem is, but I don't know how to fix it. =(
Thanks!
|
|
|
10-02-2009, 03:46 AM
|
#10
|
|
Newbie
Join Date: Oct 2009
Posts: 1
|
Simple com port emulation
Did a little bit of research as I was looking into building my linux based carpc ... this should give you a working com port ... I think, havent tried it.
gpspipe -r >> ~.wine/dosdevices/com3
Found this little snippet here, http://www.nabble.com/-PATCH-2.34--g...d15120307.html
On that site is a patch to gpspipe to add a -f option, but that seems too much work to me to implement. Thought it might be useful to someone.
Chalzor
|
|
|
|
|
|
Advertisement
|
Sponsored links
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 02:41 PM.
| |